aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-10-06 03:12:32 +0000
committerGlenn Morris2009-10-06 03:12:32 +0000
commita0436952b5ca91a61e1712640a2a6da659ec9ead (patch)
tree5f7e0f7656a034a97bcdf63164e8fe24a2f386a2
parent683fa532dbf39c6a4ca7bfb8c46511b06e5107b7 (diff)
downloademacs-a0436952b5ca91a61e1712640a2a6da659ec9ead.tar.gz
emacs-a0436952b5ca91a61e1712640a2a6da659ec9ead.zip
(autoload-excludes): New variable.
(autoload-generate-file-autoloads): Skip files in autoload-excludes. (batch-update-autoloads): Process a string value of autoload-excludes, set during the build process.
-rw-r--r--lisp/emacs-lisp/autoload.el20
1 files changed, 18 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index fc5b3081a6d..05e1c228ea7 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -70,6 +70,9 @@ If this string appears alone on a line, the following form will be
70read and an autoload made for it. If there is further text on the line, 70read and an autoload made for it. If there is further text on the line,
71that text will be copied verbatim to `generated-autoload-file'.") 71that text will be copied verbatim to `generated-autoload-file'.")
72 72
73(defvar autoload-excludes nil
74 "If non-nil, list of absolute file names not to scan for autoloads.")
75
73(defconst generate-autoload-section-header "\f\n;;;### " 76(defconst generate-autoload-section-header "\f\n;;;### "
74 "String that marks the form at the start of a new file's autoload section.") 77 "String that marks the form at the start of a new file's autoload section.")
75 78
@@ -373,7 +376,8 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE
373 relfile 376 relfile
374 ;; nil until we found a cookie. 377 ;; nil until we found a cookie.
375 output-start) 378 output-start)
376 379 (if (member absfile autoload-excludes)
380 (message "Generating autoloads for %s...skipped" file)
377 (with-current-buffer (or visited 381 (with-current-buffer (or visited
378 ;; It is faster to avoid visiting the file. 382 ;; It is faster to avoid visiting the file.
379 (autoload-find-file file)) 383 (autoload-find-file file))
@@ -482,7 +486,7 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE
482 (message "Generating autoloads for %s...done" file)) 486 (message "Generating autoloads for %s...done" file))
483 (or visited 487 (or visited
484 ;; We created this buffer, so we should kill it. 488 ;; We created this buffer, so we should kill it.
485 (kill-buffer (current-buffer)))) 489 (kill-buffer (current-buffer)))))
486 ;; If the entries were added to some other buffer, then the file 490 ;; If the entries were added to some other buffer, then the file
487 ;; doesn't add entries to OUTFILE. 491 ;; doesn't add entries to OUTFILE.
488 (or (not output-start) otherbuf)))) 492 (or (not output-start) otherbuf))))
@@ -679,6 +683,18 @@ directory or directories specified."
679(defun batch-update-autoloads () 683(defun batch-update-autoloads ()
680 "Update loaddefs.el autoloads in batch mode. 684 "Update loaddefs.el autoloads in batch mode.
681Calls `update-directory-autoloads' on the command line arguments." 685Calls `update-directory-autoloads' on the command line arguments."
686 ;; For use during the Emacs build process only. We do the file-name
687 ;; expansion here rather than in lisp/Makefile in order to keep the
688 ;; shell command line short. (Long lines are an issue on some systems.)
689 (if (stringp autoload-excludes)
690 (setq autoload-excludes
691 (mapcar
692 (lambda (file)
693 (concat
694 (expand-file-name (file-name-sans-extension file)
695 (file-name-directory generated-autoload-file))
696 ".el"))
697 (split-string autoload-excludes))))
682 (let ((args command-line-args-left)) 698 (let ((args command-line-args-left))
683 (setq command-line-args-left nil) 699 (setq command-line-args-left nil)
684 (apply 'update-directory-autoloads args))) 700 (apply 'update-directory-autoloads args)))