Hi all,
when a transaction involves different operations, current
`package-menu--prompt-transaction-p' shows prompts like
Delete package ‘x’; and Upgrade these 2 packages (y, z)?
or
Delete package ‘x’; Install package ‘y’; and Upgrade these 2 packages (w, z)?
that IMHO are a bit inelegant.
I hacked it to the following definition
(defun package-menu--prompt-transaction-p (delete install upgrade)
"Prompt the user about DELETE, INSTALL, and UPGRADE.
DELETE, INSTALL, and UPGRADE are lists of `package-desc' objects.
Either may be nil, but not all."
(y-or-n-p
(concat
(when delete "Delete ")
(package-menu--list-to-prompt delete)
(if (and delete install)
(if upgrade ", install " " and install ")
(when install "Install "))
(package-menu--list-to-prompt install)
(if (and upgrade (or install delete))
" and upgrade "
(when upgrade "Upgrade "))
(package-menu--list-to-prompt upgrade)
"? ")))
that shows instead
Delete package ‘x’ and upgrade these 2 packages (y, z)?
or
Delete package ‘x’, install package ‘y’ and upgrade these 2 packages (w, z)?
What do you think?
Kaushal Modi