From 1bddeeed51b41007fe4f84d624e30a367bad2bb8 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 30 Nov 2005 16:04:40 +0000 Subject: [PATCH] (make-autoload): Handle defgroup specially. --- lisp/ChangeLog | 2 ++ lisp/emacs-lisp/autoload.el | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 104ca5c1622..4fb2cdf5ebe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2005-11-30 Stefan Monnier + * emacs-lisp/autoload.el (make-autoload): Handle defgroup specially. + * help-fns.el (help-argument-name): Don't autoload. It's useless and triggers a bug in cus-dep.el causing ldefs-boot to be re-loaded when customizing the `help' group. diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index ff795e6de77..2356483b233 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -135,6 +135,15 @@ or macro definition or a defcustom)." (if (equal setter ''custom-set-minor-mode) `(put ',varname 'custom-set 'custom-set-minor-mode)))))) + ((eq car 'defgroup) + ;; 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 ((loads (get ',groupname 'custom-loads))) + (if (member ',file loads) nil + (put ',groupname 'custom-loads (cons ',file loads)))))) + ;; nil here indicates that this is not a special autoload form. (t nil)))) -- 2.39.5