Skip to content

Commit

Permalink
Avoid creating a directory when compiling
Browse files Browse the repository at this point in the history
Fixes #308
  • Loading branch information
vermiculus committed Nov 1, 2015
1 parent a017b93 commit 53816e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sx-filter.el
Expand Up @@ -36,7 +36,7 @@
;;; Customizations

(defvar sx--filter-alist
(sx-cache-get 'filter)
nil
"An alist of known filters. See `sx-filter-compile'.
Structure:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 53816e1

Please sign in to comment.