From: Etienne Prud'homme <e.e.f.prudhomme@gmail.com>
To: "Simen Heggestøyl" <simenheg@gmail.com>
Cc: 23383@debbugs.gnu.org
Subject: bug#23383: [PATCH] Support completion of color functions in CSS mode
Date: Sat, 21 May 2016 18:43:28 -0400 [thread overview]
Message-ID: <20160521184328.1779ac46@thinkpax> (raw)
In-Reply-To: <1463827339.3189.0@smtp.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 159 bytes --]
> Thank you, Etienne, but it looks like the wrong patch was attached. It
> is the same as the one from April.
Oops! I've attached the new patch now.
Etienne
[-- Attachment #2: 0001-Add-completion-of-colors-in-CSS-mode.patch --]
[-- Type: text/x-patch, Size: 4079 bytes --]
From 024683b111b1459c440da5a67582720b0d119457 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Etienne=20Prud=E2=80=99homme?= <e.e.f.prudhomme@gmail.com>
Date: Fri, 20 May 2016 14:10:46 -0400
Subject: [PATCH] Add completion of colors in CSS mode
* lisp/textmodes/css-mode.el (css-value-class-alist): Add CSS colors
from "CSS Color Module Level 3".
---
lisp/textmodes/css-mode.el | 35 ++++++++++++++++++++++++++++++++---
test/lisp/textmodes/css-mode-tests.el | 2 +-
2 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index cf407ef..060af33 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -463,9 +463,8 @@ css-value-class-alist
(bg-size length percentage "auto" "cover" "contain")
(box "border-box" "padding-box" "content-box")
(color
- "aqua" "black" "blue" "fuchsia" "gray" "green" "lime" "maroon"
- "navy" "olive" "orange" "purple" "red" "silver" "teal" "white"
- "yellow" "transparent")
+ "rgb()" "rgba()" "hsl()" "hsla()" named-color "transparent"
+ "currentColor")
(common-lig-values "common-ligatures" "no-common-ligatures")
(contextual-alt-values "contextual" "no-contextual")
(counter "counter()" "counters()")
@@ -504,6 +503,36 @@ css-value-class-alist
(line-width length "thin" "medium" "thick")
(linear-gradient "linear-gradient()")
(margin-width "auto" length percentage)
+ (named-color
+ "aliceblue" "antiquewhite" "aqua" "aquamarine" "azure" "beige"
+ "bisque" "black" "blanchedalmond" "blue" "blueviolet" "brown"
+ "burlywood" "cadetblue" "chartreuse" "chocolate" "coral"
+ "cornflowerblue" "cornsilk" "crimson" "cyan" "darkblue"
+ "darkcyan" "darkgoldenrod" "darkgray" "darkgreen" "darkkhaki"
+ "darkmagenta" "darkolivegreen" "darkorange" "darkorchid"
+ "darkred" "darksalmon" "darkseagreen" "darkslateblue"
+ "darkslategray" "darkturquoise" "darkviolet" "deeppink"
+ "deepskyblue" "dimgray" "dodgerblue" "firebrick" "floralwhite"
+ "forestgreen" "fuchsia" "gainsboro" "ghostwhite" "gold"
+ "goldenrod" "gray" "green" "greenyellow" "honeydew" "hotpink"
+ "indianred" "indigo" "ivory" "khaki" "lavender" "lavenderblush"
+ "lawngreen" "lemonchiffon" "lightblue" "lightcoral" "lightcyan"
+ "lightgoldenrodyellow" "lightgray" "lightgreen" "lightpink"
+ "lightsalmon" "lightseagreen" "lightskyblue" "lightslategray"
+ "lightsteelblue" "lightyellow" "lime" "limegreen" "linen"
+ "magenta" "maroon" "mediumaquamarine" "mediumblue" "mediumorchid"
+ "mediumpurple" "mediumseagreen" "mediumslateblue"
+ "mediumspringgreen" "mediumturquoise" "mediumvioletred"
+ "midnightblue" "mintcream" "mistyrose" "moccasin" "navajowhite"
+ "navy" "oldlace" "olive" "olivedrab" "orange" "orangered"
+ "orchid" "palegoldenrod" "palegreen" "paleturquoise"
+ "palevioletred" "papayawhip" "peachpuff" "peru" "pink" "plum"
+ "powderblue" "purple" "rebeccapurple" "red" "rosybrown"
+ "royalblue" "saddlebrown" "salmon" "sandybrown" "seagreen"
+ "seashell" "sienna" "silver" "skyblue" "slateblue" "slategray"
+ "snow" "springgreen" "steelblue" "tan" "teal" "thistle" "tomato"
+ "turquoise" "violet" "wheat" "white" "whitesmoke" "yellow"
+ "yellowgreen")
(number "calc()")
(numeric-figure-values "lining-nums" "oldstyle-nums")
(numeric-fraction-values "diagonal-fractions" "stacked-fractions")
diff --git a/test/lisp/textmodes/css-mode-tests.el b/test/lisp/textmodes/css-mode-tests.el
index 80d678a..fd86fd2 100644
--- a/test/lisp/textmodes/css-mode-tests.el
+++ b/test/lisp/textmodes/css-mode-tests.el
@@ -58,7 +58,7 @@
;; Check that the `color' property doesn't cause infinite recursion
;; because it refers to the value class of the same name.
- (should (= (length (css--property-values "color")) 18)))
+ (should (= (length (css--property-values "color")) 147)))
(ert-deftest css-test-property-value-cache ()
"Test that `css--property-value-cache' is in use."
--
2.7.4
next prev parent reply other threads:[~2016-05-21 22:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 22:48 bug#23383: [PATCH] Support completion of color functions in CSS mode Etienne Prud'homme
2016-04-27 19:16 ` Simen Heggestøyl
2016-04-28 0:17 ` Etienne Prud'homme
2016-04-28 17:51 ` Simen Heggestøyl
2016-05-20 19:37 ` Etienne Prud'homme
2016-05-21 10:42 ` Simen Heggestøyl
2016-05-21 22:43 ` Etienne Prud'homme [this message]
2016-05-22 11:03 ` Simen Heggestøyl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160521184328.1779ac46@thinkpax \
--to=e.e.f.prudhomme@gmail.com \
--cc=23383@debbugs.gnu.org \
--cc=simenheg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).