Update eln-cache when --init-directory is used

* lisp/startup.el (normal-top-level): Update eln-cache after
'user-emacs-directory' is set by --init-directory.  Patch by
Jordan Isaacs <jordan@snowytrees.dev>.  (Bug#75022)
This commit is contained in:
Eli Zaretskii 2025-01-04 14:44:10 +02:00
parent 5fe7f86367
commit b63ba892f9

View file

@ -778,6 +778,9 @@ It is the default value of the variable `top-level'."
(unwind-protect
(command-line)
(when (featurep 'native-compile)
(startup--update-eln-cache))
;; Do this again, in case .emacs defined more abbreviations.
(if default-directory
(setq default-directory (abbreviate-file-name default-directory)))