aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2019-02-15 18:02:40 -0500
committerStefan Monnier2019-02-15 18:02:40 -0500
commit3c80bc333750b62ed98d3064cf98b74b43121a5e (patch)
tree0cc0a55958bcd48cc0a4d21633e53f5b5422408e
parent877eba7249d0d352ff489f1fceb8362c08814494 (diff)
downloademacs-3c80bc333750b62ed98d3064cf98b74b43121a5e.tar.gz
emacs-3c80bc333750b62ed98d3064cf98b74b43121a5e.zip
* src/lread.c (readevalloop): Use filename to decide macroexpansion
-rw-r--r--src/lread.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lread.c b/src/lread.c
index ff9b75475b8..ddef135687f 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1932,13 +1932,12 @@ readevalloop (Lisp_Object readcharfun,
1932 Lisp_Object macroexpand = intern ("internal-macroexpand-for-load"); 1932 Lisp_Object macroexpand = intern ("internal-macroexpand-for-load");
1933 1933
1934 if (NILP (Ffboundp (macroexpand)) 1934 if (NILP (Ffboundp (macroexpand))
1935 /* Don't macroexpand in .elc files, since it should have been done 1935 || (STRINGP (sourcename)
1936 already. We actually don't know whether we're in a .elc file or not, 1936 && SBYTES (sourcename) >= 4
1937 so we use circumstantial evidence: .el files normally go through 1937 && !strcmp (".elc", SSDATA (sourcename) + SBYTES (sourcename) - 4)))
1938 Vload_source_file_function -> load-with-code-conversion 1938 /* Don't macroexpand before the corresponding function is defined
1939 -> eval-buffer. */ 1939 and don't bother macroexpanding in .elc files, since it should have
1940 || EQ (readcharfun, Qget_file_char) 1940 been done already. */
1941 || EQ (readcharfun, Qget_emacs_mule_file_char))
1942 macroexpand = Qnil; 1941 macroexpand = Qnil;
1943 1942
1944 if (MARKERP (readcharfun)) 1943 if (MARKERP (readcharfun))