]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert part of "; Fix typos"
authorEshel Yaron <me@eshelyaron.com>
Sat, 9 Dec 2023 19:48:58 +0000 (20:48 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 9 Dec 2023 19:48:58 +0000 (20:48 +0100)
This reverts part of commit 2635598fade3b736638c49208ba739ff4c181a52.

lisp/loadup.el

index 4be4d191d1d70205730eb8d8f07836bdf0351fdb..03ed2186392ee3317eec2e5f152c101e65f13036 100644 (file)
@@ -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)