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)
This commit is contained in:
parent
505139e0ba
commit
ed8904937e
1 changed files with 6 additions and 3 deletions
|
@ -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.
|
Disable the mode if ARG is a negative number.
|
||||||
|
|
||||||
To check whether the minor mode is enabled in the current buffer,
|
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
|
The mode's hook is called both when the mode is enabled and when
|
||||||
it is disabled.")
|
it is disabled.")
|
||||||
|
@ -128,8 +128,11 @@ it is disabled.")
|
||||||
easy-mmode--arg-docstring
|
easy-mmode--arg-docstring
|
||||||
(if global "global " "")
|
(if global "global " "")
|
||||||
mode-pretty-name
|
mode-pretty-name
|
||||||
;; Avoid having quotes turn into pretty quotes.
|
(concat
|
||||||
(string-replace "'" "\\='" (format "%S" getter)))))
|
(if (symbolp getter) "the variable ")
|
||||||
|
(format "`%s'"
|
||||||
|
;; Avoid having quotes turn into pretty quotes.
|
||||||
|
(string-replace "'" "\\='" (format "%S" getter)))))))
|
||||||
(let ((start (point)))
|
(let ((start (point)))
|
||||||
(insert argdoc)
|
(insert argdoc)
|
||||||
(when (fboundp 'fill-region) ;Don't break bootstrap!
|
(when (fboundp 'fill-region) ;Don't break bootstrap!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue