From: Eli Zaretskii <eliz@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin.
Date: Sun, 12 Oct 2014 12:01:58 +0300 [thread overview]
Message-ID: <837g058xvd.fsf@gnu.org> (raw)
In-Reply-To: <20141012083908.GA3148@acm.acm>
> Date: Sun, 12 Oct 2014 08:39:09 +0000
> Cc: emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
>
> > Thanks, but PLEASE don't call this a "margin".
>
> OK, not "margin". But what, then? I tried for some time to come up
> with something better that would still fit into a ~78 character first
> line of the doc string for the new customisable variable. So far, I've
> had this:
>
> "If non-nil, try to show parens when point is in LH or RH margin."
This does not really fit into 78 characters, since LH and RH are
entirely alien notions.
I was about to suggest
"If non-nil, highlight parens when point is inside the indentation."
but that doesn't cover the "RH" part (which I personally find a weird
feature, but that's me).
> Maybe I could omit the "try to ".
Definitely; it doesn't add anything.
> How about something like:
>
> "If non-nil, show parens when point is before or after the line's code."
Works for me.
> As for the name "show-paren-when-point-in-margin", that would have to
> become "show-parens-when-point-outside-code", or something, which isn't
> quite accurate (sometimes, short comments are inside a line of code),
> and isn't very nmonic.
We don't need absolute accuracy if it requires too long names, IMO.
> > We have already too many overloaded meanings of this term, so let's
> > avoid adding yet another one.
>
> Hmm. Or, perhaps we could just admit this, and allow "margin" to be
> used loosely whenever appropriate. ;-).
No, please let's not.
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!
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? Does this mean you
are not going to look past the line with point, i.e. multi-line
parenthesized expressions will not be highlighted?
next prev parent reply other threads:[~2014-10-12 9:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-11 13:43 Proposed extension of show-paren-mode: Highlight parens when point is in L or R margin Alan Mackenzie
2014-10-11 14:21 ` Eli Zaretskii
2014-10-12 8:39 ` Alan Mackenzie
2014-10-12 8:55 ` David Kastrup
2014-10-12 9:25 ` Alan Mackenzie
2014-10-12 9:01 ` Eli Zaretskii [this message]
2014-10-12 10:18 ` Alan Mackenzie
2014-10-12 4:12 ` Stefan Monnier
2014-10-12 10:04 ` Alan Mackenzie
2014-10-14 17:49 ` Stefan Monnier
2014-10-14 18:32 ` John Yates
2014-10-15 9:12 ` Alan Mackenzie
2014-10-15 22:38 ` Andy Moreton
2014-10-16 2:43 ` Stefan Monnier
2014-10-16 9:53 ` Alan Mackenzie
2014-10-16 12:59 ` Stefan Monnier
2014-10-16 13:31 ` Alan Mackenzie
2014-10-16 14:37 ` Stefan Monnier
2014-10-16 15:46 ` Alan Mackenzie
2014-10-16 17:40 ` Stefan Monnier
2014-10-16 21:26 ` Alan Mackenzie
2014-10-17 0:14 ` Stefan Monnier
2014-10-14 21:50 ` João Távora
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=837g058xvd.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=acm@muc.de \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.