document hungry-eol-escapes
authorAndy Wingo <wingo@pobox.com>
Fri, 21 Jan 2011 08:21:15 +0000 (09:21 +0100)
committerAndy Wingo <wingo@pobox.com>
Fri, 21 Jan 2011 08:24:36 +0000 (09:24 +0100)
* doc/ref/api-data.texi (String Syntax): Document hungry-eol-escapes.
* doc/ref/api-evaluation.texi (Scheme Read):
* doc/ref/api-options.texi (Runtime Options): Update read-options 'help
  output.

doc/ref/api-data.texi
doc/ref/api-evaluation.texi
doc/ref/api-options.texi

index 2c990f9..659dc5c 100755 (executable)
@@ -2671,6 +2671,23 @@ Backspace character (ASCII 8).
 @item @nicode{\0}
 NUL character (ASCII 0).
 
+@item @nicode{\} followed by newline (ASCII 10)
+Nothing.  This way if @nicode{\} is the last character in a line, the
+string will continue with the first character from the next line,
+without a line break.
+
+If the @code{hungry-eol-escapes} reader option is enabled, which is not
+the case by default, leading whitespace on the next line is discarded.
+
+@lisp
+"foo\
+  bar"
+@result{} "foo  bar"
+(read-enable 'hungry-eol-escapes)
+"foo\
+  bar"
+@result{} "foobar"
+@end lisp
 @item @nicode{\xHH}
 Character code given by two hexadecimal digits.  For example
 @nicode{\x7f} for an ASCII DEL (127).
index 022bc48..e20bad4 100644 (file)
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Guile Reference Manual.
-@c Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010
+@c Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010, 2011
 @c   Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
@@ -331,6 +331,8 @@ case-insensitive  no    Convert symbols to lower case.
 keywords          #f    Style of keyword recognition: #f, 'prefix or 'postfix.
 r6rs-hex-escapes  no    Use R6RS variable-length character and string hex escapes.
 square-brackets   yes   Treat `[' and `]' as parentheses, for R6RS compatibility.
+hungry-eol-escapes no   In strings, consume leading whitespace after an
+                        escaped end-of-line.
 @end smalllisp
 
 The boolean options may be toggled with @code{read-enable} and
@@ -352,8 +354,8 @@ For example, to make @code{read} fold all symbols to their lower case
 (read-enable 'case-insensitive)
 @end lisp
 
-For more information on the effect of the @code{r6rs-hex-escapes} option, see
-(@pxref{String Syntax}).
+For more information on the effect of the @code{r6rs-hex-escapes} and
+@code{hungry-eol-escapes} options, see (@pxref{String Syntax}).
 
 
 @node Scheme Write
index 02ea209..1102708 100644 (file)
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Guile Reference Manual.
-@c Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010
+@c Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011
 @c   Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
@@ -420,6 +420,8 @@ case-insensitive  no    Convert symbols to lower case.
 keywords          #f    Style of keyword recognition: #f, 'prefix or 'postfix.
 r6rs-hex-escapes  no    Use R6RS variable-length character and string hex escapes.
 square-brackets   yes   Treat `[' and `]' as parentheses, for R6RS compatibility.
+hungry-eol-escapes no   In strings, consume leading whitespace after an
+                        escaped end-of-line.
 scheme@@(guile-user) [1]> (read-enable 'case-insensitive)
 $2 = (square-brackets keywords #f case-insensitive positions)
 scheme@@(guile-user) [1]> ,q