From: Lars Ingebrigtsen Date: Fri, 23 Sep 2022 15:58:41 +0000 (+0200) Subject: Make loaddefs-gen register parent :groups from defcustom X-Git-Tag: emacs-29.0.90~1856^2~290 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=212e94c3f445ebe1388f6fab134133ebad9316d0;p=emacs.git 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). --- 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