From 2c7b08d417e10ca3512c0d6bebc853955e08c94b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 16 Sep 2025 10:50:14 -0400 Subject: [PATCH] Revert "Fix generation of defvars defined by easy-mmode and company in loaddefs.el" This reverts commit e9800cabffa73018a83108de2bb4e1686f1e8385. AFAICT that commit had no effect but it re-introduces some magic constants in the code that we'd like to eliminate. We presume it was a misunderstanding, trying to fix a transient problem which a bootstrap would have fixed. See https://lists.gnu.org/archive/html/emacs-devel/2025-08/msg00716.html and https://lists.gnu.org/archive/html/emacs-devel/2025-09/msg00109.html --- lisp/emacs-lisp/loaddefs-gen.el | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index 9e91a11204d..c8e05921fc1 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -244,25 +244,7 @@ expand)' among their `declare' forms." (setq expand (let ((load-true-file-name file) (load-file-name file)) (macroexpand form))) - (or (and - ;; Previously, macros defined in this list would not - ;; see their expansions processed in place of - ;; themselves if such an expansion did not yield a - ;; `progn', `prog1' or `defalias' form. Not - ;; reproducing these conditions results in the - ;; omission of minor mode variables and suchlike in - ;; loaddefs.el when only the defuns in the - ;; macroexpansions are autoloaded. - (not (memq car '( define-globalized-minor-mode defun defmacro - define-minor-mode define-inline - cl-defun cl-defmacro cl-defgeneric - cl-defstruct pcase-defmacro iter-defun cl-iter-defun - ;; Obsolete; keep until the alias is removed. - easy-mmode-define-global-mode - easy-mmode-define-minor-mode - define-global-minor-mode))) - (not (eq car (car expand)))) - (memq (car expand) '(progn prog1 defalias))))) + (not (eq car (car expand))))) ;; Recurse on the expansion. (loaddefs-generate--make-autoload expand file 'expansion))