]> git.eshelyaron.com Git - emacs.git/commitdiff
; * lisp/emacs-lisp/comp.el (native-compile-prune-cache): Doc fix.
authorEli Zaretskii <eliz@gnu.org>
Sat, 10 May 2025 19:23:27 +0000 (22:23 +0300)
committerEshel Yaron <me@eshelyaron.com>
Tue, 20 May 2025 20:50:14 +0000 (22:50 +0200)
(cherry picked from commit 2d5f2434706a17055325432d6eb2b711ac785220)

lisp/emacs-lisp/comp.el

index 2cd3d2d03b9d8f131fe03fed4424f113754f34e3..a5a11c271c14ed4d8212a63fdd31523a06e5663b 100644 (file)
@@ -3724,12 +3724,22 @@ variable \"NATIVE_DISABLED\" is set, only byte compile."
 
 ;;;###autoload
 (defun native-compile-prune-cache ()
-  "Remove .eln files that aren't applicable to the current Emacs invocation."
+  "Remove *.eln files that aren't usable by the current Emacs build.
+
+This command removes all the *.eln files in `native-comp-eln-load-path'
+which are incompatible with the Emacs session in which you invoke this
+command.  This includes the *.eln files compiled by all the Emacs
+sessions where `comp-native-version-dir' had a value different from the
+current session.
+
+Note that this command does not prune the *.eln files in the last
+directory in `native-comp-eln-load-path', which holds *.eln files
+compiled during the Emacs build process."
   (interactive)
   (unless (featurep 'native-compile)
     (user-error "This Emacs isn't built with native-compile support"))
-  ;; The last item in native-comp-eln-load-path is assumed to be a system
-  ;; directory, so don't try to delete anything there (bug#59658).
+  ;; The last directory in 'native-comp-eln-load-path' is assumed to be a
+  ;; system directory, so don't try to delete anything there (bug#59658).
   (dolist (dir (butlast native-comp-eln-load-path))
     ;; If a directory is non absolute it is assumed to be relative to
     ;; `invocation-directory'.