all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dani Moncayo <dmoncayo@gmail.com>
To: Juri Linkov <juri@jurta.org>
Cc: 9461@debbugs.gnu.org
Subject: bug#9461: 24.0.50; Weird behaviour in "show-parent-mode"
Date: Thu, 8 Sep 2011 10:14:37 +0200	[thread overview]
Message-ID: <CAH8Pv0htOjKmx6WfhvYVRxG6OEHjkE2Y9NADAZ2yNY2crcXt6Q@mail.gmail.com> (raw)
In-Reply-To: <87pqjbq4zd.fsf@mail.jurta.org>

On Thu, Sep 8, 2011 at 01:59, Juri Linkov <juri@jurta.org> wrote:
>> 1. Create a new buffer: C-x b tmp <RET>
>> 2. Turn "show-paren-mode" on: M-x show-paren-mode <RET>
>> 3. Write "\(hello\)".
>> The resulting buffer appearance is shown in the attached file.
>> Why is Emacs trying to match the first "\" with the last ")"?
>
> It highlights with the face `show-paren-mismatch', not `show-paren-match'.

Yes, I know...

I didn't write the expected behavior because I thought it was obvious.
 But well, here we go:

As I see it, if I write "abc(def]", "(" and "]" are _both_ highlighted
with the mismatch font, which is logical, because there is a mismatch
on _both_ characters: the "(" should have a ")" after it (without any
"]" in between), and likely for the "]".

But if I write "abc\(def\)", there is a "(" that matches the ")", so I
don't understand why "a" and ")" are highlighted with the mismatch
font.  TRT would be to highlight both parentheses with the "match"
font.  Even if the ")" didn't have a matching "(", the "a" should
_never_ be highlighted, because that character doesn't expect any
other to match it (at least in fundamental mode, which is the current
one).

Also, one could think that the "close delimiter" meaning of ")" is
cancelled by the previous escape ("\"), but then I would expect that
no highlighting took place at all, because both parentheses are
escaped.

So, definitely something is wrong here, IMO.

-- 
Dani Moncayo





  reply	other threads:[~2011-09-08  8:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-07 17:21 bug#9461: 24.0.50; Weird behaviour in "show-parent-mode" Dani Moncayo
2011-09-07 20:39 ` Andreas Schwab
2011-09-07 20:53   ` Dani Moncayo
2011-09-07 23:06     ` Andreas Schwab
2011-09-07 23:59 ` Juri Linkov
2011-09-08  8:14   ` Dani Moncayo [this message]
2011-09-08 10:42     ` Dani Moncayo
2011-09-08 19:54     ` Juri Linkov
2011-09-09  2:32       ` Stefan Monnier
2011-09-09  9:54         ` Juri Linkov
2011-09-09 11:01           ` Dani Moncayo
2011-09-09 11:38             ` Dani Moncayo
2011-09-09 14:17           ` Stefan Monnier
2011-09-09 15:01             ` Juri Linkov
2011-09-09 21:45               ` Stefan Monnier
2011-09-10 11:28                 ` Juri Linkov
2011-09-09  6:26       ` martin rudalics
2011-09-09  9:55         ` Juri Linkov

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=CAH8Pv0htOjKmx6WfhvYVRxG6OEHjkE2Y9NADAZ2yNY2crcXt6Q@mail.gmail.com \
    --to=dmoncayo@gmail.com \
    --cc=9461@debbugs.gnu.org \
    --cc=juri@jurta.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.