guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-11-202-g0


From: Michael Gran
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-11-202-g0f3a70c
Date: Sat, 17 Jul 2010 11:21:28 +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=0f3a70cfa897530cdc50aa768d73d41419a5b360

The branch, master has been updated
       via  0f3a70cfa897530cdc50aa768d73d41419a5b360 (commit)
      from  211683cc5c99542dfb6e2a33f7cb8c1f9abbc702 (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 0f3a70cfa897530cdc50aa768d73d41419a5b360
Author: Michael Gran <address@hidden>
Date:   Sat Jul 17 04:16:57 2010 -0700

    Enable character hex escapes by default
    
    R6RS character hex escapes do not conflict with legacy Guile octal
    character escapes, so they can be enabled by default.
    
    * libguile/read.c (scm_read_character): modified
    * test-suite/tests/reader.test: modify character escape tests
    * doc/ref/api-data.texi: modified
    * doc/ref/api-options.texi: modified

-----------------------------------------------------------------------

Summary of changes:
 doc/ref/api-data.texi        |   19 +++++--------------
 doc/ref/api-options.texi     |    4 ++--
 libguile/read.c              |    6 +++---
 test-suite/tests/reader.test |   17 +++++------------
 4 files changed, 15 insertions(+), 31 deletions(-)

diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi
index 40bd969..cc11343 100755
--- a/doc/ref/api-data.texi
+++ b/doc/ref/api-data.texi
@@ -1763,17 +1763,9 @@ Characters may also be written using their code point 
values.  They can
 be written with as an octal number, such as @code{#\10} for
 @code{#\bs} or @code{#\177} for @code{#\del}.
 
-When the @code{r6rs-hex-escapes} reader option is enabled, there is an
-additional syntax for character escapes: @code{#\xHHHH} -- the letter 'x'
-followed by a hexadecimal number of one to eight digits.
-
address@hidden
-(read-enable 'r6rs-hex-escapes)
address@hidden lisp
-
-Enabling this option will also change the hex escape format for strings.  More
-on string escapes can be found at (@pxref{String Syntax}).  More on reader
-options in general can be found at (@pxref{Reader options}).
+If one prefers hex to octal, there is an additional syntax for character
+escapes: @code{#\xHHHH} -- the letter 'x' followed by a hexadecimal
+number of one to eight digits.
 
 @rnindex char?
 @deffn {Scheme Procedure} char? x
@@ -2698,9 +2690,8 @@ it can be enabled with the reader option 
@code{r6rs-hex-escapes}.
 (read-enable 'r6rs-hex-escapes)
 @end lisp
 
-Enabling this option will also change the hex escape format for characters.
-More on character escapes can be found at (@pxref{Characters}).  More on
-reader options in general can be found at (@pxref{Reader options}).
+More on reader options in general can be found at (@pxref{Reader
+options}).
 
 @node String Predicates
 @subsubsection String Predicates
diff --git a/doc/ref/api-options.texi b/doc/ref/api-options.texi
index 3d54a28..6a3aa2f 100644
--- a/doc/ref/api-options.texi
+++ b/doc/ref/api-options.texi
@@ -509,7 +509,7 @@ keywords         #f      Style of keyword recognition: #f, 
'prefix or 'postfix
 case-insensitive no      Convert symbols to lower case.
 positions        yes     Record positions of source code expressions.
 copy             no      Copy source code expressions.
-r6rs-hex-escapes no      Use R6RS-style string and character hex escapes
+r6rs-hex-escapes no      Use R6RS-style string hex escapes
 @end smalllisp
 
 Notice that while Standard Scheme is case insensitive, to ease
@@ -523,7 +523,7 @@ To make Guile case insensitive, you can type
 @end lisp
 
 For more information on the effect of the @code{r6rs-hex-escapes} option, see
-(@pxref{Characters}) and (@pxref{String Syntax}).
+(@pxref{String Syntax}).
 
 @node Printing options
 @subsubsection Printing options
diff --git a/libguile/read.c b/libguile/read.c
index 2ac4d10..49df1e3 100644
--- a/libguile/read.c
+++ b/libguile/read.c
@@ -966,16 +966,16 @@ scm_read_character (scm_t_wchar chr, SCM port)
           if (SCM_IS_UNICODE_CHAR (c))
             return SCM_MAKE_CHAR (c);
           else
-            scm_i_input_error (FUNC_NAME, port, 
+            scm_i_input_error (FUNC_NAME, port,
                                "out-of-range octal character escape: ~a",
                                scm_list_1 (charname));
         }
     }
 
-  if (cp == 'x' && (charname_len > 1) && SCM_R6RS_ESCAPES_P)
+  if (cp == 'x' && (charname_len > 1))
     {
       SCM p;
-      
+
       /* Convert from hex, skipping the initial 'x' character in CHARNAME */
       p = scm_string_to_number (scm_c_substring (charname, 1, charname_len),
                                 scm_from_uint (16));
diff --git a/test-suite/tests/reader.test b/test-suite/tests/reader.test
index b657861..362c9e2 100644
--- a/test-suite/tests/reader.test
+++ b/test-suite/tests/reader.test
@@ -332,28 +332,21 @@
        "\\xff;\\x100;\\xfff;\\x1000;\\xffff;\\x10000;"))
 
     (pass-if "one-digit hex escape"
-      (eqv? (with-read-options '(r6rs-hex-escapes)
-              (lambda ()
-                (with-input-from-string "#\\xA" read)))
+      (eqv? (with-input-from-string "#\\xA" read)
             (integer->char #x0A)))
 
     (pass-if "two-digit hex escape"
-      (eqv? (with-read-options '(r6rs-hex-escapes)
-              (lambda ()
-                (with-input-from-string "#\\xFF" read)))
+      (eqv? (with-input-from-string "#\\xFF" read)
             (integer->char #xFF)))
 
     (pass-if "four-digit hex escape"
-      (eqv? (with-read-options '(r6rs-hex-escapes)
-              (lambda ()
-                (with-input-from-string "#\\x00FF" read)))
+      (eqv? (with-input-from-string "#\\x00FF" read)
             (integer->char #xFF)))
 
     (pass-if "eight-digit hex escape"
-      (eqv? (with-read-options '(r6rs-hex-escapes)
-              (lambda ()
-                (with-input-from-string "#\\x00006587" read)))
+      (eqv? (with-input-from-string "#\\x00006587" read)
             (integer->char #x6587)))
+
     (pass-if "write R6RS escapes"
       (string=?
        (with-read-options '(r6rs-hex-escapes)


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]