[Top][All Lists]

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

Re: Proposed extension of show-paren-mode: Highlight parens when point i

From: Stefan Monnier
Subject: Re: Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin.
Date: Thu, 16 Oct 2014 10:37:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

>> > (defface show-paren-mismatch
>> >   '((((class color)) (:foreground "white" :background "purple"))
>> >     (t (:inverse-video t)))
>> >   "Face used for a mismatching paren."
>> >   :group 'paren-showing-faces)   <-------- paren
>> > ^
>> > |
>> > point
>> Ah, so now your periphery extends to the next line.
> No, no, no!  By the two line arrow symbol, I meant point somewhere before
> ":group".

Oh, I see.  That seems even more weird to me.  I think this one is
pushing things a bit too far for my taste.  I think we should stick to
parens that are separated from point only by whitespace (or something
semantically equivalent such as comments).

And of course, it gets you an ambiguity for

  (defun foo ()

>> That means you get an ambiguity for ....
> Oh no I don't!

Just to be clear: ambiguities aren't that bad (we have them already
when point is between a close and an open paren).

>> >> If so, I guess we should also do it in cases such as:
>> >> foo(blabla<point>);
>> > Hmmm.   Maybe.
>> OK, sounds good.  There have already been requests for that kind of feature.
> OK.  How about showing the paren (and its match) when
> (i) point is touching the paren, and is either outside it (current
> implementation), or inside it (new feature), with an "outside" taking
> prioirty;

Sounds good.  That's the feature requested in

> (ii) point is in the periphery and there is a paren at an extreme edge
> of the core, one at the nearest (to point) edge taking priority (already
> implemented)?

I think we should only consider the extreme edge of the core that's
closest to point.


reply via email to

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