Subject: bug#39436: 27.0.60; Documentaion error for package-menu-hide-package

From: Pieter van Oostrum <[email-masked]>
Date: Sun, 09 Feb 2020 20:44:25 +0100

Eli Zaretskii <[email-masked]> writes:

>> From: Pieter van Oostrum <[email-masked]>
>> Cc: [email-masked]
>> Date: Sun, 09 Feb 2020 17:52:28 +0100
>> 
>> There are two menu entries for the operation revert-buffer (r), each with slightly different, and I would say not exactly consistent, descriptions.
>> 
>>     ["Refresh Package List" revert-buffer
>>      :help "Redownload the ELPA archive"
>>      :active (not package--downloads-in-progress)]
>>     ["Redisplay buffer" revert-buffer :help "Update the buffer with current list of packages"]
>> 
>> I guess one of them might be a legacy left-over.
>
> Looks like that.  Can you use the Git history commands to find out how
> we arrived at this situation?

This was changed in commit 0c293f1520, with a correction in d30f5e7eee, both by Stefan Kangas, as a response to bug #35504.
Before the change there were two functions:
(1) 'revert-buffer', bound to "g" and "Redisplay buffer", inherited from special-mode, via tabulated-list-mode. This reverted the buffer from the in-core data structure.
(2) package-menu-refresh, bound to 'r' and "Refresh Package List", that reloaded the package list from the archives.
The patch merged these functions into a single one, and bound it to "r", and changed the "Refresh Package List" menu entry to revert-buffer. The function is also still bound to "g" by inheritance from special-mode.
It also made 'package-menu-refresh' obsolete as an alias to 'revert-buffer'.
And it changed revert-buffer to also load the package list, by setting 'revert-buffer-function' to the internal function 'package-menu--refresh'. But the menu entry "Redisplay buffer" was not removed, and it actually is wrong now, because it doesn't conditionally activate it on '(not package--downloads-in-progress)'.
So I think this is the one that should be removed (also because it does more than just redisplaying the buffer). I think that's the only change that is necessary.
-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]