* 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 respectively. * etc/NEWS: Document it.
This commit is contained in:
parent
c0f5a3b335
commit
fad6b8a093
2 changed files with 13 additions and 6 deletions
|
@ -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)))
|
||||
found)
|
||||
(dolist (k keywords)
|
||||
(when (and (not found)
|
||||
(member k desc-keywords))
|
||||
(setq found t)))
|
||||
(let ((desc-keywords (and desc (package-desc--keywords desc)))
|
||||
found)
|
||||
(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)))))
|
||||
found)
|
||||
t))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue