]> git.eshelyaron.com Git - emacs.git/commitdiff
Use file-truename on files loaded with "emacs -l"
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 19 Jun 2021 13:58:09 +0000 (15:58 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 19 Jun 2021 13:58:09 +0000 (15:58 +0200)
* lisp/startup.el (command-line-1): When loading a file, use the
truename so that eval-after-load works more reliably (bug#49009).
Change suggested by ctarbide@tuta.io.

lisp/startup.el

index ac319612e825f26b59757f47808170d3ad4df878..456c01efd1341cd8aa05845e191997ac96c92e59 100644 (file)
@@ -2500,7 +2500,7 @@ nil default-directory" name)
                                    (or argval (pop command-line-args-left))))
                             ;; Take file from default dir if it exists there;
                             ;; otherwise let `load' search for it.
-                            (file-ex (expand-file-name file)))
+                            (file-ex (file-truename (expand-file-name file))))
                        (when (file-regular-p file-ex)
                          (setq file file-ex))
                        (load file nil t)))
@@ -2511,7 +2511,7 @@ nil default-directory" name)
                      (let* ((file (command-line-normalize-file-name
                                    (or argval (pop command-line-args-left))))
                             ;; Take file from default dir.
-                            (file-ex (expand-file-name file)))
+                            (file-ex (file-truename (expand-file-name file))))
                        (load file-ex nil t t)))
 
                     ((equal argi "-insert")