mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
* lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Clean-up all .eln dirs.
This commit is contained in:
parent
6ca6c71cd0
commit
be22cda7be
1 changed files with 5 additions and 2 deletions
|
|
@ -3776,11 +3776,14 @@ sharing the original source filename (including FILE)."
|
||||||
with filename-hash = (match-string 1 file)
|
with filename-hash = (match-string 1 file)
|
||||||
with regexp = (rx-to-string
|
with regexp = (rx-to-string
|
||||||
`(seq "-" ,filename-hash "-" (1+ hex) ".eln" eos))
|
`(seq "-" ,filename-hash "-" (1+ hex) ".eln" eos))
|
||||||
for dir in (butlast (comp-eln-load-path-eff)) ; Skip last dir.
|
for dir in (comp-eln-load-path-eff)
|
||||||
do (cl-loop
|
do (cl-loop
|
||||||
for f in (when (file-exists-p dir)
|
for f in (when (file-exists-p dir)
|
||||||
(directory-files dir t regexp t))
|
(directory-files dir t regexp t))
|
||||||
do (comp-delete-or-replace-file f)))))
|
;; We may not be able to delete de file if we have no write
|
||||||
|
;; permisison.
|
||||||
|
do (ignore-error file-error
|
||||||
|
(comp-delete-or-replace-file f))))))
|
||||||
|
|
||||||
(defun comp-delete-or-replace-file (oldfile &optional newfile)
|
(defun comp-delete-or-replace-file (oldfile &optional newfile)
|
||||||
"Replace OLDFILE with NEWFILE.
|
"Replace OLDFILE with NEWFILE.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue