diff options
-rw-r--r-- | fussy.lisp | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -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)))) |