[Top][All Lists]

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

Re: Suppress user-prompting when calling commands in programs

From: Thorsten Jolitz
Subject: Re: Suppress user-prompting when calling commands in programs
Date: Fri, 13 Jun 2014 17:18:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Nicolas Richard <address@hidden> writes:

> Thorsten Jolitz <address@hidden> writes:
>> I seem to remember that a solution for this exists, but I can't find
>> it anymore. Thanks for any hint.
> flet would work but is obsolete. See Stefan's
> for possible replacements (namely cl-letf and advising).
> OTOH, is it really not possible to change the function upstream ? "bar"
> could be made an optional argument upstream (possibly with proper
> interactive spec), or the body of the let form could be factored out as
> a function for you to use.

I tried convincing upstream before and never made it! And I actually
understand the authors of code like that and even copied that technique
sometimes, because it might be harder to write the interactive spec for
both interactive and programmatical use than to write the function
itself, and then there is no need for a wrapper command or interactive
(lambda ...) expression when it comes to define a key for that command.

But OTOH its a shame that many commands are hard/impossible to reuse in
programs because of this 'trick'. 


reply via email to

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