From 643990336f4b5d7db13757d59479f445e59d6b3a Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 22 Aug 2022 00:37:29 +0200 Subject: [PATCH] Make *Help* display info about generalized variables * lisp/help-fns.el (help-fns--generalized-variable): New function to document generalized variables. --- lisp/help-fns.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 74e18285e64..e06f2dec5cd 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -1155,6 +1155,15 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)." (add-hook 'help-fns-describe-function-functions #'help-fns--parent-mode) (add-hook 'help-fns-describe-function-functions #'help-fns--compiler-macro 100) +(defun help-fns--generalized-variable (function) + (when (get function 'gv-expander) + (insert (format-message " `%s' is also a " function) + (buttonize "generalized variable" + (lambda (_) (info "(elisp)Generalized Variables"))) + ".\n"))) +(add-hook 'help-fns-describe-function-functions + #'help-fns--generalized-variable) + ;; Variables -- 2.39.5