From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#6978: show-paren-mode doesn't match when scope "::" operator is used : emacs 32.1.97 Date: Sun, 6 Oct 2019 20:11:36 +0000 Message-ID: <20191006201136.GA9938@ACM> References: <000301cb4b81$c9b81560$5d284020$@net> <20191006191607.95120.qmail@mail.muc.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="90077"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 6978@debbugs.gnu.org To: Richard Copley , Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 06 22:12:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iHCt3-000NJz-M9 for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Oct 2019 22:12:13 +0200 Original-Received: from localhost ([::1]:36766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHCt2-0000Tq-1S for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Oct 2019 16:12:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33490) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHCsv-0000Tg-3D for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2019 16:12:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHCsu-0006xF-1J for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2019 16:12:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38114) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iHCst-0006ww-O7; Sun, 06 Oct 2019 16:12:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iHCsr-00047X-Rm; Sun, 06 Oct 2019 16:12:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 06 Oct 2019 20:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6978 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 6978-submit@debbugs.gnu.org id=B6978.157039270215802 (code B ref 6978); Sun, 06 Oct 2019 20:12:01 +0000 Original-Received: (at 6978) by debbugs.gnu.org; 6 Oct 2019 20:11:42 +0000 Original-Received: from localhost ([127.0.0.1]:46935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHCsY-00046o-1d for submit@debbugs.gnu.org; Sun, 06 Oct 2019 16:11:42 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:24935 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1iHCsW-00046f-8Q for 6978@debbugs.gnu.org; Sun, 06 Oct 2019 16:11:40 -0400 Original-Received: (qmail 12965 invoked by uid 3782); 6 Oct 2019 20:11:38 -0000 Original-Received: from acm.muc.de (p4FE15E04.dip0.t-ipconnect.de [79.225.94.4]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 06 Oct 2019 22:11:36 +0200 Original-Received: (qmail 10003 invoked by uid 1000); 6 Oct 2019 20:11:36 -0000 Content-Disposition: inline In-Reply-To: <20191006191607.95120.qmail@mail.muc.de> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:168463 Archived-At: Hello, Stefan and Richard. On Sun, Oct 06, 2019 at 19:16:07 -0000, Alan Mackenzie wrote: > In article you wrote: > > [-- text/plain, encoding 7bit, charset: UTF-8, 15 lines --] > > On Sun, 6 Oct 2019 at 18:39, Alan Mackenzie wrote: > >> In article you wrote: > >> > "Bob" writes: > >> >> struct Bar<::Foo1> // "(show-paren-mode)" does not match `>` > >> >> to `<` > >> The pertinent < and > are not being marked with > >> syntax-table text properties, hence can't be recognised as parens. > > Digraphs? (Just a thought.) > Spot on! > I just need to find a way of removing <: from the regexp used to check > the opening <. Shouldn't be too difficult. The following seems to fix the bug: diff -r b0943da37755 cc-langs.el --- a/cc-langs.el Thu Oct 03 14:14:45 2019 +0000 +++ b/cc-langs.el Sun Oct 06 20:08:43 2019 +0000 @@ -1382,11 +1382,11 @@ (c-lang-defconst c-<-op-cont-regexp ;; Regexp matching the second and subsequent characters of all - ;; multicharacter tokens that begin with "<". + ;; multicharacter tokens that begin with "<", apart from digraphs. t (c-make-keywords-re nil (c-filter-ops (c-lang-const c-all-op-syntax-tokens) t - "\\`<." + "\\`<[^:]" (lambda (op) (substring op 1))))) (c-lang-defvar c-<-op-cont-regexp (c-lang-const c-<-op-cont-regexp)) > > Best, > > Richard. -- Alan Mackenzie (Nuremberg, Germany).