[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.11-80-g5af30
From: |
Mark H Weaver |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.11-80-g5af307d |
Date: |
Thu, 02 Oct 2014 01:02:41 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=5af307de43e4b65eec7f235b48a8908f2a00f134
The branch, stable-2.0 has been updated
via 5af307de43e4b65eec7f235b48a8908f2a00f134 (commit)
from b1451ad859183ae48c624d19ec144306bd2d3e3a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5af307de43e4b65eec7f235b48a8908f2a00f134
Author: Mark H Weaver <address@hidden>
Date: Wed Oct 1 20:45:41 2014 -0400
read: Accept "\(" in string literals.
Suggested by David Kastrup <address@hidden> in <http://bugs.gnu.org/13644>.
* libguile/read.c (scm_read_string_like_syntax): Accept "\(" as
equivalent to "(".
* doc/ref/api-data.texi (String Syntax): Document it.
* test-suite/tests/reader.test ("reading"): Add test.
-----------------------------------------------------------------------
Summary of changes:
doc/ref/api-data.texi | 8 ++++++--
libguile/read.c | 7 +++++--
test-suite/tests/reader.test | 9 +++++++--
3 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi
index c1dd761..d98c938 100644
--- a/doc/ref/api-data.texi
+++ b/doc/ref/api-data.texi
@@ -1,7 +1,7 @@
@c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006,
2007,
address@hidden 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software
Foundation, Inc.
address@hidden Copyright (C) 1996, 1997, 2000-2004, 2006-2014
address@hidden Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions.
@node Simple Data Types
@@ -2999,6 +2999,10 @@ Backspace character (ASCII 8).
@item @nicode{\0}
NUL character (ASCII 0).
address@hidden @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)
Nothing. This way if @nicode{\} is the last character in a line, the
string will continue with the first character from the next line,
diff --git a/libguile/read.c b/libguile/read.c
index 419ad12..60a40d9 100644
--- a/libguile/read.c
+++ b/libguile/read.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2004, 2006,
- * 2007, 2008, 2009, 2010, 2011, 2012, 2014 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1997, 1999-2001, 2003, 2004, 2006-2012, 2014
+ * Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -635,6 +635,9 @@ scm_read_string_like_syntax (int chr, SCM port,
scm_t_read_opts *opts)
goto str_eof;
case '|':
case '\\':
+ case '(': /* Accept "\(" for use at the beginning of lines
+ in multiline strings to avoid confusing emacs
+ lisp modes. */
break;
case '\n':
if (opts->hungry_eol_escapes_p)
diff --git a/test-suite/tests/reader.test b/test-suite/tests/reader.test
index 18c0293..9055e3b 100644
--- a/test-suite/tests/reader.test
+++ b/test-suite/tests/reader.test
@@ -1,7 +1,8 @@
;;;; reader.test --- Reader test. -*- coding: iso-8859-1; mode: scheme -*-
;;;;
-;;;; Copyright (C) 1999, 2001, 2002, 2003, 2007, 2008, 2009, 2010, 2011,
-;;;; 2014 Free Software Foundation, Inc.
+;;;; Copyright (C) 1999, 2001-2003, 2007-2011, 2014
+;;;; Free Software Foundation, Inc.
+;;;;
;;;; Jim Blandy <address@hidden>
;;;;
;;;; This library is free software; you can redistribute it and/or
@@ -78,6 +79,10 @@
"a|b"
(read-string "\"a\\|b\""))
+ (pass-if-equal "'(' in string literals"
+ "a(b"
+ (read-string "\"a\\(b\""))
+
(pass-if-equal "#\\escape"
'(a #\esc b)
(read-string "(a #\\escape b)"))
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.11-80-g5af307d,
Mark H Weaver <=