emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 01bbe4c: Use file-truename on files loaded with "emacs -l"


From: Lars Ingebrigtsen
Subject: master 01bbe4c: Use file-truename on files loaded with "emacs -l"
Date: Sat, 19 Jun 2021 09:59:26 -0400 (EDT)

branch: master
commit 01bbe4c3058a52758763eea711aabfefae28b179
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Use file-truename on files loaded with "emacs -l"
    
    * 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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/startup.el b/lisp/startup.el
index ac31961..456c01e 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]