diff options
| author | Protesilaos Stavrou <info@protesilaos.com> | 2025-05-19 09:01:42 +0300 |
|---|---|---|
| committer | Protesilaos Stavrou <info@protesilaos.com> | 2025-05-19 09:01:42 +0300 |
| commit | 0421b77ed3a267071dbdd73ead67e38bf9dc83f5 (patch) | |
| tree | f3d1536eee0cd0f31ae1f3b88672f4b73b7c4d1e | |
| parent | 2028e66d2f6e9e50105051d8e911ed0c4741db69 (diff) | |
Use our helper function instead of a lambda for string-prefix-p
| -rw-r--r-- | ef-themes.el | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/ef-themes.el b/ef-themes.el index 993bc08..1b0657f 100644 --- a/ef-themes.el +++ b/ef-themes.el @@ -446,12 +446,13 @@ symbol, which is safe when used as a face attribute's value." value 'unspecified)) +(defun ef-themes--ef-p (theme) + "Return non-nil if THEME name has an ef- prefix." + (string-prefix-p "ef-" (symbol-name theme))) + (defun ef-themes--list-enabled-themes () "Return list of `custom-enabled-themes' with ef- prefix." - (seq-filter - (lambda (theme) - (string-prefix-p "ef-" (symbol-name theme))) - custom-enabled-themes)) + (seq-filter #'ef-themes--ef-p custom-enabled-themes)) (defun ef-themes--enable-themes (&optional subset) "Enable all Ef themes. @@ -470,10 +471,7 @@ themes." (defun ef-themes--list-known-themes () "Return list of `custom-known-themes' with ef- prefix." (ef-themes--enable-themes) - (seq-filter - (lambda (theme) - (string-prefix-p "ef-" (symbol-name theme))) - custom-known-themes)) + (seq-filter #'ef-themes--ef-p custom-known-themes)) (defun ef-themes--current-theme () "Return first enabled Ef theme." @@ -536,10 +534,6 @@ overrides." `(metadata (category . ,category)) (complete-with-action action candidates string pred)))) -(defun ef-themes--ef-p (theme) - "Return non-nil if THEME name has an ef- prefix." - (string-prefix-p "ef-" (symbol-name theme))) - (defvar ef-themes--select-theme-history nil "Minibuffer history of `ef-themes--select-prompt'.") |
