unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: Eli Zaretskii <eliz@gnu.org>, 66991@debbugs.gnu.org
Subject: bug#66991: Confusion in interactive-form with commands with bare interactive forms.
Date: Wed, 08 Nov 2023 07:29:10 -0500	[thread overview]
Message-ID: <jwv1qd01lmy.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <ZUtNSpB2H4pGcArQ@ACM> (Alan Mackenzie's message of "Wed, 8 Nov 2023 08:56:42 +0000")

> What about replacing (interactive "") with (interactive) too, and
> documenting this?

Why?

> The doc string says that "Return the interactive form of CMD, or nil
> ....".  But you seem to be arguing that there is no unique _THE_
> interactive form.

The interactive form is either a string or code.  When it's a string,
I expect you get the one and only `(interactive THE-STRING)`, but when
it's not a string ... well ... by definition the compiler changes the
representation of code so it's completely expected that you won't get
necessarily quite the same code (as long as its execution is equivalent).

> The doc string doesn't make this clear, and needs amending anyway.

Maybe, but I don't understand why you think it's necessary.

> To fix only the doc string rather than the code too, would double the
> doc string's size.

And this suggests we should also document `symbol-function` to say that
it may not return something identical to what you wrote in the
source code.


        Stefan






  reply	other threads:[~2023-11-08 12:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 16:38 bug#66991: Confusion in interactive-form with commands with bare interactive forms Alan Mackenzie
2023-11-07 16:49 ` Eli Zaretskii
2023-11-07 17:10   ` Alan Mackenzie
2023-11-07 17:38     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-08  8:56       ` Alan Mackenzie
2023-11-08 12:29         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-11-07 17:32   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=jwv1qd01lmy.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=66991@debbugs.gnu.org \
    --cc=acm@muc.de \
    --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).