diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2016-03-09 19:40:00 +0100 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2016-03-09 19:45:40 +0100 |
commit | 711ca362e7f8ca7c4f664dc2fe60bc5fa4e4f4fe (patch) | |
tree | fb06c21131638649f0530f1700c2a91905973095 /src/lread.c | |
parent | 1b9d6163b023aaefd15d38ea28e968a113202402 (diff) | |
download | emacs-711ca362e7f8ca7c4f664dc2fe60bc5fa4e4f4fe.tar.gz |
Properly handle lambda as read function (bug 22961)
* src/lread.c (readchar): Be more strict about checking for
string in cons for read_vector.
(unreadchar): Likewise.
Diffstat (limited to 'src/lread.c')
-rw-r--r-- | src/lread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lread.c b/src/lread.c index 25e3ff01d47..828c76ce49d 100644 --- a/src/lread.c +++ b/src/lread.c @@ -264,7 +264,7 @@ readchar (Lisp_Object readcharfun, bool *multibyte) return c; } - if (CONSP (readcharfun)) + if (CONSP (readcharfun) && STRINGP (XCAR (readcharfun))) { /* This is the case that read_vector is reading from a unibyte string that contains a byte sequence previously skipped @@ -406,7 +406,7 @@ unreadchar (Lisp_Object readcharfun, int c) read_from_string_index_byte = string_char_to_byte (readcharfun, read_from_string_index); } - else if (CONSP (readcharfun)) + else if (CONSP (readcharfun) && STRINGP (XCAR (readcharfun))) { unread_char = c; } |