[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding eval-command-interactive-spec
From: |
Sean Whitton |
Subject: |
Re: Adding eval-command-interactive-spec |
Date: |
Sun, 15 Jan 2023 11:00:29 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hello,
On Tue 03 Jan 2023 at 05:41AM GMT, Sean Whitton wrote:
> I think that it would be useful to have this:
>
> (defun eval-command-interactive-spec (command)
> (advice-eval-interactive-spec
> (cadr (or (and (symbolp command) (get command 'interactive-form))
> (interactive-form command)))))
>
> but I'm not sure where it should go -- nadvice.el? subr.el? subr-x.el?
I realised after reading the commentary in subr-x that that's exactly
where it should go -- it is a complement to the C API for interactive
calls. So, here's my patch to add eval-command-interactive-spec.
Seperately, how about renaming advice-eval-interactive-spec to
eval-interactive-spec, and obsoleting, but not removing, the old name?
I guess that we'd also want to move it to subr.el; this is no promotion,
so far as I can tell, because nadvice.el is preloaded.
--
Sean Whitton
0001-subr-x-eval-command-interactive-spec-New-function.patch
Description: Text Data