summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2022-01-22 17:48:46 +0000
committerAlan Mackenzie <acm@muc.de>2022-01-22 17:48:46 +0000
commitfd31ef21c5b4679da9c2e26f5aeade8d667d9089 (patch)
tree1d36d31e05ed1c6f6a3c83b765a407a97f3c06f0 /lisp/emacs-lisp
parent88e1f8b02086aaf652e3058b36b7612c073c04b3 (diff)
downloademacs-fd31ef21c5b4679da9c2e26f5aeade8d667d9089.tar.gz
emacs-fd31ef21c5b4679da9c2e26f5aeade8d667d9089.tar.bz2
emacs-fd31ef21c5b4679da9c2e26f5aeade8d667d9089.zip
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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 903dd50e34d..794dc531ea2 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)))