summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fussy.lisp17
1 files changed, 11 insertions, 6 deletions
diff --git a/fussy.lisp b/fussy.lisp
index 08a7eab..b367f71 100644
--- a/fussy.lisp
+++ b/fussy.lisp
@@ -220,15 +220,20 @@ returns a list of those names."
(defvar *theme-matcher-cache* (make-hash-table :test #'equal))
+(defun theme-term-matcher (term)
+ (if (eq #\- (elt term 0))
+ (complement (theme-term-matcher (string-left-trim "-" term)))
+ (lambda (theme)
+ (or (search term theme)
+ (with-slots
+ (name keywords description authors maintainer) (theme-package theme)
+ (or (search term (symbol-name name) :test #'char-equal)
+ (search term description :test #'char-equal)))))))
+
(defun theme-mentions-anywhere (term)
(or (gethash (string-downcase term) *theme-matcher-cache*)
(setf (gethash (string-downcase term) *theme-matcher-cache*)
- (lambda (theme)
- (or (search term theme)
- (with-slots
- (name keywords description authors maintainer) (theme-package theme)
- (or (search term (symbol-name name) :test #'char-equal)
- (search term description :test #'char-equal))))))))
+ (theme-term-matcher term))))