diff options
author | Visuwesh <visuweshm@gmail.com> | 2024-08-14 08:07:15 +0530 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2024-08-15 10:37:36 +0300 |
commit | ed8904937ece766da57777f8a8435f5b0c95270c (patch) | |
tree | 59087ed4ffe224d693c6ec2a8cbc08b8e23bdf06 /lisp/emacs-lisp | |
parent | 505139e0bad92cd44774b0002585ae1212df11a6 (diff) | |
download | emacs-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.el | 9 |
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! |