help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (call-interactively FN) leaks prefix arg into FN when called from wi


From: Göktuğ Kayaalp
Subject: Re: (call-interactively FN) leaks prefix arg into FN when called from within an interactive command
Date: Tue, 24 Apr 2018 17:10:07 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

On 2018-04-24 09:21 -04, Stefan Monnier <address@hidden> wrote:
>> So the prefix argument to gk-find-file leaks to ffap,
>
> The (interactive "P") does not *consume* the value of
> current-prefix-arg, indeed.  It just uses it to set the value of `arg`.
>
>> Is this intentional, or a bug?
>
> Neither.  It's a consecuence of the design.
>
>> But is it really the _current_ command when it's invoked by
>> call-interactively?
>
> The "current command" is defined in terms of read-eval-loop, not in
> terms of `call-interactively`.  For the same reason `call-interactively`
> does not run pre-command-hook and post-command-hook.

Thanks a lot for the explanation!

-- 
İ. Göktuğ Kayaalp       <https://www.gkayaalp.com/>
                         024C 30DD 597D 142B 49AC
                         40EB 465C D949 B101 2427



reply via email to

[Prev in Thread] Current Thread [Next in Thread]