From 963c8c35c3043aa6f20862b4eb9273587839f77a Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 22 Jul 2022 21:55:23 +0200 Subject: [PATCH] Give a better error message in native-compile-prune-cache * lisp/emacs-lisp/comp.el (native-compile-prune-cache): Give a better error message in non-nativecomp builds. --- lisp/emacs-lisp/comp.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 9a635a47763..04df4885de1 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -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'. -- 2.39.5