From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Etienne Prud'homme Newsgroups: gmane.emacs.bugs Subject: bug#23383: [PATCH] Support completion of color functions in CSS mode Date: Wed, 27 Apr 2016 20:17:45 -0400 Message-ID: <20160427201745.09dd0967@ThinkPax> References: <20160426184852.391f744d@ThinkPax> <1461784618.2119.2@smtp.gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/9t8pmh3We4OimSnoL0NV1CA" X-Trace: ger.gmane.org 1461802704 14584 80.91.229.3 (28 Apr 2016 00:18:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Apr 2016 00:18:24 +0000 (UTC) Cc: 23383@debbugs.gnu.org To: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 28 02:18:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1avZem-0006t9-FM for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Apr 2016 02:18:12 +0200 Original-Received: from localhost ([::1]:45983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avZel-0001I7-TG for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 20:18:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avZeg-0001Di-FK for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 20:18:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avZec-0000rK-VC for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 20:18:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avZec-0000rG-Qu for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 20:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1avZec-0007NA-I9 for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 20:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Etienne Prud'homme Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Apr 2016 00:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23383 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 23383-submit@debbugs.gnu.org id=B23383.146180267628329 (code B ref 23383); Thu, 28 Apr 2016 00:18:02 +0000 Original-Received: (at 23383) by debbugs.gnu.org; 28 Apr 2016 00:17:56 +0000 Original-Received: from localhost ([127.0.0.1]:50989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avZeW-0007Mp-I5 for submit@debbugs.gnu.org; Wed, 27 Apr 2016 20:17:56 -0400 Original-Received: from mail-qg0-f65.google.com ([209.85.192.65]:34052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avZeV-0007Ma-20 for 23383@debbugs.gnu.org; Wed, 27 Apr 2016 20:17:55 -0400 Original-Received: by mail-qg0-f65.google.com with SMTP id d90so4385102qgd.1 for <23383@debbugs.gnu.org>; Wed, 27 Apr 2016 17:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version; bh=/ArLKwb34588CC4sR1Z/y4B9rglqoF4og2geLUtnJCs=; b=HmpEUrE2HiJvghpoiF4u0tnbdB1jqQyb+5Cb2h+V27cq4F8TtZlxjQ3gXpSe000nxe ipZW/hB5B/sCjKgN4MU7JU7brDkyCnO1TUR7jDUsA2aCeuAITIwe7qNCjKNJqfUs9BzU ndqGGUjxU3JJGwoHHb5t87TE3ungeziJHHJbieb1ApKy3pGNmd01i1wFouFjNYiav1MK u9sENIQVutxJdJT8/alT1Lz/m2gHwIUgBnrEum5gwSzB8cpl2nFjCj5EnaXJbniKhkL5 tNnZPuRpB8O1ceQ57rGkqY1GsmU3if/uYCNXUkfRJKhNr5BpbZO1/6LyjEBJVKqEam4R CaVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version; bh=/ArLKwb34588CC4sR1Z/y4B9rglqoF4og2geLUtnJCs=; b=Kji2oyFP2czHXDTM35M8lkIOWOFUi/+D4VsEB/VNrKOtUtXyS98T5f3U5ERiPVRnVw cr1CaZWbK67H6SXUwyCJVSm3Gd4klLgN6TwyWLm2RUbAbSMduvO1crbCQlqGnUM75rLz vC4PLBGHbdLxaPD5GFMyG7jhvyh47UduAo9iQcI/ji6WngauPZrPgj4uEj0rF7je11Ql KmXnwfLycDOWzN9tnEZYwDRn6FZ+f1mRLuhLbl4CQ1PakgflSNoB3YYMCbEczPHY3RP2 KO2HgnvU6cZuoBZFIkt8fmM6fF7UOHdtW7+9YIZhE0p1edY9UVjVyWkOcAiwOYaXhrsv n1sQ== X-Gm-Message-State: AOPr4FX34+/kkSdjFRwYIaSXXPf5xfHdcc+q/wJFNGg+HQUHlfOreExyxMJBiL0cBLojlw== X-Received: by 10.140.105.182 with SMTP id c51mr11423524qgf.78.1461802669741; Wed, 27 Apr 2016 17:17:49 -0700 (PDT) Original-Received: from ThinkPax ([172.98.67.125]) by smtp.gmail.com with ESMTPSA id p143sm2003816qke.38.2016.04.27.17.17.49 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 27 Apr 2016 17:17:49 -0700 (PDT) In-Reply-To: <1461784618.2119.2@smtp.gmail.com> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:117007 Archived-At: --MP_/9t8pmh3We4OimSnoL0NV1CA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wed, 27 Apr 2016 21:16:58 +0200, Simen Heggest=C3=B8yl wrote: > - In the completion definitions we've tried to stay as close as > possible to the structure used in the CSS spec. This means that > instead of introducing `color-functions' we should make `color' > complete directly to "rgb()", "rgba()", and so on, then `hex-color', > `named-color' and the literal `currentcolor' (I think we can skip > `deprecated-system-color'). `named-color' will then contain the > literal color names like `color' does now. That=E2=80=99s a good point. Since I saw that `color' lacked most of them, I wasn=E2=80=99t sure where we were going. > - One of the tests in test/lisp/textmodes/css-mode-tests.el needs > updating. To see this, run `make lisp/textmodes/css-mode-tests' from > the test directory. >=20 > - Please wrap lines around column 70 or so to stay in line with the > rest of the file. Thanks for reminding me! I completely forgot. Much easier to read. I=E2=80=99ve made a second patch according to your recommendations. Color functions are now part of `color' and `named-color' is now a separate entity. I=E2=80=99ve tried to follow CSSWG ordering, but it=E2=80=99s not a= lways the same order in the specifications. I also found two more functions not present earlier. --MP_/9t8pmh3We4OimSnoL0NV1CA Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-Add-completion-of-colors-in-CSS-mode.patch >From 3e000ab30b3c6a4cd8cc1f76bd98c5f7c5aa0c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Etienne=20Prud=E2=80=99homme?= Date: Wed, 27 Apr 2016 19:52:28 -0400 Subject: [PATCH] Add completion of colors in CSS mode * lisp/textmodes/css-mode.el (css-value-class-alist): Add CSS colors candidates from "CSS Color Module Level 4". --- lisp/textmodes/css-mode.el | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index e30fb3e..3b795fd 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -460,10 +460,9 @@ css-value-class-alist (bg-layer bg-image position repeat-style attachment box) (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") + (color "rgb()" "rgba()" "hsl()" "hsla()" "hwb()" "gray()" "lab()" + "lch()" "device-cmyk()" "color-mod()" "#" namedColor + "transparent" "currentColor") (common-lig-values "common-ligatures" "no-common-ligatures") (contextual-alt-values "contextual" "no-contextual") (counter "counter()" "counters()") @@ -502,6 +501,37 @@ 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" "darkgrey" + "darkkhaki" "darkmagenta" "darkolivegreen" "darkorange" + "darkorchid" "darkred" "darksalmon" "darkseagreen" + "darkslateblue" "darkslategray" "darkslategrey" "darkturquoise" + "darkviolet" "deeppink" "deepskyblue" "dimgray" "dimgrey" + "dodgerblue" "firebrick" "floralwhite" "forestgreen" "fuchsia" + "gainsboro" "ghostwhite" "gold" "goldenrod" "gray" "green" + "greenyellow" "grey" "honeydew" "hotpink" "indianred" "indigo" + "ivory" "khaki" "lavender" "lavenderblush" "lawn reen" + "lemonchiffon" "lightblue" "lightcoral" "lightcyan" + "lightgoldenrodyellow" "lightgray" "lightgreen" "lightgrey" + "lightpi k" "lightsalmon" "lightseagreen" "lightskyblue" + "lightslategray" "lightslategrey" "lightsteelblue" "lightyellow" + "lime" "limeg een" "linen" "magenta" "maroon" "mediumaquamarine" + "mediumblue" "mediumorchid" "mediumpurple" "mediumseagreen" + "mediumslateblu " "mediumspringgreen" "mediumturquoise" + "mediumvioletred" "midnightblue" "mintcream" "mistyrose" + "moccasin" "navajowhite" "nav " "oldlace" "olive" "olivedrab" + "orange" "orangered" "orchid" "palegoldenrod" "palegreen" + "paleturquoise" "palevioletred" "pap yawhip" "peachpuff" "peru" + "pink" "plum" "powderblue" "purple" "rebeccapurple" "red" + "rosybrown" "royalblue" "saddlebrown" "sa mon" "sandybrown" + "seagreen" "seashell" "sienna" "silver" "skyblue" "slateblue" + "slategray" "slategrey" "snow" "springgreen" " teelblue" "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") -- 2.8.1 --MP_/9t8pmh3We4OimSnoL0NV1CA--