aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Corallo2021-03-21 09:15:25 +0100
committerAndrea Corallo2021-04-04 22:51:24 +0200
commit1ad0ecea2bbdfad9b543315a0ab28abcbfb1272f (patch)
tree29ade309ab7859f49c385b1b14b77c624166f971
parent6f8ec1449197f1fcd730df91dddf6f7750284593 (diff)
downloademacs-1ad0ecea2bbdfad9b543315a0ab28abcbfb1272f.tar.gz
emacs-1ad0ecea2bbdfad9b543315a0ab28abcbfb1272f.zip
* lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Clean-up all .eln dirs.
-rw-r--r--lisp/emacs-lisp/comp.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 7f41a97f6b9..dfb945bb58d 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -3785,11 +3785,14 @@ sharing the original source filename (including FILE)."
3785 with filename-hash = (match-string 1 file) 3785 with filename-hash = (match-string 1 file)
3786 with regexp = (rx-to-string 3786 with regexp = (rx-to-string
3787 `(seq "-" ,filename-hash "-" (1+ hex) ".eln" eos)) 3787 `(seq "-" ,filename-hash "-" (1+ hex) ".eln" eos))
3788 for dir in (butlast (comp-eln-load-path-eff)) ; Skip last dir. 3788 for dir in (comp-eln-load-path-eff)
3789 do (cl-loop 3789 do (cl-loop
3790 for f in (when (file-exists-p dir) 3790 for f in (when (file-exists-p dir)
3791 (directory-files dir t regexp t)) 3791 (directory-files dir t regexp t))
3792 do (comp-delete-or-replace-file f))))) 3792 ;; We may not be able to delete the file if we have no write
3793 ;; permisison.
3794 do (ignore-error file-error
3795 (comp-delete-or-replace-file f))))))
3793 3796
3794(defun comp-delete-or-replace-file (oldfile &optional newfile) 3797(defun comp-delete-or-replace-file (oldfile &optional newfile)
3795 "Replace OLDFILE with NEWFILE. 3798 "Replace OLDFILE with NEWFILE.