emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add rainbow-mode


From: Niels Giesen
Subject: Re: [PATCH] Add rainbow-mode
Date: Wed, 4 Aug 2010 10:05:00 +0200

Hi all,

Sorry for chiming in this late, but I had little time. So here are my thoughts.

This morning I finally got a chance to look at rainbow-mode. I must
say I like the clearness of the code. I definitely want to see wether
css-color.el can learn from it.

It seems rainbow-mode is less css-specific or more generic in that it
also handles LaTeX colors and x-defined-colors. On the other hand,
rainbow-mode does not handle all color notations valid in css (no
hsl()).

Css-color-mode currently only handles colors that are (also) valid css-colors.

In my view, the biggest plus of css-color are the conversions, whereas
the biggest plus of rainbow-mode is the automatic handling of
major-modes.

I would be open to add support for more color notations, possibly
user-configurable.

We may make `css-color-type-circle' buffer-local and use
rainbow-mode's handling of major modes to set the appropriate ring.

This means adding appropriate conversion functions, and bailing out
when the ring contains just one type (i.e., new type == old type).

We could opt to still do font-locking of all color notations
regardless of the major-mode, or split up font-lock-keywords the same
way that rainbow-mode does.


Regards,

Niels.

On Mon, Aug 2, 2010 at 6:49 PM, Wojciech Meyer
<address@hidden> wrote:
> <address@hidden> wrote:
>> 2010/8/2 Ted Zlatanov <address@hidden>:
>>>
>>> LB> I do not think rainbow-mode has all the functionality in
>>> LB> css-color-mode (but I only glanced at rainbow-mode so I am not quite
>>> LB> sure). Are you really sure of this?
>>>
>>> I agree it doesn't have all the CSS-specific functionality.  Is there
>>> something specific you need?
>>
>> I would be glad to get Niels comments on this. I do not think there is
>> much that is very css-specific. (For example the conversion between
>> different color notations could be useful in other places).
>
> I have seen HSV and HSL conversions, pluss css-color-mode works
> in every mode. The name is a bit specific only.
>
>>
>>> rainbow-mode.el is more generally useful and can support the
>>> CSS-specific code, whereas css-color-mode.el can't support tex-mode for
>>> instance.
>>
>> I am surprised to read that, but then perhaps functionality from the
>> both minor modes should be merged?
>
> Yes, I think it should be.
>
> Wojciech
>



-- 
http://pft.github.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]