]> git.eshelyaron.com Git - emacs.git/commitdiff
; Avoid byte-compiler warning in startup.el
authorEli Zaretskii <eliz@gnu.org>
Sat, 19 Nov 2022 12:43:51 +0000 (14:43 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 19 Nov 2022 12:43:51 +0000 (14:43 +0200)
* lisp/startup.el (startup--load-user-init-file): Avoid
byte-compiler warnings about 'comp-eln-to-el-h'.  (Bug#59334)

lisp/startup.el

index d7d874333628858783434e20a51475e809e70517..5e0a47d3f8fee3dc945d74b1d307ae2e49c78960 100644 (file)
@@ -1076,7 +1076,10 @@ init-file, or to a default value if loading is not possible."
                       (sit-for 1))
                     (setq user-init-file source)))
               ;; Else, perhaps the user init file was compiled
-              (when (equal (file-name-extension user-init-file) "eln")
+              (when (and (equal (file-name-extension user-init-file) "eln")
+                         ;; The next test is for builds without native
+                         ;; compilation support or builds with unexec.
+                         (boundp 'comp-eln-to-el-h))
                 (if-let (source (gethash (file-name-nondirectory user-init-file)
                                          comp-eln-to-el-h))
                     ;; source exists or the .eln file would not load