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

From: Stefan Monnier <[email-masked]>
Date: Sun, 03 Feb 2013 22:39:43 -0500

> 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.

        Stefan