GNU bug report logs -
#6978
show-paren-mode doesn't match when scope "::" operator is used : emacs 32.1.97
Previous Next
Reported by: "Bob" <purchasebyemail1 <at> comcast.net>
Date: Fri, 3 Sep 2010 16:10:02 UTC
Severity: minor
Found in versions 24.0.90, 27.0.50
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 6978 <at> debbugs.gnu.org (full text, mbox):
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 <at> gnu.org> you wrote:
> > [-- text/plain, encoding 7bit, charset: UTF-8, 15 lines --]
> > On Sun, 6 Oct 2019 at 18:39, Alan Mackenzie <acm <at> muc.de> wrote:
> >> In article <mailman.1087.1570362019.2651.bug-gnu-emacs <at> gnu.org> you wrote:
> >> > "Bob" <purchasebyemail1 <at> 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).
This bug report was last modified 5 years and 223 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.