From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.bugs Subject: bug#25525: 25.1.90; add color highlighting to css mode Date: Sat, 04 Mar 2017 12:58:35 -0700 Message-ID: <87r32cizkk.fsf@tromey.com> References: <87mvefh8br.fsf@tromey.com> <1485375833.1960.0@smtp.gmail.com> <1485455113.4245.1@smtp.gmail.com> <1487359774.1998.0@smtp.gmail.com> <1488653191.6153.0@smtp.gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1488657553 20084 195.159.176.226 (4 Mar 2017 19:59:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Mar 2017 19:59:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: 25525@debbugs.gnu.org, Tom Tromey To: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 04 20:59:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckFpb-0004h6-Nf for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Mar 2017 20:59:08 +0100 Original-Received: from localhost ([::1]:36427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckFph-0002HF-R1 for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Mar 2017 14:59:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckFpb-0002H9-RL for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2017 14:59:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckFpW-0002cx-Sx for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2017 14:59:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42065) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ckFpW-0002cl-KW for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2017 14:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ckFpW-0005bv-Au for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2017 14:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tom Tromey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Mar 2017 19:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25525 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 25525-submit@debbugs.gnu.org id=B25525.148865753621554 (code B ref 25525); Sat, 04 Mar 2017 19:59:02 +0000 Original-Received: (at 25525) by debbugs.gnu.org; 4 Mar 2017 19:58:56 +0000 Original-Received: from localhost ([127.0.0.1]:40264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckFpP-0005ba-ND for submit@debbugs.gnu.org; Sat, 04 Mar 2017 14:58:55 -0500 Original-Received: from gproxy5-pub.mail.unifiedlayer.com ([67.222.38.55]:51927) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1ckFpN-0005bM-9Z for 25525@debbugs.gnu.org; Sat, 04 Mar 2017 14:58:53 -0500 Original-Received: (qmail 14572 invoked by uid 0); 4 Mar 2017 19:58:45 -0000 Original-Received: from unknown (HELO CMOut01) (10.0.90.82) by gproxy5.mail.unifiedlayer.com with SMTP; 4 Mar 2017 19:58:45 -0000 Original-Received: from box522.bluehost.com ([74.220.219.122]) by CMOut01 with id rvye1u00Z2f2jeq01vyhGG; Sat, 04 Mar 2017 12:58:45 -0700 X-Authority-Analysis: v=2.1 cv=U+QBU4bu c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IkcTkHD0fZMA:10 a=6Iz7jQTuP9IA:10 a=pGLkceISAAAA:8 a=sfeLlzl1AUBhnYANJbEA:9 a=wKTUYRAmkEnMR62Q:21 a=NNDU_1bO2De1ZK0V:21 a=QEXdDO2ut3YA:10 a=6kGIvZw6iX1k4Y-7sg4_:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Nx161qf1sv66bU6WfCU9J1lLV/pxBGSv6/rAn+WbjgQ=; b=I9kCA6pTqrJBvV7km9mwinhgRn eqKtmnRbDAKcQpcItVCUSar5X7GsXj0XR2TB5oRVhKkG9le6KowEDDmesFnfJV479CPM8WERnyNhH hRSBJpOhVxWC8QYN372xAKCjm; Original-Received: from 71-218-43-111.hlrn.qwest.net ([71.218.43.111]:52878 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1ckFp8-0006Yh-KY; Sat, 04 Mar 2017 12:58:38 -0700 X-Attribution: Tom In-Reply-To: <1488653191.6153.0@smtp.gmail.com> ("Simen \=\?utf-8\?Q\?Heggest\?\= \=\?utf-8\?Q\?\=C3\=B8yl\=22's\?\= message of "Sat, 04 Mar 2017 19:46:31 +0100") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box522.bluehost.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.218.43.111 X-Exim-ID: 1ckFp8-0006Yh-KY X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-218-43-111.hlrn.qwest.net (bapiya) [71.218.43.111]:52878 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== 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:130197 Archived-At: >>>>> "Simen" =3D=3D Simen Heggest=C3=B8yl 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)))