From: Stefan Monnier <monnier@iro.umontreal.ca>
Date: Fri, 25 Jan 2019 21:15:22 +0000 (-0500)
Subject: * lisp/loadup.el (load-file-name): Set back to nil
X-Git-Tag: emacs-27.0.90~3730
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ce085f1d61a69e9e407a31d60c298f04cbd0c8d2;p=emacs.git

* lisp/loadup.el (load-file-name): Set back to nil
---

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)