[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master ac0d6c0: * lisp/textmodes/css-mode.el (css--hex-col
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] master ac0d6c0: * lisp/textmodes/css-mode.el (css--hex-color): Trivial simplification |
Date: |
Sat, 16 Dec 2017 17:43:47 -0500 (EST) |
branch: master
commit ac0d6c06b805b8f05a854a69639531bf737fea3f
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* lisp/textmodes/css-mode.el (css--hex-color): Trivial simplification
---
lisp/textmodes/css-mode.el | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 96c3f6b..b0e66d3 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -1037,9 +1037,7 @@ This recognizes CSS-color-4 extensions."
STR is the incoming CSS hex color.
This function simply drops any transparency."
;; Either #RGB or #RRGGBB, drop the "A" or "AA".
- (if (> (length str) 5)
- (substring str 0 7)
- (substring str 0 4)))
+ (substring str 0 (if (> (length str) 5) 7 4)))
(defun css--named-color (start-point str)
"Check whether STR, seen at point, is CSS named color.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master ac0d6c0: * lisp/textmodes/css-mode.el (css--hex-color): Trivial simplification,
Stefan Monnier <=