diff options
author | colin <colin@cicadas.surf> | 2024-03-24 15:23:13 -0700 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2024-03-24 15:23:13 -0700 |
commit | b2e73ea9e87c072ca39831f4600f4579f5953022 (patch) | |
tree | 7b17e40bad17f36d5a192642f517cb129848d329 /fussy.lisp | |
parent | 95909f31b7d5f15d86bf70e9df49ae2f41da5b71 (diff) |
Diffstat (limited to 'fussy.lisp')
-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)))) |