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.
This commit is contained in:
parent
1b9d6163b0
commit
711ca362e7
1 changed files with 2 additions and 2 deletions
|
@ -264,7 +264,7 @@ readchar (Lisp_Object readcharfun, bool *multibyte)
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CONSP (readcharfun))
|
if (CONSP (readcharfun) && STRINGP (XCAR (readcharfun)))
|
||||||
{
|
{
|
||||||
/* This is the case that read_vector is reading from a unibyte
|
/* This is the case that read_vector is reading from a unibyte
|
||||||
string that contains a byte sequence previously skipped
|
string that contains a byte sequence previously skipped
|
||||||
|
@ -406,7 +406,7 @@ unreadchar (Lisp_Object readcharfun, int c)
|
||||||
read_from_string_index_byte
|
read_from_string_index_byte
|
||||||
= string_char_to_byte (readcharfun, read_from_string_index);
|
= string_char_to_byte (readcharfun, read_from_string_index);
|
||||||
}
|
}
|
||||||
else if (CONSP (readcharfun))
|
else if (CONSP (readcharfun) && STRINGP (XCAR (readcharfun)))
|
||||||
{
|
{
|
||||||
unread_char = c;
|
unread_char = c;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue