summaryrefslogtreecommitdiff
path: root/lisp/textmodes/css-mode.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2017-12-16 17:43:38 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2017-12-16 17:43:38 -0500
commitac0d6c06b805b8f05a854a69639531bf737fea3f (patch)
tree6f8fe8ec4ac75224d5525882886c70929a34ae41 /lisp/textmodes/css-mode.el
parentf74d811e805ebbcff9328e6cb8b5793f9d8c85ec (diff)
downloademacs-ac0d6c06b805b8f05a854a69639531bf737fea3f.tar.gz
* lisp/textmodes/css-mode.el (css--hex-color): Trivial simplification
Diffstat (limited to 'lisp/textmodes/css-mode.el')
-rw-r--r--lisp/textmodes/css-mode.el4
1 files changed, 1 insertions, 3 deletions
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 96c3f6b9395..b0e66d397f0 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.