diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-04-14 19:58:41 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-04-14 19:58:41 +0100 |
commit | 8db8c851ad1568d61ed50a4d087e6de2b475cf5f (patch) | |
tree | ab70b1f54c8184169b3b65135ebc138010f2d528 /lisp/emacs-lisp | |
parent | 8decfbe4d75b538707fa794c395d712bfde407f4 (diff) | |
download | emacs-8db8c851ad1568d61ed50a4d087e6de2b475cf5f.tar.gz emacs-8db8c851ad1568d61ed50a4d087e6de2b475cf5f.tar.bz2 emacs-8db8c851ad1568d61ed50a4d087e6de2b475cf5f.zip |
Always set `load-true-file-name' where `load-file-name' is set too.
Fix bug#40620.
* lisp/cus-dep.el (custom-make-dependencies): Set
load-true-file-name.
* lisp/emacs-lisp/package.el (package-quickstart-refresh):
Likewise.
* lisp/international/mule.el (load-with-code-conversion):
Likewise.
* lisp/loadup.el (load-true-file-name): Likewise.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/autoload.el | 4 | ||||
-rw-r--r-- | lisp/emacs-lisp/package.el | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 6180bee2aa7..d9a43c23299 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -167,7 +167,9 @@ expression, in which case we want to handle forms differently." define-inline cl-defun cl-defmacro cl-defgeneric cl-defstruct pcase-defmacro)) (macrop car) - (setq expand (let ((load-file-name file)) (macroexpand form))) + (setq expand (let ((load-true-file-name file) + (load-file-name file)) + (macroexpand form))) (memq (car expand) '(progn prog1 defalias))) (make-autoload expand file 'expansion)) ;Recurse on the expansion. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 4312ab9ca9a..b33e4897a01 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -3965,7 +3965,8 @@ activations need to be changed, such as when `package-load-list' is modified." (let ((load-suffixes '(".el" ".elc"))) (locate-library (package--autoloads-file-name pkg)))) (pfile (prin1-to-string file))) - (insert "(let ((load-file-name " pfile "))\n") + (insert "(let ((load-true-file-name " pfile ")\ +(load-file-name " pfile "))\n") (insert-file-contents file) ;; Fixup the special #$ reader form and throw away comments. (while (re-search-forward "#\\$\\|^;\\(.*\n\\)" nil 'move) |