emacs-devel
[Top][All Lists]
Advanced

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

Re: Brittleness of called-interactively-p


From: Stefan Monnier
Subject: Re: Brittleness of called-interactively-p
Date: Fri, 07 Aug 2015 13:18:16 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> Exactly, see above. I thought that may be it is better to associate
> interactive form with function symbol rather than with function itself.

That'd be a major change.

> Yes, indeed, and this method is described in the doc string of
> called-interactively-p. This means however that one odd argument is added to
> the function interface which plays only technical role.

That's one way to look at it.  The way I look at it, instead, is that
this extra argument is just as important as the others and that it
shouldn't be called `called-interactively' or `interactive' but instead
it should have a name that describes how it affects the behavior of the
command, e.g. `emit-message' if it is used to decide whether or not to
call `message'.

> And also advices which need this information will have to modify the
> argument list of the original function if it does not provide
> it already.

By default advices preserve all arguments already, so that's
no problem.  The novelty is that advices can now decide whether the
inner function will behave as if called interactively or not.


        Stefan



reply via email to

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