diff options
author | Sean Allred <code@seanallred.com> | 2015-11-01 14:31:10 -0600 |
---|---|---|
committer | Sean Allred <code@seanallred.com> | 2015-11-01 14:31:33 -0600 |
commit | 53816e1885df22391ecc820297c1fe7cd381a630 (patch) | |
tree | 6916e4c53ddbf20f623bd48a522ffe4b15a175a5 | |
parent | a017b934eaf27fcd6dd0cbf1b20a3a0245297222 (diff) |
Avoid creating a directory when compiling
Fixes #308
-rw-r--r-- | sx-filter.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sx-filter.el b/sx-filter.el index 5848e34..31e0470 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 |