1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-11 00:30:17 -08:00

(package-quickstart-refresh): Generate marginally more efficient code

* lisp/emacs-lisp/package.el (package-quickstart-refresh): Include
only one copy of the file names.
This commit is contained in:
Andrea Corallo 2023-11-22 17:51:45 -05:00 committed by Stefan Monnier
parent 366c316a2f
commit 7f359d2488

View file

@ -4612,8 +4612,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-true-file-name " pfile ")\
\(load-file-name " pfile "))\n")
(insert "(let* ((load-file-name " pfile ")\
\(load-true-file-name load-file-name))\n")
(insert-file-contents file)
;; Fixup the special #$ reader form and throw away comments.
(while (re-search-forward "#\\$\\|^;\\(.*\n\\)" nil 'move)