1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

Let loaddefs.el adjust to changes in autoload-excludes (bug#5162).

* emacs-lisp/autoload.el (autoload-generate-file-autoloads):
Disregard autoload-excludes.
(update-directory-autoloads): Obey autoload-excludes here instead.
But don't store its contents in no-autoloads and remove entries that
refer to excludes files.
This commit is contained in:
Stefan Monnier 2009-12-10 08:46:54 +00:00
parent 8c0171c0ee
commit 1c67aeaafb
2 changed files with 17 additions and 6 deletions

View file

@ -1,3 +1,12 @@
2009-12-10 Stefan Monnier <monnier@iro.umontreal.ca>
Let loaddefs.el adjust to changes in autoload-excludes (bug#5162).
* emacs-lisp/autoload.el (autoload-generate-file-autoloads):
Disregard autoload-excludes.
(update-directory-autoloads): Obey autoload-excludes here instead.
But don't store its contents in no-autoloads and remove entries that
refer to excludes files.
2009-12-10 Glenn Morris <rgm@gnu.org> 2009-12-10 Glenn Morris <rgm@gnu.org>
* mail/feedmail.el (top-level): Move require 'mail-utils to start. * mail/feedmail.el (top-level): Move require 'mail-utils to start.

View file

@ -372,8 +372,6 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE
relfile relfile
;; nil until we found a cookie. ;; nil until we found a cookie.
output-start) output-start)
(if (member absfile autoload-excludes)
(message "Generating autoloads for %s...skipped" file)
(with-current-buffer (or visited (with-current-buffer (or visited
;; It is faster to avoid visiting the file. ;; It is faster to avoid visiting the file.
(autoload-find-file file)) (autoload-find-file file))
@ -482,7 +480,7 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE
(message "Generating autoloads for %s...done" file)) (message "Generating autoloads for %s...done" file))
(or visited (or visited
;; We created this buffer, so we should kill it. ;; We created this buffer, so we should kill it.
(kill-buffer (current-buffer))))) (kill-buffer (current-buffer))))
;; If the entries were added to some other buffer, then the file ;; If the entries were added to some other buffer, then the file
;; doesn't add entries to OUTFILE. ;; doesn't add entries to OUTFILE.
(or (not output-start) otherbuf)))) (or (not output-start) otherbuf))))
@ -638,7 +636,9 @@ directory or directories specified."
((not (stringp file))) ((not (stringp file)))
((or (not (file-exists-p file)) ((or (not (file-exists-p file))
;; Remove duplicates as well, just in case. ;; Remove duplicates as well, just in case.
(member file done)) (member file done)
;; If the file is actually excluded.
(member (expand-file-name file) autoload-excludes))
;; Remove the obsolete section. ;; Remove the obsolete section.
(autoload-remove-section (match-beginning 0))) (autoload-remove-section (match-beginning 0)))
((not (time-less-p (nth 4 form) ((not (time-less-p (nth 4 form)
@ -654,8 +654,10 @@ directory or directories specified."
(setq files (delete file files))))) (setq files (delete file files)))))
;; Elements remaining in FILES have no existing autoload sections yet. ;; Elements remaining in FILES have no existing autoload sections yet.
(dolist (file files) (dolist (file files)
(if (autoload-generate-file-autoloads file nil buffer-file-name) (cond
(push file no-autoloads))) ((member (expand-file-name file) autoload-excludes) nil)
((autoload-generate-file-autoloads file nil buffer-file-name)
(push file no-autoloads))))
(when no-autoloads (when no-autoloads
;; Sort them for better readability. ;; Sort them for better readability.