[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: |
Sun, 12 Oct 2014 10:18:46 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi, Eli.
On Sun, Oct 12, 2014 at 12:01:58PM +0300, Eli Zaretskii wrote:
> > Date: Sun, 12 Oct 2014 08:39:09 +0000
> > Cc: address@hidden
> > From: Alan Mackenzie <address@hidden>
> > > Thanks, but PLEASE don't call this a "margin".
[ ... ]
I've now called it "periphery" and for that doc-string first line I've
got:
"If non-nil, show parens when point is in the line's periphery."
[ ... ]
> Now, let me ask something about the feature as designed (sorry, don't
> have time right now to apply the patch and try this myself). Suppose
> I have this line of C code:
> FOO = xyz + foobar (a + (b * sqrt (c) - d) * e) - some; /* foo */
> Is the intent to have the parentheses of the call to 'foobar'
> highlighted when point is before "FOO" or inside the comment, but
> _not_ when point is between "xyz" and "foobar"? If so, this is soooo
> weird!
No. The only parens that get highlighted are ones at the beginning or
end of the code on the line (together with their partners).
> And what about this part of your description:
> > So: If point is in the LH margin of the code, highlight the first paren
> > on the line and its match, or failing that, the last paren on the line
> > with its match. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> When would the "first paren and its match" fail?
When the first non-whitespace character on the line isn't a paren.
> Does this mean you are not going to look past the line with point, i.e.
> multi-line parenthesized expressions will not be highlighted?
They will be highlighted when one of the parens touches the line's
periphery; it doesn't matter how far away the matching paren is, it will
get highlighted.
Anyhow, I've just blasted off an amended patch to Stefan. Maybe it's
almost all right now.
--
Alan Mackenzie (Nuremberg, Germany).
Re: Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin., Stefan Monnier, 2014/10/12
- Re: Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin., Alan Mackenzie, 2014/10/12
- Re: Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin., Stefan Monnier, 2014/10/14
- Re: Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin., John Yates, 2014/10/14
- Re: Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin., Alan Mackenzie, 2014/10/15
- Re: Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin., Andy Moreton, 2014/10/15
- Re: Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin., Stefan Monnier, 2014/10/15
- Re: Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin., Alan Mackenzie, 2014/10/16
- Re: Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin., Stefan Monnier, 2014/10/16
- Re: Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin., Alan Mackenzie, 2014/10/16