aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp/loaddefs-gen.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/loaddefs-gen.el')
-rw-r--r--lisp/emacs-lisp/loaddefs-gen.el20
1 files changed, 19 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index c8e05921fc1..9e91a11204d 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -244,7 +244,25 @@ expand)' among their `declare' forms."
244 (setq expand (let ((load-true-file-name file) 244 (setq expand (let ((load-true-file-name file)
245 (load-file-name file)) 245 (load-file-name file))
246 (macroexpand form))) 246 (macroexpand form)))
247 (not (eq car (car expand))))) 247 (or (and
248 ;; Previously, macros defined in this list would not
249 ;; see their expansions processed in place of
250 ;; themselves if such an expansion did not yield a
251 ;; `progn', `prog1' or `defalias' form. Not
252 ;; reproducing these conditions results in the
253 ;; omission of minor mode variables and suchlike in
254 ;; loaddefs.el when only the defuns in the
255 ;; macroexpansions are autoloaded.
256 (not (memq car '( define-globalized-minor-mode defun defmacro
257 define-minor-mode define-inline
258 cl-defun cl-defmacro cl-defgeneric
259 cl-defstruct pcase-defmacro iter-defun cl-iter-defun
260 ;; Obsolete; keep until the alias is removed.
261 easy-mmode-define-global-mode
262 easy-mmode-define-minor-mode
263 define-global-minor-mode)))
264 (not (eq car (car expand))))
265 (memq (car expand) '(progn prog1 defalias)))))
248 ;; Recurse on the expansion. 266 ;; Recurse on the expansion.
249 (loaddefs-generate--make-autoload expand file 'expansion)) 267 (loaddefs-generate--make-autoload expand file 'expansion))
250 268