summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-11-29 15:11:38 +0100
committerAndrea Corallo <akrl@sdf.org>2020-11-29 15:11:38 +0100
commit6523b8401519a29ca0aefaf44c3dfa36f681f64e (patch)
treea691422921ad1287fdeade2128efed4c59c14e8d /lisp/emacs-lisp/bytecomp.el
parent2e0256e0a02edad129e0af1ea97b9e263c5d83fb (diff)
parent38ed05f49fcfe7c6d6908041010881a04a7ff6b1 (diff)
downloademacs-6523b8401519a29ca0aefaf44c3dfa36f681f64e.tar.gz
emacs-6523b8401519a29ca0aefaf44c3dfa36f681f64e.tar.bz2
emacs-6523b8401519a29ca0aefaf44c3dfa36f681f64e.zip
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r--lisp/emacs-lisp/bytecomp.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 532f3d1a246..28c53bf1a67 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1799,7 +1799,7 @@ Files in subdirectories of DIRECTORY are processed also."
(byte-recompile-directory directory nil t))
;;;###autoload
-(defun byte-recompile-directory (directory &optional arg force)
+(defun byte-recompile-directory (directory &optional arg force follow-symlinks)
"Recompile every `.el' file in DIRECTORY that needs recompilation.
This happens when a `.elc' file exists but is older than the `.el' file.
Files in subdirectories of DIRECTORY are processed also.
@@ -1812,7 +1812,11 @@ compile it. A nonzero ARG also means ask about each subdirectory
before scanning it.
If the third argument FORCE is non-nil, recompile every `.el' file
-that already has a `.elc' file."
+that already has a `.elc' file.
+
+This command will normally not follow symlinks when compiling
+files. If FOLLOW-SYMLINKS is non-nil, symlinked `.el' files will
+also be compiled."
(interactive "DByte recompile directory: \nP")
(if arg (setq arg (prefix-numeric-value arg)))
(if noninteractive
@@ -1845,7 +1849,8 @@ that already has a `.elc' file."
(if (file-directory-p source)
(and (not (member file '("RCS" "CVS")))
(not (eq ?\. (aref file 0)))
- (not (file-symlink-p source))
+ (or follow-symlinks
+ (not (file-symlink-p source)))
;; This file is a subdirectory. Handle them differently.
(or (null arg) (eq 0 arg)
(y-or-n-p (concat "Check " source "? ")))