emacs-devel
[Top][All Lists]
Advanced

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

Re: no good way to highlight rectangle while region is highlighted


From: Ehud Karni
Subject: Re: no good way to highlight rectangle while region is highlighted
Date: Sat, 28 Jul 2007 13:33:02 +0300

On Sat, 28 Jul 2007 01:10:26, Joe Wells wrote:
>
> "Ehud Karni" <address@hidden> writes:
>
> My reading of the documentation (supplemented by my perusal of the
> Emacs C source code) for "merging" of face F1 and face F2 is that it
> is not a symmetric operation and one of the faces takes priority.  In
> the case of distinct face attributes, both are used; this means if
> face F1 has value V1 for attribute A1 and face F2 has value V2 for
> attribute A2, then you get a new face with V1 for A1 and V2 for A2.
                               ======================================
> In the case of assignments for the same face attribute, only one is
> used; assuming face F1 has priority, if face F1 has value V1 for
> attribute A0 and face F2 has value V2 for the same attribute A0, then
> value V1 is used.
>
> Note that there is no notion of merging of colors.  One of the two
> colors is always used, unchanged.

I checked it and this is true. Your only hope is to use merging of
attributes not used in "region" face.

> I have done testing that agrees with this.  Although I had no reason
> to believe they would make any difference, I just now tried overlay
> priorities anyway and verified that overlay priorities make no
> difference whatsoever in this matter.  No matter how high the overlay
> priority, the background color of the overlay's face can not override
> the background color of the "region" face (and no attempt at color
> combination occurs).  I even tried most-positive-fixnum as the overlay
> priority (and you can't get any higher than that).

I also rechecked the overlay priority issue and found it is not needed.
I think I added it a long time ago when font-lock used overlays.

I checked both X and tty and found the following:
1. When `transient-mark-mode' is enabled the "region" face attributes
overrides any other, but when it is disabled and you use the mouse
to mark a region (the `mouse-drag-region' function) it uses an overlay
and so the overlay priority may have an influence.

2. All the X only face attributes (like box, width, strike-through)
should not be used because they does not work on tty (and some of them
like box and overline also change the display by adding 1 extra pixel
between text lines).

3. If you use attributes not set by the "region" face, most notably
the inverse-video attribute, you can see it through the rest of the
region.

Ehud.


--
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry




reply via email to

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