[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 79e54a1b75: Use load-read-function in byte-compile-from-buffer
From: |
Lars Ingebrigtsen |
Subject: |
master 79e54a1b75: Use load-read-function in byte-compile-from-buffer |
Date: |
Sat, 22 Jan 2022 10:38:18 -0500 (EST) |
branch: master
commit 79e54a1b757dcc127e5dd82fb492227164cb78c6
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Use load-read-function in byte-compile-from-buffer
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Use
load-read-function.
* src/lread.c (syms_of_lread): Adjust doc string (bug#33723).
---
etc/NEWS | 5 +++++
lisp/emacs-lisp/bytecomp.el | 2 +-
src/lread.c | 4 +++-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 95e53852ce..048f6d5598 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -872,6 +872,10 @@ Emacs buffers, like indentation and the like. The new ert
function
* Incompatible Lisp Changes in Emacs 29.1
+---
+** 'byte-compile-from-buffer' now uses 'load-read-function'.
+It previously called 'read' directly.
+
** User option 'mail-source-ignore-errors' is now obsolete.
The whole mechanism for prompting users to continue in case of
mail-source errors has been removed, so this option is no longer
@@ -977,6 +981,7 @@ functions.
* Lisp Changes in Emacs 29.1
++++
** New function 'readablep'.
This function says whether an object can be written out and then
read back by the Emacs Lisp reader.
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 7dfe21441b..436783819f 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2294,7 +2294,7 @@ With argument ARG, insert value in current buffer after
the form."
(setq byte-compile-read-position (point)
byte-compile-last-position byte-compile-read-position)
(let* ((lread--unescaped-character-literals nil)
- (form (read inbuffer))
+ (form (funcall load-read-function inbuffer))
(warning (byte-run--unescaped-character-literals-warning)))
(when warning (byte-compile-warn "%s" warning))
(byte-compile-toplevel-file-form form)))
diff --git a/src/lread.c b/src/lread.c
index 2eff20f15d..a0af98fa0f 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -5272,7 +5272,9 @@ of the file, regardless of whether or not it has the
`.elc' extension. */);
Vcurrent_load_list = Qnil;
DEFVAR_LISP ("load-read-function", Vload_read_function,
- doc: /* Function used by `load' and `eval-region' for reading
expressions.
+ doc: /* Function used for reading expressions.
+It is used by `load', `eval-region' and `byte-compile-from-buffer'.
+
Called with a single argument (the stream from which to read).
The default is to use the function `read'. */);
DEFSYM (Qread, "read");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 79e54a1b75: Use load-read-function in byte-compile-from-buffer,
Lars Ingebrigtsen <=