summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorVisuwesh <visuweshm@gmail.com>2024-08-14 08:07:15 +0530
committerEli Zaretskii <eliz@gnu.org>2024-08-15 10:37:36 +0300
commited8904937ece766da57777f8a8435f5b0c95270c (patch)
tree59087ed4ffe224d693c6ec2a8cbc08b8e23bdf06 /lisp/emacs-lisp
parent505139e0bad92cd44774b0002585ae1212df11a6 (diff)
downloademacs-ed8904937ece766da57777f8a8435f5b0c95270c.tar.gz
emacs-ed8904937ece766da57777f8a8435f5b0c95270c.tar.bz2
emacs-ed8904937ece766da57777f8a8435f5b0c95270c.zip
Disambiguate minor-mode variable in its function docstring
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--arg-docstring) (easy-mmode--mode-docstring): Add "the variable" before the GETTER if it is a symbol to properly link to minor-mode variable in the *Help* buffer in the common case. (bug#72405)
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/easy-mmode.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 944a74a91ee..a140027839e 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -91,7 +91,7 @@ Enable the mode if ARG is nil, omitted, or is a positive number.
Disable the mode if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `%s'.
+evaluate %s.
The mode's hook is called both when the mode is enabled and when
it is disabled.")
@@ -128,8 +128,11 @@ it is disabled.")
easy-mmode--arg-docstring
(if global "global " "")
mode-pretty-name
- ;; Avoid having quotes turn into pretty quotes.
- (string-replace "'" "\\='" (format "%S" getter)))))
+ (concat
+ (if (symbolp getter) "the variable ")
+ (format "`%s'"
+ ;; Avoid having quotes turn into pretty quotes.
+ (string-replace "'" "\\='" (format "%S" getter)))))))
(let ((start (point)))
(insert argdoc)
(when (fboundp 'fill-region) ;Don't break bootstrap!