GNU bug report logs -
#70435
30.0.50; cc-mode: <> are sometimes not reconized as parentheses
Previous Next
Reported by: Herman, Géza <geza.herman <at> gmail.com>
Date: Wed, 17 Apr 2024 10:48:06 UTC
Severity: normal
Found in version 30.0.50
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello, Eli.
On Sat, Apr 27, 2024 at 11:33:38 +0300, Eli Zaretskii wrote:
> > From: Herman <at> debbugs.gnu.org, Géza <geza.herman <at> gmail.com>
> > Date: Wed, 17 Apr 2024 12:47:25 +0200
> > This is a subtle bug. In some cases, <> template delimiters are
> > not recognized as delimiters, but punctuation characters.
> > Repro:
> > - put the yasnippet file (included below) into
> > <emacs-config-dir>/snippets/c++-mode/something
> > - install yasnippet
> > - start emacs
> > - M-x c++-mode
> > - M-x yas-minor-mode
> > - load snippets with "M-x yas-reload-all"
> > - write "ig", then press TAB to "yas-expand" the snippet
> > - move the cursor on the opening "<", and execute "M-x describe-char"
> > - notice that it will say "syntax: . which means: punctuation"
> > - if you edit the buffer (like add a space somewhere), and execute
> > describe-char again, Emacs will say "syntax: > which means: open,
> > matches >", so the syntax class becomes correct.
> > A possible explanation for this is that yasnippet edits the buffer in a
> > way that cc-mode doesn't notices the edit, so it has no chance to put
> > the correct syntax info on the inserted characters.
> > This is the snippet file (a simple template declaration):
> > --8<---------------cut here---------------start------------->8---
> > # -*- mode: snippet -*-
> > # name: something
> > # key: ig
> > # --
> > template <${1:typename AAA}> struct Foo;
> > --8<---------------cut here---------------end--------------->8---
> Alan, could you please look into this?
Yes, I will. Thanks!
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 1 year and 11 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.