[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25525: 25.1.90; add color highlighting to css mode
From: |
Tom Tromey |
Subject: |
bug#25525: 25.1.90; add color highlighting to css mode |
Date: |
Sat, 04 Mar 2017 12:58:35 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
>>>>> "Simen" == Simen Heggestøyl <simenheg@gmail.com> writes:
Simen> I found another one: in SCSS mode, when using the `rgba` function
Simen> where one argument is a variable, subsequent colors aren't
Simen> highlighted. An example:
Thank you. This was due to using the wrong block name in a call to
cl-return-from. I must have changed the function name and forgotten
about this bit. Anyway, apply the appended patch on top of what you've
got and please try to find more bugs :)
Simen> There is also a test failure when you rebase the patch on the latest
Simen> master due to the changes in 7b00e956b4. It can be fixed by passing 2
Simen> as the last argument to `color-rgb-to-hex' in `css--hsl-color'.
Thanks, I'll apply this to my patch.
Tom
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 8cec7ca..7af9fdd 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -900,7 +900,7 @@ css--color-skip-blanks
(while (< iter 4)
(css--color-skip-blanks)
(unless (looking-at css--number-or-percent-regexp)
- (cl-return-from css--css-4-rgb nil))
+ (cl-return-from css--rgb-color nil))
(let* ((is-percent (match-beginning 1))
(str (match-string (if is-percent 1 2)))
(number (string-to-number str)))
bug#25525: 25.1.90; add color highlighting to css mode, Tom Tromey, 2017/03/04