From 02fc78dd4c2f7fa347b9ec59d7aa8fb5fcf7cba8 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 4 Mar 2016 23:23:57 -0500 Subject: bog-clear-citekey-cache: Add all option to prompt --- bog.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bog.el b/bog.el index d00b62e..75412d3 100644 --- a/bog.el +++ b/bog.el @@ -336,11 +336,11 @@ Otherwise, prompt for CATEGORY." (unless bog--citekey-cache (user-error "Citekey cache is empty")) (list (or (equal current-prefix-arg '(4)) - (and bog--citekey-cache - (intern (completing-read - "Category: " - (mapcar (lambda (c) (symbol-name (car c))) - (or bog--citekey-cache))))))))) + (let ((choice (and bog--citekey-cache + (completing-read + "Category: " + (cons "*all*" bog--citekey-cache))))) + (if (equal choice "*all*") t (intern choice))))))) (setq bog--citekey-cache (and (not (eq category t)) (assq-delete-all category bog--citekey-cache)))) -- cgit v1.2.3