[Top][All Lists]

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

bug#13625: 24.1; Enable 'package-menu-execute being non-interactive

From: Stefan Monnier
Subject: bug#13625: 24.1; Enable 'package-menu-execute being non-interactive
Date: Sun, 03 Feb 2013 22:39:43 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> Well, from my point of view the implementation must be silent when
> called non interactively.

As a general rule, I tend to agree.

> Here is a modification that I made that suit my needs:

> (defun package-menu-execute ()
> ...
>     (when install-list
>       (if (or
>            (not (called-interactively-p 'any))
>            (yes-or-no-p
> ...
>     ;; Delete packages, prompting if necessary.
>     (when delete-list
>       (if (or
>            (not (called-interactively-p 'any))
>            (yes-or-no-p
> ...

Better would be to move those questions to the `interactive' spec, so
you don't even need called-interactively-p.

But you'd also want to check if there are callers of this function that
would need to be adjusted.


reply via email to

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