emacs-devel
[Top][All Lists]
Advanced

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

RE: /srv/bzr/emacs/trunk r102478: shr.el (shr-tag-color-check):Convert c


From: Drew Adams
Subject: RE: /srv/bzr/emacs/trunk r102478: shr.el (shr-tag-color-check):Convert colors to hexadecimal with shr-color->hexadecimal.
Date: Tue, 23 Nov 2010 16:05:03 -0800

> I see.  Why not just use hexrgb.el (or build on it)?  It's been around
> long enough that such teething problems should have been eliminated.
> 
> Drew Adams has an assignment on file; if he is willing to include
> hexrgb.el under that assignment, we could simply add that to Emacs.
> Whatever additional functionality you need that isn't already present,
> you could then simply add.

Almost missed this mail - haven't been following this thread.

Yes, you can include hexrgb.el in Emacs if you want.

There is no doubt some overlap between `hexrgb-read-color' in hexrgb.el and
`read-color' in Emacs (originally from hexrgb.el, but modified since).

Someone should take a look, to see if you need to merge/adapt some things (e.g.
in facemenu.el).  Some things like extra defcustom :group's will need to be
removed from the hexrgb.el code.

Some of the hexrgb.el code uses functions and vars from eyedropper.el, but not
in any essential way.  This part lets you use colors that you pick up from under
the cursor or the pointer, as with an eyedrop.

These parts can be cut out of the hexrgb.el code, or you can also include
eyedropper.el in Emacs (it is small).  Some of the eyedropper.el functions have
already been added to Emacs (`face-at-point' is `eyedropper-face-at-point'
etc.).  That's another possibility: add the eyedropper.el code but drop the
prefix `eyedrop-'.

There are two places where the hexgrb.el code is conditional for Emacs 20:

- work around an Emacs 20 bug: (= N N) returns t for a Nan
- use of `try-completion' if `test-completion' is not defined

These are short enough and benign enough that I'd hope they could stay in the
code.

I'm willing to make changes that you request.  If there are no incompatible
changes, so I can also use it for my local needs, then I won't need to also
maintain it separately (locally).  Otherwise (incompatible changes, stuff
removed that I need), then I will either need to also maintain a local version
or move the differences to another local file.  Depends on what changes you
require.

The code is here:
http://www.emacswiki.org/emacs/hexrgb.el
http://www.emacswiki.org/emacs/eyedropper.el




reply via email to

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