]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/lread.c (read1): Read `#:' as empty uninterned symbol if no
authorAndreas Schwab <schwab@linux-m68k.org>
Sun, 17 Jul 2011 08:00:53 +0000 (10:00 +0200)
committerAndreas Schwab <schwab@linux-m68k.org>
Sun, 17 Jul 2011 08:00:53 +0000 (10:00 +0200)
symbol character follows.

src/ChangeLog
src/lread.c

index d12558e5d6dfb97af0cc27e8602836c0a3e0b141..10f4186c31c8c0c717786293c23702e0d72b7cde 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-17  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * lread.c (read1): Read `#:' as empty uninterned symbol if no
+       symbol character follows.
+
 2011-07-17  Paul Eggert  <eggert@cs.ucla.edu>
 
        * fileio.c (Fcopy_file): Pacify gcc re fchown.  (Bug#9002)
index 7dd566dc17354bacd16767aba7316b9f968ada60..bb0edd898da33c26336c949cb406f112946c1966 100644 (file)
@@ -2660,7 +2660,18 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
        {
          uninterned_symbol = 1;
          c = READCHAR;
-         goto default_label;
+         if (!(c > 040
+               && c != 0x8a0
+               && (c >= 0200
+                   || !(strchr ("\"';()[]#`,", c)))))
+           {
+             /* No symbol character follows, this is the empty
+                symbol.  */
+             if (c >= 0)
+               UNREAD (c);
+             return Fmake_symbol (build_string (""));
+           }
+         goto read_symbol;
        }
       /* Reader forms that can reuse previously read objects.  */
       if (c >= '0' && c <= '9')
@@ -3002,6 +3013,8 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
       if (c <= 040) goto retry;
       if (c == 0x8a0) /* NBSP */
        goto retry;
+
+    read_symbol:
       {
        char *p = read_buffer;
        int quoted = 0;