diff options
| -rw-r--r-- | lisp/emacs-lisp/autoload.el | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 05e1c228ea7..593cdb68284 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el | |||
| @@ -683,18 +683,19 @@ directory or directories specified." | |||
| 683 | (defun batch-update-autoloads () | 683 | (defun batch-update-autoloads () |
| 684 | "Update loaddefs.el autoloads in batch mode. | 684 | "Update loaddefs.el autoloads in batch mode. |
| 685 | Calls `update-directory-autoloads' on the command line arguments." | 685 | Calls `update-directory-autoloads' on the command line arguments." |
| 686 | ;; For use during the Emacs build process only. We do the file-name | 686 | ;; For use during the Emacs build process only. |
| 687 | ;; expansion here rather than in lisp/Makefile in order to keep the | 687 | (unless autoload-excludes |
| 688 | ;; shell command line short. (Long lines are an issue on some systems.) | 688 | (let* ((ldir (file-name-directory generated-autoload-file)) |
| 689 | (if (stringp autoload-excludes) | 689 | (mfile (expand-file-name "../src/Makefile" ldir)) |
| 690 | (setq autoload-excludes | 690 | lim) |
| 691 | (mapcar | 691 | (when (file-readable-p mfile) |
| 692 | (lambda (file) | 692 | (with-temp-buffer |
| 693 | (concat | 693 | (insert-file-contents mfile) |
| 694 | (expand-file-name (file-name-sans-extension file) | 694 | (when (re-search-forward "^lisp= ") |
| 695 | (file-name-directory generated-autoload-file)) | 695 | (setq lim (line-end-position)) |
| 696 | ".el")) | 696 | (while (re-search-forward "\\${lispsource}\\([^ ]*\\)\\.elc?" lim t) |
| 697 | (split-string autoload-excludes)))) | 697 | (push (concat (expand-file-name (match-string 1) ldir) ".el") |
| 698 | autoload-excludes))))))) | ||
| 698 | (let ((args command-line-args-left)) | 699 | (let ((args command-line-args-left)) |
| 699 | (setq command-line-args-left nil) | 700 | (setq command-line-args-left nil) |
| 700 | (apply 'update-directory-autoloads args))) | 701 | (apply 'update-directory-autoloads args))) |