emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/lread.c


From: Kim F. Storm
Subject: [Emacs-diffs] Changes to emacs/src/lread.c
Date: Thu, 13 Feb 2003 07:44:57 -0500

Index: emacs/src/lread.c
diff -c emacs/src/lread.c:1.305 emacs/src/lread.c:1.306
*** emacs/src/lread.c:1.305     Tue Feb  4 09:03:12 2003
--- emacs/src/lread.c   Thu Feb 13 07:44:57 2003
***************
*** 1697,1705 ****
        return c | alt_modifier;
  
      case 's':
        c = READCHAR;
!       if (c != '-')
!       error ("Invalid escape character syntax");
        c = READCHAR;
        if (c == '\\')
        c = read_escape (readcharfun, 0, byterep);
--- 1697,1709 ----
        return c | alt_modifier;
  
      case 's':
+       if (stringp)
+       return ' ';
        c = READCHAR;
!       if (c != '-') {
!       UNREAD (c);
!       return ' ';
!       }
        c = READCHAR;
        if (c == '\\')
        c = read_escape (readcharfun, 0, byterep);
***************
*** 2247,2252 ****
--- 2251,2257 ----
      case '?':
        {
        int discard;
+       int nextc;
  
        c = READCHAR;
        if (c < 0)
***************
*** 2256,2261 ****
--- 2261,2275 ----
          c = read_escape (readcharfun, 0, &discard);
        else if (BASE_LEADING_CODE_P (c))
          c = read_multibyte (c, readcharfun);
+ 
+       nextc = READCHAR;
+       UNREAD (nextc);
+       if (nextc > 040
+           && !(nextc == '?' 
+                || nextc == '\"' || nextc == '\'' || nextc == ';'
+                || nextc == '(' || nextc == ')'
+                || nextc == '[' || nextc == ']' || nextc == '#'))
+         Fsignal (Qinvalid_read_syntax, Fcons (make_string ("?", 1), Qnil));
  
        return make_number (c);
        }




reply via email to

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