Commit da7dbfdf authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen
Browse files

Make package-menu-filter-by-status work as documented

* lisp/emacs-lisp/package.el (package-menu-filter-by-status): Work
as documented (bug#49474).
parent 3fa711c1
Pipeline #11359 failed with stages
in 1 minute and 31 seconds
......@@ -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."
(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)
(split-string status ","))))
(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.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment