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.
This commit is contained in:
Lars Ingebrigtsen 2021-12-01 03:55:17 +01:00
parent 541f61b378
commit 1f9834cd76

View file

@ -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'