Function: package--has-keyword-p

package--has-keyword-p is a byte-compiled function defined in package.el.gz.

Signature

(package--has-keyword-p DESC &optional KEYWORDS)

Documentation

Test if package DESC has any of the given KEYWORDS.

When none are given, the package matches.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/package.el.gz
(defun package--has-keyword-p (desc &optional keywords)
  "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)
        (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))