unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Richard Copley <rcopley@gmail.com>, Stefan Kangas <stefan@marxist.se>
Cc: 6978@debbugs.gnu.org
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	[thread overview]
Message-ID: <20191006201136.GA9938@ACM> (raw)
In-Reply-To: <20191006191607.95120.qmail@mail.muc.de>

Hello, Stefan and Richard.

On Sun, Oct 06, 2019 at 19:16:07 -0000, Alan Mackenzie wrote:
> In article <mailman.1131.1570388227.2651.bug-gnu-emacs@gnu.org> you wrote:
> > [-- text/plain, encoding 7bit, charset: UTF-8, 15 lines --]

> > On Sun, 6 Oct 2019 at 18:39, Alan Mackenzie <acm@muc.de> wrote:

> >> In article <mailman.1087.1570362019.2651.bug-gnu-emacs@gnu.org> you wrote:
> >> > "Bob" <purchasebyemail1@comcast.net> 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).





  reply	other threads:[~2019-10-06 20:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-03 16:05 bug#6978: show-paren-mode doesn't match when scope "::" operator is used : emacs 32.1.97 Bob
2019-10-06 11:39 ` Stefan Kangas
     [not found] ` <mailman.1087.1570362019.2651.bug-gnu-emacs@gnu.org>
2019-10-06 17:38   ` Alan Mackenzie
2019-10-06 18:56     ` Richard Copley
     [not found] ` <mailman.1131.1570388227.2651.bug-gnu-emacs@gnu.org>
2019-10-06 19:16   ` Alan Mackenzie
2019-10-06 20:11     ` Alan Mackenzie [this message]
2019-10-06 20:21       ` Stefan Kangas
2019-10-11 19:32         ` Alan Mackenzie

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191006201136.GA9938@ACM \
    --to=acm@muc.de \
    --cc=6978@debbugs.gnu.org \
    --cc=rcopley@gmail.com \
    --cc=stefan@marxist.se \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).