summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-12-01 03:55:17 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-12-01 04:55:18 +0100
commit1f9834cd764fb89d01afca096068034acbf2c79d (patch)
tree4b80baa3459f1efbba3b83db0c0a2b60aa43007c
parent541f61b378eca85fa118caff5ad97b56171baa98 (diff)
downloademacs-1f9834cd764fb89d01afca096068034acbf2c79d.tar.gz
Don't include the other loaddef files in the no-autoloads section
* lisp/emacs-lisp/autoload.el (make-directory-autoloads): Don't include the other loaddef files in the no-autoloads section.
-rw-r--r--lisp/emacs-lisp/autoload.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 23fb4002499..5857aa55717 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -1196,9 +1196,17 @@ directory or directories specified."
(goto-char (point-max))
(search-backward "\f" nil t)
(autoload-insert-section-header
- (current-buffer) nil nil no-autoloads (if autoload-timestamps
- no-autoloads-time
- autoload--non-timestamp))
+ (current-buffer) nil nil
+ ;; Filter out the other loaddefs files, because it makes
+ ;; the list unstable (and leads to spurious changes in
+ ;; ldefs-boot.el) since the loaddef files can be created in
+ ;; any order.
+ (seq-filter (lambda (file)
+ (not (string-match-p "[/-]loaddefs.el" file)))
+ no-autoloads)
+ (if autoload-timestamps
+ no-autoloads-time
+ autoload--non-timestamp))
(insert generate-autoload-section-trailer)))
;; Don't modify the file if its content has not been changed, so `make'