Mercurial > emacs
comparison lisp/emacs-lisp/autoload.el @ 106519:ee0a7551c875
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.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 10 Dec 2009 08:46:54 +0000 |
parents | 544761863e24 |
children | 2a684c6f926c |
comparison
equal
deleted
inserted
replaced
106518:c22556bde650 | 106519:ee0a7551c875 |
---|---|
370 (otherbuf nil) | 370 (otherbuf nil) |
371 (absfile (expand-file-name file)) | 371 (absfile (expand-file-name file)) |
372 relfile | 372 relfile |
373 ;; nil until we found a cookie. | 373 ;; nil until we found a cookie. |
374 output-start) | 374 output-start) |
375 (if (member absfile autoload-excludes) | |
376 (message "Generating autoloads for %s...skipped" file) | |
377 (with-current-buffer (or visited | 375 (with-current-buffer (or visited |
378 ;; It is faster to avoid visiting the file. | 376 ;; It is faster to avoid visiting the file. |
379 (autoload-find-file file)) | 377 (autoload-find-file file)) |
380 ;; Obey the no-update-autoloads file local variable. | 378 ;; Obey the no-update-autoloads file local variable. |
381 (unless no-update-autoloads | 379 (unless no-update-autoloads |
480 (insert ";;; Generated autoloads from " relfile "\n")) | 478 (insert ";;; Generated autoloads from " relfile "\n")) |
481 (insert generate-autoload-section-trailer)))) | 479 (insert generate-autoload-section-trailer)))) |
482 (message "Generating autoloads for %s...done" file)) | 480 (message "Generating autoloads for %s...done" file)) |
483 (or visited | 481 (or visited |
484 ;; We created this buffer, so we should kill it. | 482 ;; We created this buffer, so we should kill it. |
485 (kill-buffer (current-buffer))))) | 483 (kill-buffer (current-buffer)))) |
486 ;; If the entries were added to some other buffer, then the file | 484 ;; If the entries were added to some other buffer, then the file |
487 ;; doesn't add entries to OUTFILE. | 485 ;; doesn't add entries to OUTFILE. |
488 (or (not output-start) otherbuf)))) | 486 (or (not output-start) otherbuf)))) |
489 | 487 |
490 (defun autoload-save-buffers () | 488 (defun autoload-save-buffers () |
636 (push file no-autoloads) | 634 (push file no-autoloads) |
637 (setq files (delete file files))))))) | 635 (setq files (delete file files))))))) |
638 ((not (stringp file))) | 636 ((not (stringp file))) |
639 ((or (not (file-exists-p file)) | 637 ((or (not (file-exists-p file)) |
640 ;; Remove duplicates as well, just in case. | 638 ;; Remove duplicates as well, just in case. |
641 (member file done)) | 639 (member file done) |
640 ;; If the file is actually excluded. | |
641 (member (expand-file-name file) autoload-excludes)) | |
642 ;; Remove the obsolete section. | 642 ;; Remove the obsolete section. |
643 (autoload-remove-section (match-beginning 0))) | 643 (autoload-remove-section (match-beginning 0))) |
644 ((not (time-less-p (nth 4 form) | 644 ((not (time-less-p (nth 4 form) |
645 (nth 5 (file-attributes file)))) | 645 (nth 5 (file-attributes file)))) |
646 ;; File hasn't changed. | 646 ;; File hasn't changed. |
652 (push file no-autoloads)))) | 652 (push file no-autoloads)))) |
653 (push file done) | 653 (push file done) |
654 (setq files (delete file files))))) | 654 (setq files (delete file files))))) |
655 ;; Elements remaining in FILES have no existing autoload sections yet. | 655 ;; Elements remaining in FILES have no existing autoload sections yet. |
656 (dolist (file files) | 656 (dolist (file files) |
657 (if (autoload-generate-file-autoloads file nil buffer-file-name) | 657 (cond |
658 (push file no-autoloads))) | 658 ((member (expand-file-name file) autoload-excludes) nil) |
659 ((autoload-generate-file-autoloads file nil buffer-file-name) | |
660 (push file no-autoloads)))) | |
659 | 661 |
660 (when no-autoloads | 662 (when no-autoloads |
661 ;; Sort them for better readability. | 663 ;; Sort them for better readability. |
662 (setq no-autoloads (sort no-autoloads 'string<)) | 664 (setq no-autoloads (sort no-autoloads 'string<)) |
663 ;; Add the `no-autoloads' section. | 665 ;; Add the `no-autoloads' section. |