summaryrefslogtreecommitdiff
path: root/ebib-keywords.el
diff options
context:
space:
mode:
authorJoost Kremers <joost@IdeaPad>2015-09-27 23:36:01 +0200
committerJoost Kremers <joost@IdeaPad>2015-09-27 23:36:01 +0200
commit1b95f439e88955cd9c391fe0f8e5b7ac34329e2a (patch)
treeb99b9fca73f5e61b5dbe4ce505a200f9cedd61e7 /ebib-keywords.el
parent4a085df1888e6fd59bc885146d40eded6f78973d (diff)
Replace `add-to-list` with `push`
Diffstat (limited to 'ebib-keywords.el')
-rw-r--r--ebib-keywords.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/ebib-keywords.el b/ebib-keywords.el
index ac9dab9..6e587db 100644
--- a/ebib-keywords.el
+++ b/ebib-keywords.el
@@ -119,14 +119,14 @@ Also automatically remove duplicates."
(let ((keyword-list (ebib--read-file-to-list (concat dir ebib-keywords-file))))
;; note: even if keyword-list is empty, we store it, because the user
;; may subsequently add keywords.
- (add-to-list 'ebib--keywords-files-alist ; add the dir if not in the list yet
- (list dir keyword-list nil) ; the extra empty list is for new keywords
- t (lambda (x y) (equal (car x) (car y)))))))))
+ (cl-pushnew (list dir keyword-list nil) ; the extra empty list is for new keywords
+ ebib--keywords-files-alist
+ :test (lambda (x y) (equal (car x) (car y)))))))))
(defun ebib--keywords-add-keyword (keyword db)
"Add KEYWORD to the list of keywords for DB."
(if (not ebib-keywords-file) ; only the general list exists
- (add-to-list 'ebib--keywords-list-per-session keyword t)
+ (push keyword ebib--keywords-list-per-session)
(let ((dir (or (file-name-directory ebib-keywords-file) ; a single keywords file
(file-name-directory (ebib-db-get-filename db))))) ; per-directory keywords files
(push keyword (cl-third (assoc dir ebib--keywords-files-alist))))))