all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sean Whitton <spwhitton@spwhitton.name>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: master a30781399b3: * subr-x (eval-command-interactive-spec): New function.
Date: Tue, 06 Jun 2023 12:18:27 +0100	[thread overview]
Message-ID: <875y80g7p8.fsf@melete.silentflame.com> (raw)
In-Reply-To: <jwvlegx9axk.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 05 Jun 2023 12:14:24 -0400")

Hello,

On Mon 05 Jun 2023 at 12:14PM -04, Stefan Monnier wrote:

>>     * subr-x (eval-command-interactive-spec): New function.
> [...]
>> +;; FIXME: How about renaming this to just `eval-interactive-spec'?
>> +;; It's not specific to the advice system.
>
> Agreed.
>
>> +(defun eval-command-interactive-spec (command)
>> +  "Evaluate COMMAND's interactive form and return resultant list.
>> +If COMMAND has no interactive form, return nil."
>> +  (advice-eval-interactive-spec
>> +   (cadr (or (and (symbolp command) (get command 'interactive-form))
>> +             (interactive-form command)))))
>
> Why the `get` business?  If we want that, it should be in
> `interactive-form`, no (and AFAICT it is there, BTW)?

I missed that interactive-form already handles this.
I've dropped it now.

> And why is that preferable over `(advice-)eval-interactive-spec`?

You mean, why is it worth factoring out

    (advice-eval-interactive-spec (cadr (interactive-form command)))

?

Well, it's indeed less worth factoring out now that you've pointed out
my mistake about interactive-form, but it seems seems worth it to me on
balance.

-- 
Sean Whitton



  reply	other threads:[~2023-06-06 11:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <168595059426.2523.2109338263713299231@vcs2.savannah.gnu.org>
     [not found] ` <20230605073635.19060C00613@vcs2.savannah.gnu.org>
2023-06-05 10:24   ` master a30781399b3: * subr-x (eval-command-interactive-spec): New function Philip Kaludercic
2023-06-06 11:10     ` Sean Whitton
2023-06-06 11:25     ` Mattias Engdegård
2023-06-05 16:14   ` Stefan Monnier
2023-06-06 11:18     ` Sean Whitton [this message]
2023-06-09 14:39       ` Stefan Monnier
2023-06-14 10:14         ` Sean Whitton
2023-06-14 20:52           ` Stefan Monnier
2023-06-16  7:12             ` Sean Whitton
2023-06-05 11:40 Eli Zaretskii
2023-06-06 11:10 ` Sean Whitton
2023-06-06 11:59   ` Eli Zaretskii
2023-06-14 10:18     ` Sean Whitton
2023-06-14 11:35       ` 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

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

  git send-email \
    --in-reply-to=875y80g7p8.fsf@melete.silentflame.com \
    --to=spwhitton@spwhitton.name \
    --cc=emacs-devel@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 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.