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

From: Stefan Monnier <[email-masked]>
Date: Mon, 04 Feb 2013 14:44:54 -0500

> I've found that whatever you do, an interactive call provide a numeric
> value of '1'.  Reading the Emacs Lisp Reference Manual, I didn't find
> a way to negate the boolean value with `interactive'.

But since it's an optional parameter, you can just not provide it, in
which case it defaults to nil.

> -(defun package-menu-execute ()
> +(defun package-menu-execute (&optional prompt-user)
                                          ^^^^^^^^^^^
                                          dont-query

>    "Perform marked Package Menu actions.
>  Packages marked for installation are downloaded and installed;
>  packages marked for deletion are removed."
> -  (interactive)
> +  (interactive "p")

Leave it as (interactive) which will not provide any argument, so
dont-query will be nil for interactive calls. And for your own calls,
you can pass a non-nil argument.

        Stefan