From ce085f1d61a69e9e407a31d60c298f04cbd0c8d2 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 25 Jan 2019 16:15:22 -0500 Subject: [PATCH] * lisp/loadup.el (load-file-name): Set back to nil --- lisp/loadup.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/loadup.el b/lisp/loadup.el index 100c3f700d1..747476c5067 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -534,6 +534,10 @@ lost after dumping"))) (equal (nth 2 command-line-args) "loadup")) (setcdr command-line-args (nthcdr 3 command-line-args))) +;; Don't keep `load-file-name' set during the top-level session! +;; Otherwise, it breaks a lot of code which does things like +;; (or load-file-name byte-compile-current-file). +(setq load-file-name nil) (eval top-level) -- 2.39.5