[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 3c80bc3 1/2: * src/lread.c (readevalloop): Use file
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] master 3c80bc3 1/2: * src/lread.c (readevalloop): Use filename to decide macroexpansion |
Date: |
Fri, 15 Feb 2019 18:57:57 -0500 (EST) |
branch: master
commit 3c80bc333750b62ed98d3064cf98b74b43121a5e
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* src/lread.c (readevalloop): Use filename to decide macroexpansion
---
src/lread.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/lread.c b/src/lread.c
index ff9b754..ddef135 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1932,13 +1932,12 @@ readevalloop (Lisp_Object readcharfun,
Lisp_Object macroexpand = intern ("internal-macroexpand-for-load");
if (NILP (Ffboundp (macroexpand))
- /* Don't macroexpand in .elc files, since it should have been done
- already. We actually don't know whether we're in a .elc file or not,
- so we use circumstantial evidence: .el files normally go through
- Vload_source_file_function -> load-with-code-conversion
- -> eval-buffer. */
- || EQ (readcharfun, Qget_file_char)
- || EQ (readcharfun, Qget_emacs_mule_file_char))
+ || (STRINGP (sourcename)
+ && SBYTES (sourcename) >= 4
+ && !strcmp (".elc", SSDATA (sourcename) + SBYTES (sourcename) - 4)))
+ /* Don't macroexpand before the corresponding function is defined
+ and don't bother macroexpanding in .elc files, since it should have
+ been done already. */
macroexpand = Qnil;
if (MARKERP (readcharfun))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 3c80bc3 1/2: * src/lread.c (readevalloop): Use filename to decide macroexpansion,
Stefan Monnier <=