[Top][All Lists]

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

Re: Apply-partially to keep interactive-form

From: Stefan Monnier
Subject: Re: Apply-partially to keep interactive-form
Date: Wed, 08 Apr 2015 09:43:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> I suggest that `apply-partially' should not discard interactive-form but
> to make it compliant with new interface.

In general, this is not possible.  When interactive-form is a string,
this could be done, but I'm not convinced it's worth the trouble.

>     (advice-add 'org-edit-src-abort :before-while
>       (apply-partially 'y-or-n-p "Are you sure?"))

y-or-n-p only takes a single argument, so (apply-partially 'y-or-n-p
"Are you sure?") can be rewritten to the simpler and more more concise:

        (lambda () (y-or-n-p "Are you sure?"))

-- Stefan

reply via email to

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