Subject: bug#72405: 29.4; Doc string of `org-indent-mode'

From: Visuwesh <[email-masked]>
Date: Wed, 14 Aug 2024 08:09:20 +0530

[செவ்வாய் ஆகஸ்ட் 13, 2024] Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

>>> Here's a patch to make it insert "the variable " after evaluate.  But
>>> I'm not sure if (symbolp getter) will catch all non-variable cases.
>>> AFAIU, GETTER can be any generalised variable.
> [...]
>> Stefan, any comments to this suggestion?
>
> Looks OK to me.
>
>
>         Stefan

Thanks, so I've attached a properly formatted patch.

>From 535ae70653745f529742993f7fc26daf00666713 Mon Sep 17 00:00:00 2001
From: Visuwesh <[email-masked]>
Date: Wed, 14 Aug 2024 08:07:15 +0530
Subject: [PATCH] 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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 944a74a91ee..5332a3b4fcf 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -91,7 +91,7 @@ easy-mmode--arg-docstring
 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`%s'.
 
 The mode's hook is called both when the mode is enabled and when
 it is disabled.")
@@ -128,6 +128,7 @@ easy-mmode--mode-docstring
                         easy-mmode--arg-docstring
                         (if global "global " "")
                         mode-pretty-name
+                        (if (symbolp getter) "the variable " "")
                         ;; Avoid having quotes turn into pretty quotes.
                         (string-replace "'" "\\='" (format "%S" getter)))))
           (let ((start (point)))
-- 
2.45.2