diff options
author | Alan Mackenzie <acm@muc.de> | 2022-01-11 21:57:54 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2022-01-11 21:57:54 +0000 |
commit | 2128cd8c08da84ab40608ac5db0fecfce733cfad (patch) | |
tree | e295275b1a99aed2e5e0cc270f91614062c670f6 /lisp/emacs-lisp/autoload.el | |
parent | 4e77177b063f9da8a48709aa3ef416d0ac21837b (diff) | |
parent | 18dac472553e6cd1102b644c2175012e12215c18 (diff) | |
download | emacs-2128cd8c08da84ab40608ac5db0fecfce733cfad.tar.gz emacs-2128cd8c08da84ab40608ac5db0fecfce733cfad.tar.bz2 emacs-2128cd8c08da84ab40608ac5db0fecfce733cfad.zip |
Merge branch 'master' into scratch/correct-warning-pos
Diffstat (limited to 'lisp/emacs-lisp/autoload.el')
-rw-r--r-- | lisp/emacs-lisp/autoload.el | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 148fb70981f..a51fd8ca255 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -1,6 +1,6 @@ ;;; autoload.el --- maintain autoloads in loaddefs.el -*- lexical-binding: t -*- -;; Copyright (C) 1991-1997, 2001-2021 Free Software Foundation, Inc. +;; Copyright (C) 1991-1997, 2001-2022 Free Software Foundation, Inc. ;; Author: Roland McGrath <roland@gnu.org> ;; Keywords: maint @@ -32,7 +32,7 @@ (require 'lisp-mode) ;for `doc-string-elt' properties. (require 'lisp-mnt) -(eval-when-compile (require 'cl-lib)) +(require 'cl-lib) (defvar generated-autoload-file nil "File into which to write autoload definitions. @@ -393,7 +393,7 @@ FILE's name." (concat ";;; " basename " --- automatically extracted " (or type "autoloads") " -*- lexical-binding: t -*-\n" - (when (equal basename "loaddefs.el") + (when (string-match "/lisp/loaddefs\\.el\\'" file) ";; This file will be copied to ldefs-boot.el and checked in periodically.\n") ";;\n" ";;; Code:\n\n" @@ -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' |