for \s-X in a character constant which still is the super modifier.
(read1): Signal an `invalid read syntax' error if a character
constant is immediately followed by a digit or symbol character.
2003-02-13 Kim F. Storm <storm@cua.dk>
+ * lread.c (read_escape): Interpret \s as a SPACE character, except
+ for \s-X in a character constant which still is the super modifier.
+ (read1): Signal an `invalid read syntax' error if a character
+ constant is immediately followed by a digit or symbol character.
+
* search.c (Fmatch_data): Doc fix. Explicitly state that
match-data is undefined if last search failed.
return c | alt_modifier;
case 's':
+ if (stringp)
+ return ' ';
c = READCHAR;
- if (c != '-')
- error ("Invalid escape character syntax");
+ if (c != '-') {
+ UNREAD (c);
+ return ' ';
+ }
c = READCHAR;
if (c == '\\')
c = read_escape (readcharfun, 0, byterep);
case '?':
{
int discard;
+ int nextc;
c = READCHAR;
if (c < 0)
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);
}