14 jan 2014 kl. 19:47 skrev Daniel Colascione <address@hidden>:
On 01/14/2014 03:44 AM, Jan D. wrote:
Daniel Colascione skrev 2014-01-14 11:44:
On 01/14/2014 01:34 AM, Jan D. wrote:
Given the use case at hand, we know for a fact that the background is
the region background, so I don't understand why a calculated
foreground
is needed. Just pick one that matches the background.
There might be other use cases where a calculated foreground makes
sense, but my imagination fails me here.
Calculated foreground colors look better: they resemble the font-lock
colors on which they're based.
For the region case, that would imply the possibility of different
foregrounds for marked text, none which is the actual font-lock color.
It *is* the same color in the sense that the code we generate has the
same hue. How on earth is that worse than changing arbitrary font-locked
pieces of text to the system selection foreground color?
Because the system color foreground is (presumably) choosen to look good
together with the system color background.
Yes, and a color we algorithmically generate from a font-lock face will *also*
look good against that background color, but 1) will be distinct from other
faces replaced for lack of contrast, and 2) will be visually similar to the
pre-highlight face. Have you tried the patch?
No. If Emacs generates a color, Emacs desides what looks good. If
the system defines a color, the system (or the user if customized)
desides what looks good. I don't think it matters what I think about
colors generated by your patch, I might even think they look better
than many system defined colors. But as a principle I think the
desision is not Emacs to make *by default*. Users may of course
apply customizations to Emacs and change it.