]> git.eshelyaron.com Git - emacs.git/commitdiff
Give a better error message in native-compile-prune-cache
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 22 Jul 2022 19:55:23 +0000 (21:55 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 22 Jul 2022 19:55:23 +0000 (21:55 +0200)
* lisp/emacs-lisp/comp.el (native-compile-prune-cache): Give a
better error message in non-nativecomp builds.

lisp/emacs-lisp/comp.el

index 9a635a47763e18d008ebe480739986b81d1e4d99..04df4885de15bc71f2421eb7189bfb517beb45b5 100644 (file)
@@ -4293,6 +4293,8 @@ of (commands) to run simultaneously."
 (defun native-compile-prune-cache ()
   "Remove .eln files that aren't applicable to the current Emacs invocation."
   (interactive)
+  (unless (featurep 'native-compile)
+    (user-error "This Emacs isn't build with native-compile support"))
   (dolist (dir native-comp-eln-load-path)
     ;; If a directory is non absolute it is assumed to be relative to
     ;; `invocation-directory'.