summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorYuuki Harano <masm+github@masm11.me>2020-11-29 02:12:15 +0900
committerYuuki Harano <masm+github@masm11.me>2020-11-29 02:12:15 +0900
commitd46a223d8595e8edb67c6361033625797503cacf (patch)
treecf7e27daa93bfd05663dbbb2555b4682843ed40f /lisp/emacs-lisp/bytecomp.el
parent62abc054041a592ca617ab228d61469dd7923a3f (diff)
parent769dc33df7ec9ac81aa52c336d2a61c32ddbd50f (diff)
downloademacs-d46a223d8595e8edb67c6361033625797503cacf.tar.gz
emacs-d46a223d8595e8edb67c6361033625797503cacf.tar.bz2
emacs-d46a223d8595e8edb67c6361033625797503cacf.zip
Merge branch 'master' into feature/pgtk
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 e6f6a12b53d..9ece8ec6f02 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1746,7 +1746,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.
@@ -1759,7 +1759,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
@@ -1792,7 +1796,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 "? ")))