Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit dc4c44b0 authored by Ryan C. Thompson's avatar Ryan C. Thompson

Move "el-get-clean-stale-compiled-files" before the function that uses it

parent 541782b6
......@@ -89,6 +89,27 @@ newer, then compilation is skipped."
(mapc (apply-partially 'add-to-list 'files) el-path)))
files)))
(defun el-get-clean-stale-compiled-files (dir &optional recursive)
"In DIR, delete all elc files older than their corresponding el files.
With optional arg RECURSIVE, do so in all subdirectories as well."
;; Process elc files in this dir
(let ((elc-files (directory-files dir 'full "\\.elc$")))
(loop for elc in elc-files
with el = (concat (file-name-sans-extension elc) ".el")
if (and (file-exists-p elc)
(not (file-directory-p elc))
(file-newer-than-file-p el elc))
do (progn
(message "el-get-byte-compile: Cleaning stale compiled file %S" elc)
(delete-file elc nil)))
;; Process subdirectories recursively
(when recursive
(loop for dir in (directory-files dir 'full)
if (file-directory-p dir)
unless (member* dir '("." "..") :test 'string=)
do (el-get-clean-stale-compiled-files dir recursive))))
(defun el-get-byte-compile-from-stdin ()
"byte compile files from stdin.
......@@ -140,27 +161,6 @@ whose value is a directory to be cleared of stale elc files."
:error ,(format
"el-get could not byte-compile %s" package))))
(defun el-get-clean-stale-compiled-files (dir &optional recursive)
"In DIR, delete all elc files older than their corresponding el files.
With optional arg RECURSIVE, do so in all subdirectories as well."
;; Process elc files in this dir
(let ((elc-files (directory-files dir 'full "\\.elc$")))
(loop for elc in elc-files
with el = (concat (file-name-sans-extension elc) ".el")
if (and (file-exists-p elc)
(not (file-directory-p elc))
(file-newer-than-file-p el elc))
do (progn
(message "el-get-byte-compile: Cleaning stale compiled file %S" elc)
(delete-file elc nil)))
;; Process subdirectories recursively
(when recursive
(loop for dir in (directory-files dir 'full)
if (file-directory-p dir)
unless (member* dir '("." "..") :test 'string=)
do (el-get-clean-stale-compiled-files dir recursive))))
(defun el-get-byte-compile (package)
"byte compile files for given package"
(let ((pdir (el-get-package-directory package))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment