1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-22 04:30:19 +02:00
Conflicts:
	test-suite/tests/reader.test
This commit is contained in:
Andy Wingo 2015-01-22 12:50:18 +01:00
commit 678995ff79
3 changed files with 18 additions and 6 deletions

View file

@ -1,7 +1,7 @@
@c -*-texinfo-*- @c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual. @c This is part of the GNU Guile Reference Manual.
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2007, @c Copyright (C) 1996, 1997, 2000-2004, 2006-2014
@c 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. @c Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions. @c See the file guile.texi for copying conditions.
@node Simple Data Types @node Simple Data Types
@ -3003,6 +3003,10 @@ Backspace character (ASCII 8).
@item @nicode{\0} @item @nicode{\0}
NUL character (ASCII 0). NUL character (ASCII 0).
@item @nicode{\(}
Open parenthesis. This is intended for use at the beginning of lines in
multiline strings to avoid confusing Emacs lisp modes.
@item @nicode{\} followed by newline (ASCII 10) @item @nicode{\} followed by newline (ASCII 10)
Nothing. This way if @nicode{\} is the last character in a line, the Nothing. This way if @nicode{\} is the last character in a line, the
string will continue with the first character from the next line, string will continue with the first character from the next line,

View file

@ -1,5 +1,5 @@
/* Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2004, 2006, /* Copyright (C) 1995-1997, 1999-2001, 2003, 2004, 2006-2012, 2014
* 2007, 2008, 2009, 2010, 2011, 2012, 2014 Free Software Foundation, Inc. * Free Software Foundation, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License * modify it under the terms of the GNU Lesser General Public License
@ -640,6 +640,9 @@ scm_read_string_like_syntax (int chr, SCM port, scm_t_read_opts *opts)
goto str_eof; goto str_eof;
case '|': case '|':
case '\\': case '\\':
case '(': /* Accept "\(" for use at the beginning of lines
in multiline strings to avoid confusing emacs
lisp modes. */
break; break;
case '\n': case '\n':
if (opts->hungry_eol_escapes_p) if (opts->hungry_eol_escapes_p)

View file

@ -1,7 +1,8 @@
;;;; reader.test --- Reader test. -*- coding: iso-8859-1; mode: scheme -*- ;;;; reader.test --- Reader test. -*- coding: iso-8859-1; mode: scheme -*-
;;;; ;;;;
;;;; Copyright (C) 1999, 2001, 2002, 2003, 2007, 2008, 2009, 2010, 2011, ;;;; Copyright (C) 1999, 2001-2003, 2007-2011, 2013-2015
;;;; 2013, 2014 Free Software Foundation, Inc. ;;;; Free Software Foundation, Inc.
;;;;
;;;; Jim Blandy <jimb@red-bean.com> ;;;; Jim Blandy <jimb@red-bean.com>
;;;; ;;;;
;;;; This library is free software; you can redistribute it and/or ;;;; This library is free software; you can redistribute it and/or
@ -77,6 +78,10 @@
"a|b" "a|b"
(read-string "\"a\\|b\"")) (read-string "\"a\\|b\""))
(pass-if-equal "'(' in string literals"
"a(b"
(read-string "\"a\\(b\""))
(pass-if-equal "#\\escape" (pass-if-equal "#\\escape"
'(a #\esc b) '(a #\esc b)
(read-string "(a #\\escape b)")) (read-string "(a #\\escape b)"))