From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as parentheses Date: Sat, 27 Apr 2024 11:33:38 +0300 Message-ID: <86mspfw6fx.fsf@gnu.org> References: <87le5cuuyq.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28493"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70435@debbugs.gnu.org To: Herman =?UTF-8?Q?G=C3=A9za?= , Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 27 10:35:19 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s0dWg-0007BZ-Sn for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Apr 2024 10:35:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s0dWR-00082w-8D; Sat, 27 Apr 2024 04:35:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s0dWL-00082L-2V for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 04:34:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s0dWK-0002x3-QL for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 04:34:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s0dWc-0007z8-Vb for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 04:35:15 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Apr 2024 08:35:14 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70435 X-GNU-PR-Package: emacs Original-Received: via spool by 70435-submit@debbugs.gnu.org id=B70435.171420690230529 (code B ref 70435); Sat, 27 Apr 2024 08:35:14 +0000 Original-Received: (at 70435) by debbugs.gnu.org; 27 Apr 2024 08:35:02 +0000 Original-Received: from localhost ([127.0.0.1]:38892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0dWK-0007vh-9A for submit@debbugs.gnu.org; Sat, 27 Apr 2024 04:35:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0dVW-0007nZ-SN for 70435@debbugs.gnu.org; Sat, 27 Apr 2024 04:34:11 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s0dV8-0002rm-4t; Sat, 27 Apr 2024 04:33:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=yU32ebQC7Wgs1KhmptABfWtmsMyQ2QlF7FkB+pJrOy4=; b=ipsKWVGtVeHbQwJcUhYw +o+4HNsPIQXKMKkLJVcNVklCcfaAs2Jc0W/ZMS3aVmiiFAz5TUQxmelNYhOZ0j+zJo1on5jeMeqUW yNPy96dtuRKG4HOwg3oaQ5UqQfRl8wm0ZeLCl5YLpqM1IEClPdxdgT5F+QxBS8Gqe/NH6BIcXs8lc EK/p+GJr5AUQ7cJnTA3VCP7AX7fhozMWmMDSH2REoecHo9FZhAkVfNYdD8i7uB9O14x7NHmwzsvX9 7S955clMLQbjGqIzVTqNlKJ8d1yBcYLwUpvODbZZ7yvB8jDUIRyjk31+jCGn6BpPe7uqe7fqt8ixp 1f61u6kblOePSA==; In-Reply-To: <87le5cuuyq.fsf@gmail.com> (Herman@debbugs.gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284022 Archived-At: > From: Herman@debbugs.gnu.org, Géza > 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 > /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?