branch: externals/colorful-mode
commit 2fec39aba7bb705c3a027c51425ba0747126042e
Author: Elías Gabriel Pérez <[email protected]>
Commit: Elías Gabriel Pérez <[email protected]>

    * colorful-mode.el (colorful-add-hsl-colors): Fix CSS HSL regexp.  (Github 
#26)
    
    (colorful--turn-on): Simplify.
---
 colorful-mode.el | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/colorful-mode.el b/colorful-mode.el
index 94eef47a14..ff9bf75eeb 100644
--- a/colorful-mode.el
+++ b/colorful-mode.el
@@ -917,9 +917,9 @@ This is intended to be used with 
`colorful-extra-color-keyword-functions'."
    `(,(rx (seq "hsl" (opt "a") "(" (zero-or-more " ")
                (group (repeat 1 3 digit) (opt (or "deg" "grad" "rad")))
                (zero-or-more " ") (opt "," (zero-or-more " "))
-               (group (repeat 1 3 digit) (opt "%"))
+               (group (repeat 1 3 digit) (opt "." (1+ digit)) (opt "%"))
                (zero-or-more " ") (opt "," (zero-or-more " "))
-               (group (repeat 1 3 digit) (opt "%"))
+               (group (repeat 1 3 digit) (opt "." (1+ digit)) (opt "%"))
                (zero-or-more " ")
                (opt (or "/" ",") (zero-or-more " ")
                     (or (seq (zero-or-one digit)
@@ -967,10 +967,8 @@ This is intended to be used with 
`colorful-extra-color-keyword-functions'."
      ((and (listp 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))))
+      (dolist (fn-list (ensure-list (cdr fn)))
+        (funcall fn-list)))
 
      ;; If current major mode is not derived from any mode defined in
      ;; `colorful-extra-color-keyword-functions', use the

Reply via email to