[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 864573c 2/2: * lisp/emacs-lisp/package.el (package-
From: |
Artur Malabarba |
Subject: |
[Emacs-diffs] master 864573c 2/2: * lisp/emacs-lisp/package.el (package-all-keywords): Don't cache |
Date: |
Sat, 25 Apr 2015 16:04:11 +0000 |
branch: master
commit 864573cafeabec9ce9d79a7bb4eb60a94f303847
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>
* lisp/emacs-lisp/package.el (package-all-keywords): Don't cache
(package--all-keywords): Deleted variable.
---
lisp/emacs-lisp/package.el | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index e45d79a..f770acd 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1373,11 +1373,6 @@ it to the file."
(defvar package--downloads-in-progress nil
"List of in-progress asynchronous downloads.")
-(defvar package--all-keywords nil
- "List of known keywords.
-Generated by `package-all-keywords'. Reset to nil whenever the
-package archives are retrieved.")
-
(declare-function epg-check-configuration "epg-config"
(config &optional minimum-version))
(declare-function epg-configuration "epg-config" ())
@@ -1495,7 +1490,6 @@ downloads in the background."
(interactive)
(unless (file-exists-p package-user-dir)
(make-directory package-user-dir t))
- (setq package--all-keywords nil)
(let ((default-keyring (expand-file-name "package-keyring.gpg"
data-directory))
(package--silence async))
@@ -2570,11 +2564,11 @@ KEYWORDS should be nil or a list of keywords."
(defun package-all-keywords ()
"Collect all package keywords"
- (unless package--all-keywords
+ (let ((key-list))
(package--mapc (lambda (desc)
- (let* ((desc-keywords (and desc (package-desc--keywords
desc))))
- (setq package--all-keywords (append desc-keywords
package--all-keywords))))))
- package--all-keywords)
+ (setq key-list (append (package-desc--keywords desc)
+ key-list))))
+ key-list))
(defun package--mapc (function &optional packages)
"Call FUNCTION for all known PACKAGES.