mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
Make package-menu-filter-by-status work as documented
* lisp/emacs-lisp/package.el (package-menu-filter-by-status): Work as documented (bug#49474).
This commit is contained in:
parent
3fa711c11d
commit
da7dbfdf68
2 changed files with 16 additions and 3 deletions
8
etc/NEWS
8
etc/NEWS
|
|
@ -1493,6 +1493,14 @@ This is a slightly deeper copy than the previous 'copy-sequence'.
|
|||
|
||||
** Package
|
||||
|
||||
---
|
||||
*** '/ s' ('package-menu-filter-by-status') changes parameter handling.
|
||||
The command was documented to take a comma-separated list of statuses
|
||||
to filter by, but instead it used the parameter as a regexp. The
|
||||
command has been changed so that it now works as documented, and
|
||||
checks statuses not as a regexp, but instead an exact match from the
|
||||
comma-separated list.
|
||||
|
||||
+++
|
||||
*** New command 'package-browse-url' and keystroke 'w'.
|
||||
|
||||
|
|
|
|||
|
|
@ -3954,9 +3954,14 @@ packages."
|
|||
(package--ensure-package-menu-mode)
|
||||
(if (or (not status) (string-empty-p status))
|
||||
(package-menu--generate t t)
|
||||
(package-menu--filter-by (lambda (pkg-desc)
|
||||
(string-match-p status (package-desc-status pkg-desc)))
|
||||
(format "status:%s" status))))
|
||||
(let ((status-list
|
||||
(if (listp status)
|
||||
status
|
||||
(split-string status ","))))
|
||||
(package-menu--filter-by
|
||||
(lambda (pkg-desc)
|
||||
(member (package-desc-status pkg-desc) status-list))
|
||||
(format "status:%s" (string-join status-list ","))))))
|
||||
|
||||
(defun package-menu-filter-by-version (version predicate)
|
||||
"Filter the \"*Packages*\" buffer by VERSION and PREDICATE.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue