Commit fad6b8a0 authored by Artur Malabarba's avatar Artur Malabarba

* lisp/emacs-lisp/package.el: Make archive and status pseudo-keywords

(package--has-keyword-p): Understand "arc:xxxx" and "status:xxxx"
as special keywords which match agains package archive and status

* etc/NEWS: Document it.
parent c0f5a3b3
......@@ -238,6 +238,11 @@ in the surrounding GUI (using the OSC-52 escape sequence).
** xterm-mouse-mode now supports mouse-tracking (if your xterm supports it).
** package.el
*** When filtering the package menu, keywords starting with "arc:" or
"status:" represent package archive or status, respectively, instead
of actual keywords.
*** Most functions which involve downloading information now take an
ASYNC argument. If it is non-nil, package.el performs the download(s)
......@@ -2535,12 +2535,14 @@ Built-in packages are converted with `package--from-builtin'."
"Test if package DESC has any of the given KEYWORDS.
When none are given, the package matches."
(if keywords
(let* ((desc-keywords (and desc (package-desc--keywords desc)))
(dolist (k keywords)
(when (and (not found)
(member k desc-keywords))
(setq found t)))
(let ((desc-keywords (and desc (package-desc--keywords desc)))
(while (and (not found) keywords)
(let ((k (pop keywords)))
(setq found
(or (string= k (concat "arc:" (package-desc-archive desc)))
(string= k (concat "status:" (package-desc-status desc)))
(member k desc-keywords)))))
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