diff options
| author | Chris Feng | 2016-07-13 19:52:10 +0800 |
|---|---|---|
| committer | Chris Feng | 2016-07-13 19:58:10 +0800 |
| commit | 96bd07a3226700156fa7d5ec20e9bd6550c95057 (patch) | |
| tree | 5c05306f25707667897f8e94734095f2c471239d | |
| parent | a36ed9b5e95afea5716256bac24d883263aefbaf (diff) | |
| download | emacs-96bd07a3226700156fa7d5ec20e9bd6550c95057.tar.gz emacs-96bd07a3226700156fa7d5ec20e9bd6550c95057.zip | |
Include versioned preloaded libraries in `package--builtin-versions'
* lisp/emacs-lisp/autoload.el (update-directory-autoloads): Do not
exclude preloaded libraries or remove entries generated for them.
(autoload-generate-file-autoloads): Do not generate autoload
statements for preloaded libraries.
| -rw-r--r-- | lisp/emacs-lisp/autoload.el | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 6473e31e56e..fbb08fc3268 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el | |||
| @@ -736,20 +736,22 @@ FILE's modification time." | |||
| 736 | package--builtin-versions)) | 736 | package--builtin-versions)) |
| 737 | (princ "\n"))))) | 737 | (princ "\n"))))) |
| 738 | 738 | ||
| 739 | (goto-char (point-min)) | 739 | ;; Do not insert autoload entries for excluded files. |
| 740 | (while (not (eobp)) | 740 | (unless (member absfile autoload-excludes) |
| 741 | (skip-chars-forward " \t\n\f") | 741 | (goto-char (point-min)) |
| 742 | (cond | 742 | (while (not (eobp)) |
| 743 | ((looking-at (regexp-quote generate-autoload-cookie)) | 743 | (skip-chars-forward " \t\n\f") |
| 744 | ;; If not done yet, figure out where to insert this text. | 744 | (cond |
| 745 | (unless output-start | 745 | ((looking-at (regexp-quote generate-autoload-cookie)) |
| 746 | (setq output-start (autoload--setup-output | 746 | ;; If not done yet, figure out where to insert this text. |
| 747 | otherbuf outbuf absfile load-name))) | 747 | (unless output-start |
| 748 | (autoload--print-cookie-text output-start load-name file)) | 748 | (setq output-start (autoload--setup-output |
| 749 | ((looking-at ";") | 749 | otherbuf outbuf absfile load-name))) |
| 750 | ;; Don't read the comment. | 750 | (autoload--print-cookie-text output-start load-name file)) |
| 751 | (forward-line 1)) | 751 | ((looking-at ";") |
| 752 | (t | 752 | ;; Don't read the comment. |
| 753 | (forward-line 1)) | ||
| 754 | (t | ||
| 753 | ;; Avoid (defvar <foo>) by requiring a trailing space. | 755 | ;; Avoid (defvar <foo>) by requiring a trailing space. |
| 754 | ;; Also, ignore this prefix business | 756 | ;; Also, ignore this prefix business |
| 755 | ;; for ;;;###tramp-autoload and friends. | 757 | ;; for ;;;###tramp-autoload and friends. |
| @@ -767,8 +769,8 @@ FILE's modification time." | |||
| 767 | "define-erc-response-handler" | 769 | "define-erc-response-handler" |
| 768 | "defun-rcirc-command")))) | 770 | "defun-rcirc-command")))) |
| 769 | (push (match-string 2) defs)) | 771 | (push (match-string 2) defs)) |
| 770 | (forward-sexp 1) | 772 | (forward-sexp 1) |
| 771 | (forward-line 1)))))) | 773 | (forward-line 1))))))) |
| 772 | 774 | ||
| 773 | (when (and autoload-compute-prefixes defs) | 775 | (when (and autoload-compute-prefixes defs) |
| 774 | ;; This output needs to always go in the main loaddefs.el, | 776 | ;; This output needs to always go in the main loaddefs.el, |
| @@ -1058,9 +1060,7 @@ write its autoloads into the specified file instead." | |||
| 1058 | ((not (stringp file))) | 1060 | ((not (stringp file))) |
| 1059 | ((or (not (file-exists-p file)) | 1061 | ((or (not (file-exists-p file)) |
| 1060 | ;; Remove duplicates as well, just in case. | 1062 | ;; Remove duplicates as well, just in case. |
| 1061 | (member file done) | 1063 | (member file done)) |
| 1062 | ;; If the file is actually excluded. | ||
| 1063 | (member (expand-file-name file) autoload-excludes)) | ||
| 1064 | ;; Remove the obsolete section. | 1064 | ;; Remove the obsolete section. |
| 1065 | (setq changed t) | 1065 | (setq changed t) |
| 1066 | (autoload-remove-section (match-beginning 0))) | 1066 | (autoload-remove-section (match-beginning 0))) |
| @@ -1086,7 +1086,6 @@ write its autoloads into the specified file instead." | |||
| 1086 | (let ((no-autoloads-time (or last-time '(0 0 0 0))) file-time) | 1086 | (let ((no-autoloads-time (or last-time '(0 0 0 0))) file-time) |
| 1087 | (dolist (file files) | 1087 | (dolist (file files) |
| 1088 | (cond | 1088 | (cond |
| 1089 | ((member (expand-file-name file) autoload-excludes) nil) | ||
| 1090 | ;; Passing nil as second argument forces | 1089 | ;; Passing nil as second argument forces |
| 1091 | ;; autoload-generate-file-autoloads to look for the right | 1090 | ;; autoload-generate-file-autoloads to look for the right |
| 1092 | ;; spot where to insert each autoloads section. | 1091 | ;; spot where to insert each autoloads section. |