]> git.eshelyaron.com Git - emacs.git/commitdiff
* Fix `emacs-lisp-native-compile-and-load' for (bug#61917)
authorAndrea Corallo <akrl@sdf.org>
Mon, 6 Mar 2023 16:27:32 +0000 (17:27 +0100)
committerAndrea Corallo <akrl@sdf.org>
Mon, 6 Mar 2023 16:29:36 +0000 (17:29 +0100)
* lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile-and-load):
Don't load if no compialtion happened.

lisp/progmodes/elisp-mode.el

index b2709616d22e8bb5273fd41624234042d88aaeb7..6fbb87fa3a8a714aedf0a00c7a2cd335676963ba 100644 (file)
@@ -224,7 +224,8 @@ Use `emacs-lisp-byte-compile-and-load' in combination with
 native compilation."
   (interactive nil emacs-lisp-mode)
   (emacs-lisp--before-compile-buffer)
-  (load (native-compile buffer-file-name)))
+  (when-let ((out (native-compile buffer-file-name)))
+    (load out)))
 
 (defun emacs-lisp-macroexpand ()
   "Macroexpand the form after point.