From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dani Moncayo Newsgroups: gmane.emacs.bugs Subject: bug#9461: 24.0.50; Weird behaviour in "show-parent-mode" Date: Thu, 8 Sep 2011 10:14:37 +0200 Message-ID: References: <87pqjbq4zd.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1315469716 11566 80.91.229.12 (8 Sep 2011 08:15:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 8 Sep 2011 08:15:16 +0000 (UTC) Cc: 9461@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 08 10:15:12 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R1ZlO-0006Op-Iw for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Sep 2011 10:15:10 +0200 Original-Received: from localhost ([::1]:56448 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1ZlN-0007TB-PW for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Sep 2011 04:15:09 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1ZlK-0007QR-Ik for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2011 04:15:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1ZlJ-0006dU-Dv for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2011 04:15:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1ZlJ-0006dG-CJ for bug-gnu-emacs@gnu.org; Thu, 08 Sep 2011 04:15:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R1Zp8-0006XI-6j; Thu, 08 Sep 2011 04:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dani Moncayo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Sep 2011 08:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9461 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9461-submit@debbugs.gnu.org id=B9461.131546991825094 (code B ref 9461); Thu, 08 Sep 2011 08:19:02 +0000 Original-Received: (at 9461) by debbugs.gnu.org; 8 Sep 2011 08:18:38 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R1Zoj-0006Wf-5M for submit@debbugs.gnu.org; Thu, 08 Sep 2011 04:18:38 -0400 Original-Received: from mail-yw0-f44.google.com ([209.85.213.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R1Zog-0006WY-TM for 9461@debbugs.gnu.org; Thu, 08 Sep 2011 04:18:35 -0400 Original-Received: by ywe9 with SMTP id 9so408903ywe.3 for <9461@debbugs.gnu.org>; Thu, 08 Sep 2011 01:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CIrovkUW+uWjNnxmVnGk6NxlMq4alIQOpYmcXTLhImE=; b=lMROj6um2TQZWxO7AxPBcoHmSm7i16ydcgUnAvCfU3iparDfORKNG80TgC3yEWDwRw DPKEcnkyGcBvtkn63DHrxTCWNEPSxl15HXy+iGxjLyTHXZHWFkhbJq36pvXvSgDTsduF 2vUs4W9h0LBLP+algbo6T8dyYLWL/La4VJ4/U= Original-Received: by 10.236.22.33 with SMTP id s21mr2214075yhs.70.1315469677241; Thu, 08 Sep 2011 01:14:37 -0700 (PDT) Original-Received: by 10.236.203.65 with HTTP; Thu, 8 Sep 2011 01:14:37 -0700 (PDT) In-Reply-To: <87pqjbq4zd.fsf@mail.jurta.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 08 Sep 2011 04:19:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:50703 Archived-At: On Thu, Sep 8, 2011 at 01:59, Juri Linkov wrote: >> 1. Create a new buffer: C-x b tmp >> 2. Turn "show-paren-mode" on: M-x show-paren-mode >> 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