From: Philip Kaludercic <philipk@posteo.net>
To: Eshel Yaron <me@eshelyaron.com>
Cc: 69387@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#69387: 30.0.50; A string shouldn't be both a docstring and a return value
Date: Mon, 26 Feb 2024 14:47:28 +0000 [thread overview]
Message-ID: <87le77b7un.fsf@posteo.net> (raw)
In-Reply-To: <m1v86cxxd7.fsf@dazzs-mbp.home> (Eshel Yaron's message of "Sun, 25 Feb 2024 18:33:08 +0100")
Eshel Yaron <me@eshelyaron.com> writes:
> Hi Stefan,
>
> Stefan Monnier writes:
>
>> Package: Emacs
>> Version: 30.0.50
>>
>>
>> Currently, ELisp defines
>>
>> (lambda (blabla) "Help!")
>>
>> as a function that returns "Help!" *and* whose docstring is "Help!".
>> As seen in commit eeb89a5cb292bffe40ba7d0b0cf81f82f8452bf8, it can be
>> a source of annoyance as well.
>>
>> I cannot remember finding source code which makes use of this "feature".
>
> vc-mode kind of abuses of this feature:
>
> (defun vc-mode (&optional _arg)
> ;; Dummy function for C-h m
> "Version Control minor mode.
> This minor mode is automatically activated whenever you visit a file under
> control of one of the revision control systems in `vc-handled-backends'.
> VC commands are globally reachable under the prefix \\[vc-prefix-map]:
> \\{vc-prefix-map}")
But cases like these can be easily resolved, e.g. just by adding a nil
to the end of the body.
> Here the assumption is that the string is used as a doc string, which
> indeed leads to unexpected results, see Bug#65092.
>
>
> Best,
>
> Eshel
>
>
>
>
--
Philip Kaludercic on peregrine
next prev parent reply other threads:[~2024-02-26 14:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-25 16:29 bug#69387: 30.0.50; A string shouldn't be both a docstring and a return value Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-25 17:13 ` Eli Zaretskii
2024-02-25 18:23 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-25 17:33 ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-26 14:47 ` Philip Kaludercic [this message]
2024-02-26 17:15 ` Mattias Engdegård
2024-02-26 17:44 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-26 18:04 ` Mattias Engdegård
2024-02-26 18:17 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-26 19:06 ` Mattias Engdegård
2024-03-04 14:28 ` Mattias Engdegård
2024-03-04 14:46 ` Eli Zaretskii
2024-03-05 13:16 ` Mattias Engdegård
2024-03-05 15:38 ` Eli Zaretskii
2024-03-06 11:44 ` Mattias Engdegård
2024-03-07 14:06 ` Mattias Engdegård
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87le77b7un.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=69387@debbugs.gnu.org \
--cc=me@eshelyaron.com \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.