From 44287ee06d66c7cd473ae66795e4fef6760226cb Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 9 Dec 2023 20:48:58 +0100 Subject: [PATCH] Revert part of "; Fix typos" This reverts part of commit 2635598fade3b736638c49208ba739ff4c181a52. --- lisp/loadup.el | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lisp/loadup.el b/lisp/loadup.el index 4be4d191d1d..03ed2186392 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -506,23 +506,23 @@ lost after dumping"))) ;; At this point, we're ready to resume undo recording for scratch. (buffer-enable-undo "*scratch*") -(defvar comp-subr-arities-h) -(when (featurep 'native-compile) - ;; Save the arity for all primitives so the compiler can always - ;; retrieve it even in case of redefinition. - (mapatoms (lambda (f) - (when (subr-primitive-p (symbol-function f)) - (puthash f (func-arity f) comp-subr-arities-h)))) - ;; Fix the compilation unit filename to have it working when - ;; installed or if the source directory got moved. This is set to be - ;; a pair in the form of: - ;; (rel-filename-from-install-bin . rel-filename-from-local-bin). - (let ((bin-dest-dir (cadr (member "--bin-dest" command-line-args))) - (eln-dest-dir (cadr (member "--eln-dest" command-line-args)))) - (when (and bin-dest-dir eln-dest-dir) - (setq eln-dest-dir - (concat eln-dest-dir "native-lisp/" comp-native-version-dir "/")) - (maphash (lambda (_ cu) +(defvar load--bin-dest-dir nil + "Store the original value passed by \"--bin-dest\" during dump. +Internal use only.") +(defvar load--eln-dest-dir nil + "Store the original value passed by \"--eln-dest\" during dump. +Internal use only.") + +(defun load--fixup-all-elns () + "Fix all compilation unit filename. +This to have it working when installed or if Emacs source +directory got moved. This is set to be a pair in the form of: +\(rel-filename-from-install-bin . rel-filename-from-local-bin)." + (when (and load--bin-dest-dir load--eln-dest-dir) + (setq eln-dest-dir + (concat load--eln-dest-dir "native-lisp/" comp-native-version-dir "/")) + (maphash (lambda (_ cu) + (when (stringp (native-comp-unit-file cu)) (let* ((file (native-comp-unit-file cu)) (preloaded (equal (substring (file-name-directory file) -10 -1) -- 2.39.5