Function: comp-clean-up-stale-eln

comp-clean-up-stale-eln is an autoloaded and byte-compiled function defined in comp.el.gz.

Signature

(comp-clean-up-stale-eln FILE)

Documentation

Remove all FILE*.eln* files found in native-comp-eln-load-path.

The files to be removed are those produced from the original source filename (including FILE).

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/comp.el.gz
;; Some entry point support code.

;;;###autoload
(defun comp-clean-up-stale-eln (file)
  "Remove all FILE*.eln* files found in `native-comp-eln-load-path'.
The files to be removed are those produced from the original source
filename (including FILE)."
  (when (string-match (rx "-" (group-n 1 (1+ hex)) "-" (1+ hex) ".eln" eos)
                      file)
    (cl-loop
     with filename-hash = (match-string 1 file)
     with regexp = (rx-to-string
                    `(seq "-" ,filename-hash "-" (1+ hex) ".eln" eos))
     for dir in (comp-eln-load-path-eff)
     do (cl-loop
         for f in (when (file-exists-p dir)
		    (directory-files dir t regexp t))
         ;; We may not be able to delete the file if we have no write
         ;; permission.
         do (ignore-error file-error
              (comp-delete-or-replace-file f))))))