+2014-01-15 Dmitry Gutov <dgutov@yandex.ru>
+
+ * emacs-lisp/package.el (package-desc-keywords): New function
+ (Bug#16222).
+ (describe-package-1, package-all-keywords)
+ (package--has-keyword-p): Use it.
+
2014-01-14 Nicolas Richard <theonewiththeevillook@yahoo.fr>
* simple.el (define-alternatives): When creating the
(unless (memq (car rest-plist) '(:kind :archive))
(let ((value (cadr rest-plist)))
(when value
- (push (cons (car rest-plist) value)
+ (push (cons (car rest-plist)
+ (if (eq (car-safe value) 'quote)
+ (cdr value)
+ value))
alist))))
(setq rest-plist (cddr rest-plist)))
alist)))))
(`tar ".tar")
(kind (error "Unknown package kind: %s" kind))))
+(defun package-desc-keywords (pkg-desc)
+ (let ((keywords (assoc :keywords (package-desc-extras pkg-desc))))
+ (if (eq (car-safe keywords) 'quote)
+ (cdr keywords)
+ keywords)))
+
;; Package descriptor format used in finder-inf.el and package--builtins.
(cl-defstruct (package--bi-desc
(:constructor package-make-builtin (version summary))
(archive (if desc (package-desc-archive desc)))
(extras (and desc (package-desc-extras desc)))
(homepage (cdr (assoc :url extras)))
- (keywords (cdr (assoc :keywords extras)))
+ (keywords (if desc (package-desc-keywords desc)))
(built-in (eq pkg-dir 'builtin))
(installable (and archive (not built-in)))
(status (if desc (package-desc-status desc) "orphan"))
(let (keywords)
(package--mapc (lambda (desc)
(let* ((extras (and desc (package-desc-extras desc)))
- (desc-keywords (cdr (assoc :keywords extras))))
+ (desc-keywords (and desc (package-desc-keywords desc))))
(setq keywords (append keywords desc-keywords)))))
keywords))
When none are given, the package matches."
(if keywords
(let* ((extras (and desc (package-desc-extras desc)))
- (desc-keywords (cdr (assoc :keywords extras)))
+ (desc-keywords (and desc (package-desc-keywords desc)))
found)
(dolist (k keywords)
(when (and (not found)