mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-18 18:05:07 +00:00
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.
This commit is contained in:
parent
8decfbe4d7
commit
8db8c851ad
@ -90,6 +90,7 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
|
|||||||
(string-match "\\`\\(.*\\)\\.el\\'" file)
|
(string-match "\\`\\(.*\\)\\.el\\'" file)
|
||||||
(let ((name (or generated-autoload-load-name ; see bug#5277
|
(let ((name (or generated-autoload-load-name ; see bug#5277
|
||||||
(file-name-nondirectory (match-string 1 file))))
|
(file-name-nondirectory (match-string 1 file))))
|
||||||
|
(load-true-file-name file)
|
||||||
(load-file-name file))
|
(load-file-name file))
|
||||||
(if (save-excursion
|
(if (save-excursion
|
||||||
(re-search-forward
|
(re-search-forward
|
||||||
|
@ -167,7 +167,9 @@ expression, in which case we want to handle forms differently."
|
|||||||
define-inline cl-defun cl-defmacro cl-defgeneric
|
define-inline cl-defun cl-defmacro cl-defgeneric
|
||||||
cl-defstruct pcase-defmacro))
|
cl-defstruct pcase-defmacro))
|
||||||
(macrop car)
|
(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)))
|
(memq (car expand) '(progn prog1 defalias)))
|
||||||
(make-autoload expand file 'expansion)) ;Recurse on the expansion.
|
(make-autoload expand file 'expansion)) ;Recurse on the expansion.
|
||||||
|
|
||||||
|
@ -3965,7 +3965,8 @@ activations need to be changed, such as when `package-load-list' is modified."
|
|||||||
(let ((load-suffixes '(".el" ".elc")))
|
(let ((load-suffixes '(".el" ".elc")))
|
||||||
(locate-library (package--autoloads-file-name pkg))))
|
(locate-library (package--autoloads-file-name pkg))))
|
||||||
(pfile (prin1-to-string file)))
|
(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)
|
(insert-file-contents file)
|
||||||
;; Fixup the special #$ reader form and throw away comments.
|
;; Fixup the special #$ reader form and throw away comments.
|
||||||
(while (re-search-forward "#\\$\\|^;\\(.*\n\\)" nil 'move)
|
(while (re-search-forward "#\\$\\|^;\\(.*\n\\)" nil 'move)
|
||||||
|
@ -320,7 +320,8 @@ Return t if file exists."
|
|||||||
(when purify-flag
|
(when purify-flag
|
||||||
(push (purecopy file) preloaded-file-list))
|
(push (purecopy file) preloaded-file-list))
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(let ((load-file-name fullname)
|
(let ((load-true-file-name fullname)
|
||||||
|
(load-file-name fullname)
|
||||||
(set-auto-coding-for-load t)
|
(set-auto-coding-for-load t)
|
||||||
(inhibit-file-name-operation nil))
|
(inhibit-file-name-operation nil))
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
|
@ -566,6 +566,7 @@ lost after dumping")))
|
|||||||
;; Don't keep `load-file-name' set during the top-level session!
|
;; Don't keep `load-file-name' set during the top-level session!
|
||||||
;; Otherwise, it breaks a lot of code which does things like
|
;; Otherwise, it breaks a lot of code which does things like
|
||||||
;; (or load-file-name byte-compile-current-file).
|
;; (or load-file-name byte-compile-current-file).
|
||||||
|
(setq load-true-file-name nil)
|
||||||
(setq load-file-name nil)
|
(setq load-file-name nil)
|
||||||
(eval top-level)
|
(eval top-level)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user