unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen via "Emacs development discussions." <emacs-devel@gnu.org>
To: emacs-devel@gnu.org
Cc: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Subject: Re: emacs-30 73c1252bb6b: Fix link to major mode variable in docstring
Date: Tue, 09 Jul 2024 01:26:03 +0200	[thread overview]
Message-ID: <87cynnihys.fsf@web.de> (raw)
In-Reply-To: 87bk37x4dg.fsf@posteo.net

Thierry Volpiatto <thievol@posteo.net> writes:

> Stefan Kangas <stefankangas@gmail.com> writes:
>
> > Eshel Yaron <me@eshelyaron.com> writes:
> >
> >> I think it's not always correct to say "the variable" here, because that
> >> "%s" may be replaced with a form that's not just a variable.  E.g. now
> >> C-h f global-auto-revert-mode RET says:
> >>
> >>   To check whether the minor mode is enabled in the current buffer,
> >>   evaluate the variable ‘(default-value 'global-auto-revert-mode)’.
> >
> > Thanks, you're right.  Now reverted.
>
> No, this is not right, reverting fix nothing, we are just back to previous
> bug, this is unrelated, the bug is in `easy-mmode--mode-docstring` which
> have a misleading arg called 'getter' and naturally `define-minor-mode`
> pass 'getter' to it instead of passing 'mode'.

No, this is what we want: in some cases what the user should eval to
check whether a mode is enabled is _not_ the mode variable, but some
other expression.  This is why we have that sentence!  To inform the
user about what to eval exactly.

The code receives that expression via the argument named GETTER.

Also not that in your original recipe (I just tried it), you do _not_
just get to the very same page.  Instead I get to a new help page
listing _all_ things named `...-mode' - the mode variable has been
added.

And I think this is the best behavior our current heuristic can come up
with, and in this case a minor issue.

What we could do is maybe: generate different text in the two cases
(expression is the mode variable vs. it is different), or even better,
add the text only in the "special" case where the mode variable is not
the thing to eval.


Michael.




  reply	other threads:[~2024-07-08 23:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <171956993509.30805.5525504753117432129@vcs2.savannah.gnu.org>
     [not found] ` <20240628101855.7E69DC2BC60@vcs2.savannah.gnu.org>
2024-07-08  9:34   ` emacs-30 73c1252bb6b: Fix link to major mode variable in docstring Eshel Yaron
2024-07-08 11:48     ` Stefan Kangas
2024-07-08 15:58       ` Thierry Volpiatto
2024-07-08 23:26         ` Michael Heerdegen via Emacs development discussions. [this message]
2024-07-09  0:37           ` Michael Heerdegen via Emacs development discussions.
2024-07-09  4:22         ` Thierry Volpiatto
2024-07-09  5:01           ` Michael Heerdegen via Emacs development discussions.
     [not found]             ` <87y16b3zhk.fsf@posteo.net>
     [not found]               ` <87r0c3f1a4.fsf@web.de>
2024-07-09 10:06                 ` Thierry Volpiatto

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=87cynnihys.fsf@web.de \
    --to=emacs-devel@gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=thierry.volpiatto@gmail.com \
    /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).