summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/elisp-mode.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index b2709616d22..6fbb87fa3a8 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -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.