unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Visuwesh <visuweshm@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Eli Zaretskii <eliz@gnu.org>,
	72405@debbugs.gnu.org, drew.adams@oracle.com
Subject: bug#72405: 29.4; Doc string of `org-indent-mode'
Date: Wed, 14 Aug 2024 08:09:20 +0530	[thread overview]
Message-ID: <87frr7zv3b.fsf@gmail.com> (raw)
In-Reply-To: <jwvv804rl9i.fsf-monnier+emacs@gnu.org> (Stefan Monnier via's message of "Tue, 13 Aug 2024 20:40:03 -0400")

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

[செவ்வாய் ஆகஸ்ட் 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Disambiguate-minor-mode-variable-in-its-function-doc.patch --]
[-- Type: text/x-diff, Size: 1472 bytes --]

From 535ae70653745f529742993f7fc26daf00666713 Mon Sep 17 00:00:00 2001
From: Visuwesh <visuweshm@gmail.com>
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


  reply	other threads:[~2024-08-14  2:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31 20:23 bug#72405: 29.4; Doc string of `org-indent-mode' Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-01  5:03 ` Eli Zaretskii
2024-08-01  5:40   ` Visuwesh
2024-08-01  5:59     ` Visuwesh
2024-08-01  6:18       ` Eli Zaretskii
2024-08-14  0:40         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-14  2:39           ` Visuwesh [this message]
2024-08-14  6:12             ` Eli Zaretskii
2024-08-14  6:38               ` Visuwesh
2024-08-14  6:48                 ` Eli Zaretskii
2024-08-14  7:27                   ` Visuwesh
2024-08-14  7:55                     ` Eli Zaretskii
2024-08-14  8:04                       ` Visuwesh
2024-08-15  7:39                         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87frr7zv3b.fsf@gmail.com \
    --to=visuweshm@gmail.com \
    --cc=72405@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).