emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-30 ed8904937ec: Disambiguate minor-mode variable in its function d


From: Eli Zaretskii
Subject: emacs-30 ed8904937ec: Disambiguate minor-mode variable in its function docstring
Date: Thu, 15 Aug 2024 03:38:42 -0400 (EDT)

branch: emacs-30
commit ed8904937ece766da57777f8a8435f5b0c95270c
Author: Visuwesh <visuweshm@gmail.com>
Commit: Eli Zaretskii <eliz@gnu.org>

    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)
---
 lisp/emacs-lisp/easy-mmode.el | 9 ++++++---
 1 file 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!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]