bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6978: show-paren-mode doesn't match when scope "::" operator is used


From: Alan Mackenzie
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
User-agent: Mutt/1.10.1 (2018-07-13)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]