diff options
| author | Elías Gabriel Pérez <eg642616@gmail.com> | 2025-05-08 20:40:04 -0600 |
|---|---|---|
| committer | Elías Gabriel Pérez <eg642616@gmail.com> | 2025-05-08 20:40:04 -0600 |
| commit | bc96ee3b6af2692c9b066056b015c2df22d3d881 (patch) | |
| tree | ff8abafc9e60b534c156457e6a42de1ce94727ed | |
| parent | c2d2fe8dc27a3be294526a208db5bccaaac0be42 (diff) | |
Fix previous commit.
* colorful-mode.el (colorful--turn-on): Use `seq-some' instead
`cl-some'
| -rw-r--r-- | colorful-mode.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/colorful-mode.el b/colorful-mode.el index 7d2104f..2b834c3 100644 --- a/colorful-mode.el +++ b/colorful-mode.el @@ -942,16 +942,23 @@ This is intended to be used with `colorful-extra-color-keyword-functions'." ;;;; Minor mode definitions (defun colorful--turn-on () "Helper function to turn on `colorful-mode'." - ;; Run functions from list for add keywords to `colorful-color-keywords'. + ;; Run functions from `colorful-extra-color-keyword-functions' list + ;; for add keywords to `colorful-color-keywords'. (dolist (fn colorful-extra-color-keyword-functions) (cond + ;; Enable some highlighting for some major modes defined in + ;; `colorful-extra-color-keyword-functions' ((and (listp fn) - (cl-some #'derived-mode-p (ensure-list (car fn)))) + ;; For emacs < 28.1 compatibility (see: github#19) + (seq-some #'derived-mode-p (ensure-list (car fn)))) (if (listp (cdr fn)) (dolist (fn-list (cdr fn)) (funcall fn-list)) (funcall (cdr fn)))) + ;; If current major mode is not derived from any mode defined in + ;; `colorful-extra-color-keyword-functions', use the + ;; functions without the cons. ((functionp fn) (funcall fn)))) |
