bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#15668: 24.3.50; No font lock on active region


From: Darren Hoo
Subject: bug#15668: 24.3.50; No font lock on active region
Date: Tue, 22 Oct 2013 05:36:38 +0800

Hi,

On Tue, Oct 22, 2013 at 2:47 AM, Jan Djärv <jan.h.d@swipnet.se> wrote:

Both Gtk+ and NS does this.  The reason is that we use the system defined selection colors, and the background may be ill-matched to Emacs foreground colors.
For example, many Gnome settings use an almost black color for selection background, so Emacs black for text color is almost unreadable.  These settings use white(ish) for text color which is much better.  But by setting foreground selection color, you loose font-lock.  OSX uses a light blue for background, which is very near to blue used by font-lock-constant-face and also near font-lock-function-name-face.

It would be nice if one could define a face with a foreground color to be used when foreground and background otherwise are to similar.
 

I've noticed the changes you made in revno: 114473, I can customize-faces of region for
my own preference. But I would argue that it might be better to leave foreground  of 
region face to be unspecified by default and only use  ns_selection_bg_color for background.
Let Emacs theme designers take care of the use ns_selection_fg_color if they want to 
their theme to work flawlessly on OSX.

I suppose that many users do want fancy font-lock on active regions as many IDE does 
although even on text-mode this behaviour between different Emacs releases is non-consistent.

I think the reason Gtk uses both gtk_selection_fg_color and gtk_selection_bg_color is that 
there are many themes for user to choose and different GNU/Linux distributors choose different
themes thus the fock-lock on regions thing has to lose . But on OSX the color of highlight text is 
seldom changed (or at least for me). 

By default I find that both font-lock-constant-face and font-lock-function-name-face are quite 
readable on the default light blue selectedBackgroundColor.

Attachment: faces.png
Description: PNG image


reply via email to

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