From 53816e1885df22391ecc820297c1fe7cd381a630 Mon Sep 17 00:00:00 2001 From: Sean Allred Date: Sun, 1 Nov 2015 14:31:10 -0600 Subject: [PATCH] Avoid creating a directory when compiling Fixes #308 --- sx-filter.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sx-filter.el b/sx-filter.el index 5848e348..31e04701 100644 --- a/sx-filter.el +++ b/sx-filter.el @@ -36,7 +36,7 @@ ;;; Customizations (defvar sx--filter-alist - (sx-cache-get 'filter) + nil "An alist of known filters. See `sx-filter-compile'. Structure: @@ -96,6 +96,8 @@ be returned. Otherwise, compile INCLUDE, EXCLUDE, and BASE into a filter with `sx-filter-compile' and push the association onto `sx--filter-alist'. Re-cache the alist with `sx-cache-set' and return the compiled filter." + (unless sx--filter-alist + (setq sx--filter-alist (sx-cache-get 'filter))) (or (cdr (assoc (list include exclude base) sx--filter-alist)) (let ((filter (sx-filter-compile include exclude base))) (when filter