diff src/lread.c @ 347:7c94d56991e1 r21-1-3

Import from CVS: tag r21-1-3
author cvs
date Mon, 13 Aug 2007 10:53:48 +0200
parents d1b52dcaa789
children 8e84bee8ddd0
line wrap: on
line diff
--- a/src/lread.c	Mon Aug 13 10:53:20 2007 +0200
+++ b/src/lread.c	Mon Aug 13 10:53:48 2007 +0200
@@ -1545,9 +1545,8 @@
 static Lisp_Object
 read0 (Lisp_Object readcharfun)
 {
-  Lisp_Object val;
-
-  val = read1 (readcharfun);
+  Lisp_Object val = read1 (readcharfun);
+
   if (CONSP (val) && UNBOUNDP (XCAR (val)))
     {
       Emchar c = XCHAR (XCDR (val));
@@ -1687,10 +1686,14 @@
       }
 
     case 'x':
-      /* A hex escape, as in ANSI C.  */
+      /* A hex escape, as in ANSI C, except that we only allow latin-1
+	 characters to be read this way.  What is "\x4e03" supposed to
+	 mean, anyways, if the internal representation is hidden?
+         This is also consistent with the treatment of octal escapes. */
       {
 	REGISTER Emchar i = 0;
-	while (1)
+	REGISTER int count = 0;
+	while (++count <= 2)
 	  {
 	    c = readchar (readcharfun);
 	    /* Remember, can't use isdigit(), isalpha() etc. on Emchars */