Subject: bug#16822: 24.3.50; show-paren-mode adds confusion to active region

From: Drew Adams <[email-masked]>
Date: Thu, 20 Feb 2014 09:44:29 -0800 (PST)

> When show-paren-mode is on, it adds confusion to the active
> region. Suppose I have some text which is (hello),
> 
> 1. I set the region to (hello and place the cursor on the left paren.
> 2. I set the region to (hello) and place the cursor on the left paren.
> 
> Note that in Case 1, the right paren is not part of the region while in
> Case 2 it is. In the two cases above, I get exactly the same color on
> the screen, then how can I distinguish between these two different
> cases?
> 
> Compared to the more rational behavior of Emacs 24.3, I think the paren
> which is part of the region should have the same color with the region
> while the paren which is not part of the region can has matching paren
> color. In this way, the user can tell which part is selected and which
> part is not.

Well put.

Yes, it used to be the case that the region highlighting was used
to show clearly what text is in the region (each char), as specified
by the doc:

http://www.gnu.org/software/emacs/manual/html_node/elisp/Displaying-Faces.html

That policy was changed recently, introducing the behavior change
that you report.  Now, other highlighting can take precedence
visually over region highlighting for various chars of the region.

Some people like the change.  Some don't.  Regression or improvement -
take your pick.  (No, you cannot take your pick in practice, e.g.,
via customization.  But you can at least make up your own mind.)

If you are interested, see bugs #15899, #16192, #15618, and this very
long emacs-devel thread:
http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01272.html

15899: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15899
16192: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16192
15618: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15618