emacs-devel
[Top][All Lists]
Advanced

[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: Alan Mackenzie
Subject: Re: Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin.
Date: Thu, 16 Oct 2014 13:31:37 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Hello, Stefan.

On Thu, Oct 16, 2014 at 08:59:40AM -0400, Stefan Monnier wrote:

> > (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".

> That means you get an ambiguity for ....

Oh no I don't!

> >> 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;
(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)?

> > But this whole idea was meant just to be a simple extension.

> It's actually simpler to make it apply "everywhere" than only in a few
> particular cases.

[ ... ]

> To tell you the truth, I didn't like much the last show-paren--default
> you showed me.

I'd kind of guessed that.

> I think this new feature should be "completely" external and mostly
> keep the old code untouched.

OK, then.  I'll extract a new defun paren-show--locate-near-paren which
will return a cons (DIR . OLDPOS).  I think that will satisfy you.
Shouldn't take long, I'll send you a new patch soon.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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