[Top][All Lists]

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

RE: About the :distant-foreground face attribute

From: Drew Adams
Subject: RE: About the :distant-foreground face attribute
Date: Thu, 9 Jan 2014 14:25:42 -0800 (PST)

> > From my experience, editors usually simply drop font-lock when you
> > mark text (at least Eclipse does that, and in gvim it seems to be
> > configurable), and I think that is a good default. When you mark a
> > region, you want to apply some kind of operation on it, after
> > which the region will be gone and font lock is restored.
> That's quite contrary to my experience. Even for old emacs like
> emacs22 font-lock is kept on marked text with transient-mark-mode
> enabled.  As to other tools like Eclipse, Netbeans,Xcode selected
> text does not lose syntax highlight either.

Yes and no.  You might think that, just because (a) by default, face
`region' does not specify a foreground color and (b) most font locking
(maybe all default font-locking) does not affect the background.

> Especially for Eclipse I remembered that when I used it about a
> decade ago copying selected code from Eclipse to other WYSIWYG
> applications like MS PowerPoint the syntax highlight is also copied
> ie, rich formatted.

But this is the point: does the selection highlighting take precedence
over the underlying text highlighting (syntax highlighting or other)?

My guess is that in *all* of the cases you cite the answer is yes.
Selection highlighting _should_ take precedence, so you can tell
clearly which text has been selected.  When you are selecting text,
that is generally more important than other highlighting considerations.

> I must say here that my experience with color theme is way much
> better and much less flaws than before it's integerated thanks to
> the work of all the developers especially cyd.

I'm not sure what you mean by that.  Color theme was not integrated
into Emacs.  It is still a separate library (and it still works
with Emacs 24.4).  What CYD did was to enhance Emacs custom themes
to do some of what color themes do (in a different way), and to do
some things that color themes do not do.  `color-theme.el' is here:
http://www.nongnu.org/color-theme .  See also

> I do. I find myself get an uneasy feeling when font-lock is lost on
> marked text.

It was lost in the context you describe (IIUC), because the platform
provided a bad default color for the `region' background.  This was
not the right "fix" for that problem, IMO (IIUC).

reply via email to

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