GNU bug report logs - #23383
[PATCH] Support completion of color functions in CSS mode

Previous Next

Package: emacs;

Reported by: Etienne Prud'homme <e.e.f.prudhomme <at> gmail.com>

Date: Tue, 26 Apr 2016 22:50:01 UTC

Severity: wishlist

Tags: patch

Merged with 23384

Done: Simen Heggestøyl <simenheg <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #12 received at 23383 <at> debbugs.gnu.org (full text, mbox):

From: Simen Heggestøyl <simenheg <at> gmail.com>
To: Etienne Prud'homme <e.e.f.prudhomme <at> gmail.com>
Cc: 23383 <at> debbugs.gnu.org
Subject: Re: bug#23383: [PATCH] Support completion of color functions in CSS
 mode
Date: Wed, 27 Apr 2016 21:16:58 +0200
[Message part 1 (text/plain, inline)]
Hello Etienne, thanks for the patch.

On Wed, Apr 27, 2016 at 12:48 AM, Etienne Prud'homme 
<e.e.f.prudhomme <at> gmail.com> wrote:
> The attached patch adds completion for CSS color functions such as
> `rgb()'. Values were taken from the “CSS Color Module Level 4”. 
> It can
> be found at: https://drafts.csswg.org/css-color/#color-type

It will be nice to have completion for those new color functions. Some
feedback regarding the patch follows.

- 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.

- 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.

- Please wrap lines around column 70 or so to stay in line with the rest
 of the file.

> As a sidenote, how should we handle functions? Since they use
> parentheses, the point is going to be outside of parentheses.
> 
> Eg.
> rgba()*
>       ^(point)

True, I'm not sure how to best solve it.

> Also, should we include the parameters number?

I think that's rather a job for something like ElDoc (I'm currently
working on adding ElDoc support to CSS mode).

-- Simen
[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.