From 212e94c3f445ebe1388f6fab134133ebad9316d0 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 23 Sep 2022 17:58:41 +0200 Subject: [PATCH] Make loaddefs-gen register parent :groups from defcustom * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload): Also register parent :groups from `defgroup' entries (bug#58015). --- lisp/emacs-lisp/loaddefs-gen.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index 5819a26eb54..095d6b14e63 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -287,10 +287,14 @@ expression, in which case we want to handle forms differently." ;; In Emacs this is normally handled separately by cus-dep.el, but for ;; third party packages, it can be convenient to explicitly autoload ;; a group. - (let ((groupname (nth 1 form))) + (let ((groupname (nth 1 form)) + (parent (eval (plist-get form :group) t))) `(let ((loads (get ',groupname 'custom-loads))) (if (member ',file loads) nil - (put ',groupname 'custom-loads (cons ',file loads)))))) + (put ',groupname 'custom-loads (cons ',file loads)) + ,@(when parent + `((put ',parent 'custom-loads + (cons ',groupname (get ',parent 'custom-loads))))))))) ;; When processing a macro expansion, any expression ;; before a :autoload-end should be included. These are typically (put -- 2.39.2