[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: |
Mon, 04 Feb 2013 14:44:54 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> 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
bug#13625: Rép : bug#13625: 24.1; Enable 'package-menu-execute being non-interactive, Yves Baumes, 2013/02/05