From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 70435@debbugs.gnu.org, "Herman Géza" <geza.herman@gmail.com>
Subject: bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as parentheses
Date: Sat, 27 Apr 2024 10:08:11 +0000 [thread overview]
Message-ID: <ZizOi27mZ1_0K5lb@ACM> (raw)
In-Reply-To: <86mspfw6fx.fsf@gnu.org>
Hello, Eli.
On Sat, Apr 27, 2024 at 11:33:38 +0300, Eli Zaretskii wrote:
> > From: Herman@debbugs.gnu.org, Géza <geza.herman@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).
next prev parent reply other threads:[~2024-04-27 10:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 10:47 bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as parentheses Herman, Géza
2024-04-27 8:33 ` Eli Zaretskii
2024-04-27 10:08 ` Alan Mackenzie [this message]
2024-04-28 15:44 ` Alan Mackenzie
2024-04-28 16:47 ` Herman, Géza
2024-04-28 20:31 ` Alan Mackenzie
2024-04-29 15:53 ` Alan Mackenzie
2024-04-29 17:21 ` Herman, Géza
2024-05-02 9:30 ` Eli Zaretskii
2024-05-02 10:24 ` Alan Mackenzie
2024-05-02 12:49 ` Herman, Géza
2024-05-02 13:16 ` bug#70435: 30.0.50; cc-mode: <> are sometimes not recognized " Alan Mackenzie
2024-05-02 19:58 ` Herman, Géza
2024-05-05 11:55 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZizOi27mZ1_0K5lb@ACM \
--to=acm@muc.de \
--cc=70435@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=geza.herman@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.