From 1939272b1c15d50f5fe1fa403bc9c8ee9fd0a84f Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 25 Mar 2023 17:21:26 -0700 Subject: It seems to finish! --- fussy.el | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'fussy.el') diff --git a/fussy.el b/fussy.el index 91882bc..6f4e7aa 100644 --- a/fussy.el +++ b/fussy.el @@ -1,9 +1,24 @@ (require 'cl-lib) (require 'package) +(defvar +package-name-filter-out-list+ + (list "airline-")) + +(defvar +excluded-package-names+ + '(tramp-theme color-theme)) + +(defun fussy-string-ends-with (str suffix) + (and (< (length suffix) (length str)) + (string= suffix + (cl-subseq str (- (length str) (length suffix)))))) + (defun fussy-is-theme-p (pkg-entry) - (cl-search "-theme" (symbol-name (cl-first pkg-entry)) - :test 'char-equal)) + (let ((name (symbol-name (cl-first pkg-entry)))) + (and (or (fussy-string-ends-with name "-theme") + (fussy-string-ends-with name "-themes")) + (not (cl-member (cl-first pkg-entry) +excluded-package-names+)) + (cl-notany (lambda (substr) (cl-search substr name)) + +package-name-filter-out-list+)))) (defun fussy-themes-packages () (cl-remove-if-not 'fussy-is-theme-p package-archive-contents)) -- cgit v1.2.3