emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-25 711ca36: Properly handle lambda as read function


From: Andreas Schwab
Subject: [Emacs-diffs] emacs-25 711ca36: Properly handle lambda as read function (bug 22961)
Date: Wed, 09 Mar 2016 18:46:16 +0000

branch: emacs-25
commit 711ca362e7f8ca7c4f664dc2fe60bc5fa4e4f4fe
Author: Andreas Schwab <address@hidden>
Commit: Andreas Schwab <address@hidden>

    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.
---
 src/lread.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lread.c b/src/lread.c
index 25e3ff0..828c76ce 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;
     }



reply via email to

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