emacs-diffs
[Top][All Lists]
Advanced

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

master fd31ef21c5 2/3: Don't use 'load-read-function' in byte-compile-fr


From: Alan Mackenzie
Subject: master fd31ef21c5 2/3: Don't use 'load-read-function' in byte-compile-from-buffer
Date: Sat, 22 Jan 2022 13:05:56 -0500 (EST)

branch: master
commit fd31ef21c5b4679da9c2e26f5aeade8d667d9089
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>

    Don't use 'load-read-function' in byte-compile-from-buffer
    
    * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Call
    read-positioning-symbols directly, rather than binding load-read-function to
    it.  This is so that a lower level use of load-read-function will not 
return a
    form containing symbols with position.
---
 lisp/emacs-lisp/bytecomp.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 903dd50e34..794dc531ea 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2303,8 +2303,11 @@ With argument ARG, insert value in current buffer after 
the form."
                   (forward-line 1))
                 (not (eobp)))
           (let* ((lread--unescaped-character-literals nil)
-                 (load-read-function #'read-positioning-symbols)
-                 (form (funcall load-read-function inbuffer))
+                 ;; Don't bind `load-read-function' to
+                 ;; `read-positioning-symbols' here.  Calls to `read'
+                 ;; at a lower level must not get symbols with
+                 ;; position.
+                 (form (read-positioning-symbols inbuffer))
                  (warning (byte-run--unescaped-character-literals-warning)))
             (when warning (byte-compile-warn-x form "%s" warning))
            (byte-compile-toplevel-file-form form)))



reply via email to

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