commit 56af42b634d1c748eb4e4a03fcbd34a4c9dfaf79
parent 69f2bc0609f8017341b7c868f7ca27a00485bf3d
Author: Kisaragi Hiu <mail@kisaragi-hiu.com>
Date: Sat, 7 Jan 2023 18:28:05 +0900
Mark customizable variables (user options) in the summary line
User options are variables declared with defcustom. It is useful to
know if a variable is a user option or not, because if it isn't, it's
usually not safe to set it in the init file.
Calling user options "customizable variables" makes it clear that a
user option is still a variable. This is kind of like how interactive
functions are not referred to as "commands" in the summary.
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/helpful.el b/helpful.el
@@ -1961,6 +1961,11 @@ OBJ may be a symbol or a compiled function object."
"special form"
'helpful-info-button
'info-node "(elisp)Special Forms"))
+ (user-option-button
+ (helpful--button
+ "customizable"
+ 'helpful-info-button
+ 'info-node "(elisp)Variable Definitions"))
(keyboard-macro-button
(helpful--button
"keyboard macro"
@@ -2004,6 +2009,8 @@ OBJ may be a symbol or a compiled function object."
(if (and callable-p (commandp sym)) interactive-button)
(if compiled-p compiled-button)
(if native-compiled-p native-compiled-button)
+ (if (and (not callable-p) (custom-variable-p sym))
+ user-option-button)
(if (and (not callable-p) (local-variable-if-set-p sym))
buffer-local-button)))
(description