GNU bug report logs - #70435
30.0.50; cc-mode: <> are sometimes not reconized as parentheses

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Herman, GĂ©za <geza.herman@HIDDEN>; dated Wed, 17 Apr 2024 10:48:06 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 70435 <at> debbugs.gnu.org:


Received: (at 70435) by debbugs.gnu.org; 2 May 2024 13:17:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 02 09:17:02 2024
Received: from localhost ([127.0.0.1]:43746 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s2WJ4-0000E6-9T
	for submit <at> debbugs.gnu.org; Thu, 02 May 2024 09:17:02 -0400
Received: from mail.muc.de ([193.149.48.3]:32149)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1s2WJ0-0000DS-U1
 for 70435 <at> debbugs.gnu.org; Thu, 02 May 2024 09:17:00 -0400
Received: (qmail 7888 invoked by uid 3782); 2 May 2024 15:16:31 +0200
Received: from muc.de (p4fe15d0d.dip0.t-ipconnect.de [79.225.93.13]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Thu, 02 May 2024 15:16:30 +0200
Received: (qmail 9747 invoked by uid 1000); 2 May 2024 13:16:27 -0000
Date: Thu, 2 May 2024 13:16:27 +0000
To: Herman =?iso-8859-1?Q?G=E9za?= <geza.herman@HIDDEN>
Subject: Re: bug#70435: 30.0.50; cc-mode: <> are sometimes not recognized as
 parentheses
Message-ID: <ZjOSKwu_3SxMEE9L@ACM>
References: <87le5cuuyq.fsf@HIDDEN> <Zi5u418Bzy0ryzb1@ACM>
 <87y18xifpb.fsf@HIDDEN> <Zi_ClIsqXS0fccCd@ACM>
 <87sez4uleo.fsf@HIDDEN> <8634r0muh3.fsf@HIDDEN>
 <ZjNp16i3Y7C9zfJ5@ACM> <87zft8s7dh.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87zft8s7dh.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 70435
Cc: acm@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 70435 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Géza.

On Thu, May 02, 2024 at 14:49:57 +0200, Herman, Géza wrote:

> Alan Mackenzie <acm@HIDDEN> writes:

> > Géza, would you be prepared to do a little more testing if I modified
> > the patch?

> Sure, I'm happy to test whether a modified patch still fixes the issue.

Thanks, that's appreciated.

The modified patch is quite a bit shorter than the first one, but it does
a little more.  There was a subtle detail about deleting an unterminated
string, too.

Please remove the first patch from your cc-engine.el, then apply the
patch below.  Byte compile cc-engine.el, then load the resulting CC Mode
into a running Emacs (or restart Emacs).  The test case should (still) be
fixed.

Any testing you can do on real code would also be appreciated.  Please
confirm, again, that the bug is truly fixed, or tell me what still needs
to be fixed.  Thanks!

Here's the patch.  It should apply cleanly to the Emacs master:



diff -r 072940aaeb40 cc-engine.el
--- a/cc-engine.el	Sun Apr 14 07:59:01 2024 +0000
+++ b/cc-engine.el	Thu May 02 13:05:48 2024 +0000
@@ -7172,7 +7172,7 @@
   ;; FIXME!!!  This routine ignores the possibility of macros entirely.
   ;; 2010-01-29.
 
-  (when (> end beg)
+  (when (or old-len (> end beg))
     ;; Extend the region (BEG END) to deal with any complicating literals.
     (let* ((lit-search-beg (if (memq (char-before beg) '(?/ ?*))
 			       (1- beg) beg))
@@ -7246,7 +7246,8 @@
 		  (c-put-char-properties beg end 'syntax-table '(1))
 		  ;; If an open string's opener has just been neutralized,
 		  ;; do the same to the terminating LF.
-		  (when (and end-literal-end
+		  (when (and (> end beg)
+			     end-literal-end
 			     (eq (char-before end-literal-end) ?\n)
 			     (equal (c-get-char-property
 				     (1- end-literal-end) 'syntax-table)


-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70435; Package emacs. Full text available.

Message received at 70435 <at> debbugs.gnu.org:


Received: (at 70435) by debbugs.gnu.org; 2 May 2024 12:53:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 02 08:53:33 2024
Received: from localhost ([127.0.0.1]:43599 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s2VwL-0005bu-9r
	for submit <at> debbugs.gnu.org; Thu, 02 May 2024 08:53:33 -0400
Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:48444)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <geza.herman@HIDDEN>) id 1s2VwG-0005bk-AZ
 for 70435 <at> debbugs.gnu.org; Thu, 02 May 2024 08:53:32 -0400
Received: by mail-ej1-x636.google.com with SMTP id
 a640c23a62f3a-a596cb8a7dbso106177966b.1
 for <70435 <at> debbugs.gnu.org>; Thu, 02 May 2024 05:53:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1714654380; x=1715259180; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:message-id:in-reply-to:date
 :subject:cc:to:from:references:from:to:cc:subject:date:message-id
 :reply-to; bh=08XJDNl89bGyY2G62sgHIl9JK8bN1Px+KmD1EaGu2JQ=;
 b=VMDDBSPJ8Y6GFy5IMkZTOtT4wSphJaJ83LqIcEItHEr5evquTTj6W1ovr02+4nxf+o
 1O5IiNRhsx8Bs83h12mOTJ4iFw6rziNg5TNgv0tAmcbBdKbzG/ZyGLD/qKJ2bW6HDbCs
 hPztZrLkRF2FIPs3UqDIwsE7T1uuzwNnrUHnSP6hzADKEXCsuUMR3GoGSMnC5K0br7Zl
 x4dAH43HzF5bBOcCIv3oYpFs/+lFyyONeZyf8ALY7ke8c6W9hTuZznZfbIz6YRS5cl2g
 0lo3m9MRLzk3lVafdRU66sblSuR77gA7HbpWotvIcLKLr0IGX7t27l6bk28hslVeg2A2
 nYHQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1714654380; x=1715259180;
 h=content-transfer-encoding:mime-version:message-id:in-reply-to:date
 :subject:cc:to:from:references:x-gm-message-state:from:to:cc:subject
 :date:message-id:reply-to;
 bh=08XJDNl89bGyY2G62sgHIl9JK8bN1Px+KmD1EaGu2JQ=;
 b=RpIdK6rz00XSnOcRZxS9m8sLvOdCXKjbcF62yd+htNElFFqIw7H7XlNfnpVFKbwZKD
 SfozvfmSagGNjYlQRTEEMiKZzzJSBoeQZFRlGuS5uz9pvOUHV4hNQz201KjHA6LU2QAE
 a6s7NWCZv2SRrLPaIaDVStZ77TNqQ4/W+qfNeMRBxBHt+Qz7Mn2fDYl8xYrXSiohIUrP
 7CBhAxMdDqnFKmJ0dAEG2HNL0QMRzveAEuEZvelfs6VrzblCFTh4rqOQmpEwE2RLrFet
 9e8QWlH/qnpauhjLyYj2Km3cq8YVIw3x6gzixdnd6vgHcCFQfY9bTtWqsXlMRMFIEjUK
 zSSQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCWAWKok610Ba1d21CdTC9D82yBrs0mU6YnllWvQBMiw9BMh7jbB4D83eMW7xQtfAa5M2gOw+lH4jQxiVippP3Bexk5Arhg=
X-Gm-Message-State: AOJu0YxdMmAtq1xI6svYtYFVnYIlqNh6OE67gTLBiVk0CpWRdmcswG0q
 PXWPJuewBc9jKOXnc2BDb0lF3r24D/2QwSGnEq6gfZ7vitQmmEXQ
X-Google-Smtp-Source: AGHT+IGyltHwOw5F2n2uR/ZpWL0cy6Pn8E7LB31ETcDYWHJlqkeDJjWVHO4oToUS4Xdr53gJwHYeuA==
X-Received: by 2002:a17:906:a396:b0:a55:b2d8:c584 with SMTP id
 k22-20020a170906a39600b00a55b2d8c584mr3670516ejz.66.1714654380390; 
 Thu, 02 May 2024 05:53:00 -0700 (PDT)
Received: from localhost (62-77-231-86.static.invitel.hu. [62.77.231.86])
 by smtp.gmail.com with ESMTPSA id
 uo8-20020a170907cc0800b00a5971c23e59sm334048ejc.82.2024.05.02.05.52.59
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 02 May 2024 05:52:59 -0700 (PDT)
References: <87le5cuuyq.fsf@HIDDEN> <Zi5u418Bzy0ryzb1@ACM>
 <87y18xifpb.fsf@HIDDEN> <Zi_ClIsqXS0fccCd@ACM>
 <87sez4uleo.fsf@HIDDEN> <8634r0muh3.fsf@HIDDEN> <ZjNp16i3Y7C9zfJ5@ACM>
From: =?utf-8?Q?Herman=2C_G=C3=A9za?= <geza.herman@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>
Subject: Re: bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as
 parentheses
Date: Thu, 02 May 2024 14:49:57 +0200
In-reply-to: <ZjNp16i3Y7C9zfJ5@ACM>
Message-ID: <87zft8s7dh.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70435
Cc: Eli Zaretskii <eliz@HIDDEN>, 70435 <at> debbugs.gnu.org,
 =?utf-8?Q?G=C3=A9za?= Herman <geza.herman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Alan Mackenzie <acm@HIDDEN> writes:

> G=C3=A9za, would you be prepared to do a little more testing if I=20
> modified the
> patch?

Sure, I'm happy to test whether a modified patch still fixes the=20
issue.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70435; Package emacs. Full text available.

Message received at 70435 <at> debbugs.gnu.org:


Received: (at 70435) by debbugs.gnu.org; 2 May 2024 10:24:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 02 06:24:57 2024
Received: from localhost ([127.0.0.1]:42899 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s2TcW-0006eX-RY
	for submit <at> debbugs.gnu.org; Thu, 02 May 2024 06:24:57 -0400
Received: from mail.muc.de ([193.149.48.3]:18753)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1s2TcV-0006eR-Fw
 for 70435 <at> debbugs.gnu.org; Thu, 02 May 2024 06:24:56 -0400
Received: (qmail 11469 invoked by uid 3782); 2 May 2024 12:24:27 +0200
Received: from muc.de (p4fe15d0d.dip0.t-ipconnect.de [79.225.93.13]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Thu, 02 May 2024 12:24:27 +0200
Received: (qmail 9589 invoked by uid 1000); 2 May 2024 10:24:23 -0000
Date: Thu, 2 May 2024 10:24:23 +0000
To: Eli Zaretskii <eliz@HIDDEN>,
 =?iso-8859-1?Q?G=E9za?= Herman <geza.herman@HIDDEN>
Subject: Re: bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as
 parentheses
Message-ID: <ZjNp16i3Y7C9zfJ5@ACM>
References: <87le5cuuyq.fsf@HIDDEN> <Zi5u418Bzy0ryzb1@ACM>
 <87y18xifpb.fsf@HIDDEN> <Zi_ClIsqXS0fccCd@ACM>
 <87sez4uleo.fsf@HIDDEN> <8634r0muh3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <8634r0muh3.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 70435
Cc: 70435 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Eli and Géza.

On Thu, May 02, 2024 at 12:30:32 +0300, Eli Zaretskii wrote:
> > From: Herman, Géza <geza.herman@HIDDEN>
> > Cc: Herman Géza <geza.herman@HIDDEN>,
> >  70435 <at> debbugs.gnu.org, Eli
> >  Zaretskii <eliz@HIDDEN>
> > Date: Mon, 29 Apr 2024 19:21:01 +0200


> > Hello Alan,

> > Alan Mackenzie <acm@HIDDEN> writes:

> > > I have a fix, I think.  It is actually a two line fix, removing 
> > > a test
> > > from the top of a function, but it involves reindenting the 
> > > entire rest
> > > of the function.

> > > Please apply the patch below, recompile cc-engine.el, then load 
> > > the
> > > resulting CC Mode into a running Emacs.  Please test it on your 
> > > real C++
> > > code, and let me know if the bug is actually fixed.  Thanks!

> > I can confirm that the patch fixes the issue, I tested it in real 
> > circumstances.

> > Thanks for fixing the problem so quickly!

> Alan, should this bug be closed now?

Apologies for my dithering.  I've been having second thoughts about the
patch in the last few days, and wondering whether I should refine it.

It's all to do with a function c-unmark-<>-around-region, which was run
in before-change-functions for a deletion, and after-change-functions for
an insertion.  The patch I sent to Géza made that function run in before-
and after-c-f both for insertions and deletions.

I've been wondering whether that is strictly necessary, since it will
slow down CC Mode a little.  I'm thinking that in the
insertion/before-c-f case, I might not need the call.

Géza, would you be prepared to do a little more testing if I modified the
patch?

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70435; Package emacs. Full text available.

Message received at 70435 <at> debbugs.gnu.org:


Received: (at 70435) by debbugs.gnu.org; 2 May 2024 09:31:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 02 05:31:08 2024
Received: from localhost ([127.0.0.1]:42649 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s2SmR-00064i-WE
	for submit <at> debbugs.gnu.org; Thu, 02 May 2024 05:31:08 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52554)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s2SmP-00064F-Bq
 for 70435 <at> debbugs.gnu.org; Thu, 02 May 2024 05:31:05 -0400
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 <eliz@HIDDEN>)
 id 1s2Slx-00050A-KD; Thu, 02 May 2024 05:30:37 -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=C9xhLJCJGfKc4IgsGhs/ofO5w7VRVxcb3+ZIxXXYa4w=; b=RpyNAct46YkCvmsqdSrl
 CC0iJqGHC1VrkcUsIK7rQBIfhivAHUx32n+3F6EDzBWM09crVc6mv4QNML85G1wWwTzEu1XKt1usL
 UUEk4aCu9H80QBazk3jfHYR6KrCdYmjlENuku60d2LCDoWgwCRQuNWUVF0oRTyla3Gc7cPYygHKre
 1+87Mb1L3MOGEtR12/4bmOGTA8OY9ugh3UgVvdrIXTqhMxYHuoA5JSFBmfn5nAeQxkInFlM4cdV9L
 bwEQW7f5VU810A2dXXq7ropNByI+pM3z7bC6+C1STOEoeIA/sra+QtM6HFvChaFwdbz+qZwUjGTNx
 NpDV46kkPdyZTA==;
Date: Thu, 02 May 2024 12:30:32 +0300
Message-Id: <8634r0muh3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: =?utf-8?Q?G=C3=A9za_Herman?= <geza.herman@HIDDEN>
In-Reply-To: <87sez4uleo.fsf@HIDDEN> (message from Herman, =?utf-8?Q?G?=
 =?utf-8?Q?=C3=A9za?= on Mon, 29 Apr 2024 19:21:01 +0200)
Subject: Re: bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as
 parentheses
References: <87le5cuuyq.fsf@HIDDEN> <Zi5u418Bzy0ryzb1@ACM>
 <87y18xifpb.fsf@HIDDEN> <Zi_ClIsqXS0fccCd@ACM> <87sez4uleo.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70435
Cc: acm@HIDDEN, 70435 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Herman, GĂ©za <geza.herman@HIDDEN>
> Cc: Herman GĂ©za <geza.herman@HIDDEN>,
>  70435 <at> debbugs.gnu.org, Eli
>  Zaretskii <eliz@HIDDEN>
> Date: Mon, 29 Apr 2024 19:21:01 +0200
> 
> 
> Hello Alan,
> 
> Alan Mackenzie <acm@HIDDEN> writes:
> 
> > I have a fix, I think.  It is actually a two line fix, removing 
> > a test
> > from the top of a function, but it involves reindenting the 
> > entire rest
> > of the function.
> >
> > Please apply the patch below, recompile cc-engine.el, then load 
> > the
> > resulting CC Mode into a running Emacs.  Please test it on your 
> > real C++
> > code, and let me know if the bug is actually fixed.  Thanks!
> 
> I can confirm that the patch fixes the issue, I tested it in real 
> circumstances.
> 
> Thanks for fixing the problem so quickly!

Alan, should this bug be closed now?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70435; Package emacs. Full text available.

Message received at 70435 <at> debbugs.gnu.org:


Received: (at 70435) by debbugs.gnu.org; 29 Apr 2024 17:30:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 29 13:30:38 2024
Received: from localhost ([127.0.0.1]:58374 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s1Upq-0008T4-1V
	for submit <at> debbugs.gnu.org; Mon, 29 Apr 2024 13:30:38 -0400
Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:44409)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <geza.herman@HIDDEN>) id 1s1Upn-0008St-My
 for 70435 <at> debbugs.gnu.org; Mon, 29 Apr 2024 13:30:36 -0400
Received: by mail-lf1-x12b.google.com with SMTP id
 2adb3069b0e04-51ab4ee9df8so5942460e87.1
 for <70435 <at> debbugs.gnu.org>; Mon, 29 Apr 2024 10:30:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1714411809; x=1715016609; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:message-id:in-reply-to:date
 :subject:cc:to:from:references:from:to:cc:subject:date:message-id
 :reply-to; bh=tRZloGJMvhcWltkK/hCwSvwc2XRYgch2A4LYeh58ttA=;
 b=AwNpWNT6wA5NclhUqxg1ZEzAPsTJjtI6LQjJ9SwienwIaMmW5WBWtYkoneFGj4Lmfr
 quF4G9Bbr80p2iq4azGttXGxugOJ5Puif0qOnfwVRilqwfZZ6a4Ha+e+dGkS+FZpyOfL
 O1XvYYamPJg/g5c+dQtghYvAyrNlcRg3hmj0lXIQ6lVVmEztges6hfOIaM4pypI0i/UR
 u7pNkhK68J+7clC+3uL42X7fvdGqrSSIYCFunyl0EikpYmbzeTb4fuD+Whib1N12AGSP
 NsYAdfoxe4UyBhmRgv8IgrrUV64eIVFqs//VBWZRfYcq5uWqVdbevuEmmY5gktSfFxKH
 pBxQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1714411809; x=1715016609;
 h=content-transfer-encoding:mime-version:message-id:in-reply-to:date
 :subject:cc:to:from:references:x-gm-message-state:from:to:cc:subject
 :date:message-id:reply-to;
 bh=tRZloGJMvhcWltkK/hCwSvwc2XRYgch2A4LYeh58ttA=;
 b=ovBIM06lasQThM2Tn9wd/tRl1bGO3h+7TeHi5YDay83p0nN9Rp5nebXPvbdzlU3ONR
 StpqkcHgt9dWPOIw1UOt4mIPNQXGW7ID08KZclZ0JK32zWbaNKmdXl9pae7LrdB5bDA7
 qgh5vfcU3oAMgSmkNF44py34kq+7+W5Pw5u6ClxQtGw02hR9ZdFR27/SWwc4Vr4Di0yS
 rnziIDsY9dsczE4LMSVAjdX6xHHUw6wKljmzJOVfOioAgHKrgTEStZABPnzxG67rjv28
 M4Nn5G+iT5wij0XM6joHyOtTJ7Km3YqrLVCqD4QioM81Blgiv7B77qbzB+TfCFTHP6fx
 NpcQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCVOlISActdlnza4obl7V6Bj07pthFyTiPF+BxAPAGnpJe8bYirHOyoJSVQOJ3Pvclbl6cbzftta2azwGA7EA/j83Q8r0OM=
X-Gm-Message-State: AOJu0Yz4/eUPj3NBYcTZ2Gg+yMIFmsowqchYie0UyIlxpwJCd3q5BJ/p
 wOJi6W1lHqQ0qGAftReju7fIKhSu03+6pAascJm47zRtUoAWR/ZS
X-Google-Smtp-Source: AGHT+IHI4jpTZIBD0zLKDEmM7iyoGyMNpbcoZKOrB1QokHHDlASarcXXKg+webZXL2IAK1/fKH0+2g==
X-Received: by 2002:a05:6512:3b85:b0:51d:82d1:8040 with SMTP id
 g5-20020a0565123b8500b0051d82d18040mr4060049lfv.10.1714411809231; 
 Mon, 29 Apr 2024 10:30:09 -0700 (PDT)
Received: from localhost (netacc-gpn-4-8-242.pool.yettel.hu. [84.224.8.242])
 by smtp.gmail.com with ESMTPSA id
 a14-20020a1709065f8e00b00a559bbe8a00sm11344152eju.100.2024.04.29.10.30.08
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 29 Apr 2024 10:30:08 -0700 (PDT)
References: <87le5cuuyq.fsf@HIDDEN> <Zi5u418Bzy0ryzb1@ACM>
 <87y18xifpb.fsf@HIDDEN> <Zi_ClIsqXS0fccCd@ACM>
From: =?utf-8?Q?Herman=2C_G=C3=A9za?= <geza.herman@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>
Subject: Re: bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as
 parentheses
Date: Mon, 29 Apr 2024 19:21:01 +0200
In-reply-to: <Zi_ClIsqXS0fccCd@ACM>
Message-ID: <87sez4uleo.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70435
Cc: Eli Zaretskii <eliz@HIDDEN>, 70435 <at> debbugs.gnu.org,
 Herman =?utf-8?Q?G=C3=A9za?= <geza.herman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Hello Alan,

Alan Mackenzie <acm@HIDDEN> writes:

> I have a fix, I think.  It is actually a two line fix, removing=20
> a test
> from the top of a function, but it involves reindenting the=20
> entire rest
> of the function.
>
> Please apply the patch below, recompile cc-engine.el, then load=20
> the
> resulting CC Mode into a running Emacs.  Please test it on your=20
> real C++
> code, and let me know if the bug is actually fixed.  Thanks!

I can confirm that the patch fixes the issue, I tested it in real=20
circumstances.

Thanks for fixing the problem so quickly!

G=C3=A9za




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70435; Package emacs. Full text available.

Message received at 70435 <at> debbugs.gnu.org:


Received: (at 70435) by debbugs.gnu.org; 29 Apr 2024 15:54:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 29 11:54:28 2024
Received: from localhost ([127.0.0.1]:57969 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s1TKl-0007Hs-91
	for submit <at> debbugs.gnu.org; Mon, 29 Apr 2024 11:54:28 -0400
Received: from mail.muc.de ([193.149.48.3]:10539)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1s1TKi-0007Hm-Ny
 for 70435 <at> debbugs.gnu.org; Mon, 29 Apr 2024 11:54:26 -0400
Received: (qmail 69857 invoked by uid 3782); 29 Apr 2024 17:53:57 +0200
Received: from muc.de (pd953a905.dip0.t-ipconnect.de [217.83.169.5]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Mon, 29 Apr 2024 17:53:57 +0200
Received: (qmail 16151 invoked by uid 1000); 29 Apr 2024 15:53:56 -0000
Date: Mon, 29 Apr 2024 15:53:56 +0000
To: Herman =?iso-8859-1?Q?G=E9za?= <geza.herman@HIDDEN>
Subject: Re: bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as
 parentheses
Message-ID: <Zi_ClIsqXS0fccCd@ACM>
References: <87le5cuuyq.fsf@HIDDEN> <Zi5u418Bzy0ryzb1@ACM>
 <87y18xifpb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87y18xifpb.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 70435
Cc: acm@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 70435 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Géza.

On Sun, Apr 28, 2024 at 18:47:47 +0200, Herman, Géza wrote:
> Hello Alan,

> Alan Mackenzie <acm@HIDDEN> writes:

> > You've been a little less than fully explicit, but I think you're
> > executing these commands in the *scratch* buffer.  The first two
> > lines, which are commented out in emacs-lisp-mode, are no longer
> > commented out in C++ Mode.  There is a whole line of garbage after
> > the last end of statement marker, the (double) semicolon on line 2.

> > On using ig<TAB> to insert the snippet, it is hardly surprising that
> > CC Mode's syntactic analysis gets confused.  If you first comment
> > out those first two lines (put the region around them and do C-c
> > C-c), then the inserted snippet appears to get the correct syntax on
> > its template markers.

> > I don't think there's a bug here.  If you could show ig<TAB>
> > producing the effect when typed inside a syntactically correct
> > context, things might be different.  Can you reproduce the effect in
> > correct C++ code?

> You're right, it seems that the example I provided wasn't the best
> (this issue happens with me in real code, I tried to create a minimal
> reproducible example).

> If you delete the garbage from the scratch buffer, the bug doesn't
> reproduce indeed.  But, if you run (setq font-lock-maximum-decoration
> 2) before switching to c++-mode, the issue reproduces with an empty
> scratch buffer.  I use this setting because font-lock runs much faster
> this way, and I rely on the LSP server to do the "full" highlighting.

OK, as already said, I can reproduce the bug this way.  Thanks!

> Sorry about the bad example, here are the fixed repro steps:

> Repro:
> - put the yasnippet file (included below) into
> <emacs-config-dir>/snippets/c++-mode/something
> - install yasnippet
> - start emacs, scratch buffer appears
> - delete the contents of the scratch buffer
> - M-: (setq font-lock-maximum-decoration 2)
> - 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.

I have a fix, I think.  It is actually a two line fix, removing a test
from the top of a function, but it involves reindenting the entire rest
of the function.

Please apply the patch below, recompile cc-engine.el, then load the
resulting CC Mode into a running Emacs.  Please test it on your real C++
code, and let me know if the bug is actually fixed.  Thanks!


diff -r 072940aaeb40 cc-engine.el
--- a/cc-engine.el	Sun Apr 14 07:59:01 2024 +0000
+++ b/cc-engine.el	Mon Apr 29 15:42:05 2024 +0000
@@ -7172,153 +7172,152 @@
   ;; FIXME!!!  This routine ignores the possibility of macros entirely.
   ;; 2010-01-29.
 
-  (when (> end beg)
-    ;; Extend the region (BEG END) to deal with any complicating literals.
-    (let* ((lit-search-beg (if (memq (char-before beg) '(?/ ?*))
-			       (1- beg) beg))
-	   (lit-search-end (if (memq (char-after end) '(?/ ?*))
-			       (1+ end) end))
-	   ;; Note we can't use c-full-pp-to-literal here, since we haven't
-	   ;; yet applied syntax-table properties to ends of lines, etc.
-	   (lit-search-beg-s (c-semi-pp-to-literal lit-search-beg))
-	   (beg-literal-beg (car (cddr lit-search-beg-s)))
-	   (lit-search-end-s (c-semi-pp-to-literal lit-search-end))
-	   (end-literal-beg (car (cddr lit-search-end-s)))
-	   (beg-literal-end (c-end-of-literal lit-search-beg-s lit-search-beg))
-	   (end-literal-end (c-end-of-literal lit-search-end-s lit-search-end))
-	   new-beg new-end search-region)
-
-      ;; Determine any new end of literal resulting from the insertion/deletion.
-      (setq search-region
-	    (if (and (eq beg-literal-beg end-literal-beg)
-		     (eq beg-literal-end end-literal-end))
-		(if beg-literal-beg
-		    nil
-		  (cons beg
-			(max end
-			     (or beg-literal-end (point-min))
-			     (or end-literal-end (point-min)))))
-	      (cons (or beg-literal-beg beg)
-		    (max end
-			 (or beg-literal-end (point-min))
-			 (or end-literal-end (point-min))))))
-
-      (when search-region
-	;; If we've just inserted text, mask its syntaxes temporarily so that
-	;; they won't interfere with the undoing of the properties on the <s
-	;; and >s.
-	(c-save-buffer-state (syn-tab-settings syn-tab-value
-					       swap-open-string-ends)
-	  (unwind-protect
-	      (progn
-		(when old-len
-		  ;; Special case: If a \ has just been inserted into a
-		  ;; string, escaping or unescaping a LF, temporarily swap
-		  ;; the LF's syntax-table text property with that of the
-		  ;; former end of the open string.
-		  (goto-char end)
-		  (when (and (eq (cadr lit-search-beg-s) 'string)
-			     (not (eq beg-literal-end end-literal-end))
-			     (skip-chars-forward "\\\\")
-			     (eq (char-after) ?\n)
-			     (not (zerop (skip-chars-backward "\\\\"))))
-		    (setq swap-open-string-ends t)
-		    (if (c-get-char-property (1- beg-literal-end)
-					     'syntax-table)
-			(progn
-			  (c-clear-char-property (1- beg-literal-end)
-						 'syntax-table)
-			  (c-put-string-fence (1- end-literal-end)))
-		      (c-put-string-fence (1- beg-literal-end))
-		      (c-clear-char-property (1- end-literal-end)
-					     'syntax-table)))
-
-		  ;; Save current settings of the 'syntax-table property in
-		  ;; (BEG END), then splat these with the punctuation value.
-		  (goto-char beg)
-		  (while (setq syn-tab-value
-			       (c-search-forward-non-nil-char-property
-				'syntax-table end))
-		    (when (not (c-get-char-property (1- (point)) 'category))
-		      (push (cons (1- (point)) syn-tab-value)
-			    syn-tab-settings)))
-
-		  (c-put-char-properties beg end 'syntax-table '(1))
-		  ;; If an open string's opener has just been neutralized,
-		  ;; do the same to the terminating LF.
-		  (when (and end-literal-end
-			     (eq (char-before end-literal-end) ?\n)
-			     (equal (c-get-char-property
-				     (1- end-literal-end) 'syntax-table)
-				    '(15)))
-		    (push (cons (1- end-literal-end) '(15)) syn-tab-settings)
-		    (c-put-char-property (1- end-literal-end) 'syntax-table
-					 '(1))))
-
-		(let
-		    ((beg-lit-start (progn (goto-char beg) (c-literal-start)))
-		     beg-limit end-limit <>-pos)
-		  ;; Locate the earliest < after the barrier before the
-		  ;; changed region, which isn't already marked as a paren.
-		  (goto-char (or beg-lit-start beg))
-		  (setq beg-limit (c-determine-limit 5000))
-
-		  ;; Remove the syntax-table/category properties from each pertinent <...>
-		  ;; pair.  Firstly, the ones with the < before beg and > after beg....
-		  (goto-char (cdr search-region))
-		  (while (progn (c-syntactic-skip-backward "^;{}<" beg-limit)
-				(eq (char-before) ?<))
-		    (c-backward-token-2)
-		    (when (eq (char-after) ?<)
-		      (when (setq <>-pos (c-clear-<-pair-props-if-match-after
-					  (car search-region)))
-			(setq new-end <>-pos))
-		      (setq new-beg (point))))
-
-		  ;; ...Then the ones with < before end and > after end.
-		  (goto-char (car search-region))
-		  (setq end-limit (c-determine-+ve-limit 5000))
-		  (while (and (c-syntactic-re-search-forward "[;{}>]" end-limit 'end)
-			      (eq (char-before) ?>))
-		    (when (eq (char-before) ?>)
-		      (if (and (looking-at c->-op-cont-regexp)
-			       (not (eq (char-after) ?>)))
-			  (goto-char (match-end 0))
-			(when
-			    (and (setq <>-pos
-				       (c-clear->-pair-props-if-match-before
-					(cdr search-region)
-					(1- (point))))
-				 (or (not new-beg)
-				     (< <>-pos new-beg)))
-			  (setq new-beg <>-pos))
-			(when (or (not new-end) (> (point) new-end))
-			  (setq new-end (point))))))))
-
-	    (when old-len
-	      (c-clear-char-properties beg end 'syntax-table)
-	      (dolist (elt syn-tab-settings)
-		(if (cdr elt)
-		    (c-put-char-property (car elt) 'syntax-table (cdr elt)))))
-	    ;; Swap the '(15) syntax-table property on open string LFs back
-	    ;; again.
-	    (when swap-open-string-ends
-	      (if (c-get-char-property (1- beg-literal-end)
-				       'syntax-table)
-		  (progn
-		    (c-clear-char-property (1- beg-literal-end)
+  ;; Extend the region (BEG END) to deal with any complicating literals.
+  (let* ((lit-search-beg (if (memq (char-before beg) '(?/ ?*))
+			     (1- beg) beg))
+	 (lit-search-end (if (memq (char-after end) '(?/ ?*))
+			     (1+ end) end))
+	 ;; Note we can't use c-full-pp-to-literal here, since we haven't
+	 ;; yet applied syntax-table properties to ends of lines, etc.
+	 (lit-search-beg-s (c-semi-pp-to-literal lit-search-beg))
+	 (beg-literal-beg (car (cddr lit-search-beg-s)))
+	 (lit-search-end-s (c-semi-pp-to-literal lit-search-end))
+	 (end-literal-beg (car (cddr lit-search-end-s)))
+	 (beg-literal-end (c-end-of-literal lit-search-beg-s lit-search-beg))
+	 (end-literal-end (c-end-of-literal lit-search-end-s lit-search-end))
+	 new-beg new-end search-region)
+
+    ;; Determine any new end of literal resulting from the insertion/deletion.
+    (setq search-region
+	  (if (and (eq beg-literal-beg end-literal-beg)
+		   (eq beg-literal-end end-literal-end))
+	      (if beg-literal-beg
+		  nil
+		(cons beg
+		      (max end
+			   (or beg-literal-end (point-min))
+			   (or end-literal-end (point-min)))))
+	    (cons (or beg-literal-beg beg)
+		  (max end
+		       (or beg-literal-end (point-min))
+		       (or end-literal-end (point-min))))))
+
+    (when search-region
+      ;; If we've just inserted text, mask its syntaxes temporarily so that
+      ;; they won't interfere with the undoing of the properties on the <s
+      ;; and >s.
+      (c-save-buffer-state (syn-tab-settings syn-tab-value
+					     swap-open-string-ends)
+	(unwind-protect
+	    (progn
+	      (when old-len
+		;; Special case: If a \ has just been inserted into a
+		;; string, escaping or unescaping a LF, temporarily swap
+		;; the LF's syntax-table text property with that of the
+		;; former end of the open string.
+		(goto-char end)
+		(when (and (eq (cadr lit-search-beg-s) 'string)
+			   (not (eq beg-literal-end end-literal-end))
+			   (skip-chars-forward "\\\\")
+			   (eq (char-after) ?\n)
+			   (not (zerop (skip-chars-backward "\\\\"))))
+		  (setq swap-open-string-ends t)
+		  (if (c-get-char-property (1- beg-literal-end)
 					   'syntax-table)
-		    (c-put-string-fence (1- end-literal-end)))
-		(c-put-string-fence (1- beg-literal-end))
-		(c-clear-char-property (1- end-literal-end)
-				       'syntax-table)))))
-	  ;; Extend the fontification region, if needed.
-	  (and new-beg
-	       (< new-beg c-new-BEG)
-	       (setq c-new-BEG new-beg))
-	  (and new-end
-	       (> new-end c-new-END)
-	       (setq c-new-END new-end))))))
+		      (progn
+			(c-clear-char-property (1- beg-literal-end)
+					       'syntax-table)
+			(c-put-string-fence (1- end-literal-end)))
+		    (c-put-string-fence (1- beg-literal-end))
+		    (c-clear-char-property (1- end-literal-end)
+					   'syntax-table)))
+
+		;; Save current settings of the 'syntax-table property in
+		;; (BEG END), then splat these with the punctuation value.
+		(goto-char beg)
+		(while (setq syn-tab-value
+			     (c-search-forward-non-nil-char-property
+			      'syntax-table end))
+		  (when (not (c-get-char-property (1- (point)) 'category))
+		    (push (cons (1- (point)) syn-tab-value)
+			  syn-tab-settings)))
+
+		(c-put-char-properties beg end 'syntax-table '(1))
+		;; If an open string's opener has just been neutralized,
+		;; do the same to the terminating LF.
+		(when (and end-literal-end
+			   (eq (char-before end-literal-end) ?\n)
+			   (equal (c-get-char-property
+				   (1- end-literal-end) 'syntax-table)
+				  '(15)))
+		  (push (cons (1- end-literal-end) '(15)) syn-tab-settings)
+		  (c-put-char-property (1- end-literal-end) 'syntax-table
+				       '(1))))
+
+	      (let
+		  ((beg-lit-start (progn (goto-char beg) (c-literal-start)))
+		   beg-limit end-limit <>-pos)
+		;; Locate the earliest < after the barrier before the
+		;; changed region, which isn't already marked as a paren.
+		(goto-char (or beg-lit-start beg))
+		(setq beg-limit (c-determine-limit 5000))
+
+		;; Remove the syntax-table/category properties from each pertinent <...>
+		;; pair.  Firstly, the ones with the < before beg and > after beg....
+		(goto-char (cdr search-region))
+		(while (progn (c-syntactic-skip-backward "^;{}<" beg-limit)
+			      (eq (char-before) ?<))
+		  (c-backward-token-2)
+		  (when (eq (char-after) ?<)
+		    (when (setq <>-pos (c-clear-<-pair-props-if-match-after
+					(car search-region)))
+		      (setq new-end <>-pos))
+		    (setq new-beg (point))))
+
+		;; ...Then the ones with < before end and > after end.
+		(goto-char (car search-region))
+		(setq end-limit (c-determine-+ve-limit 5000))
+		(while (and (c-syntactic-re-search-forward "[;{}>]" end-limit 'end)
+			    (eq (char-before) ?>))
+		  (when (eq (char-before) ?>)
+		    (if (and (looking-at c->-op-cont-regexp)
+			     (not (eq (char-after) ?>)))
+			(goto-char (match-end 0))
+		      (when
+			  (and (setq <>-pos
+				     (c-clear->-pair-props-if-match-before
+				      (cdr search-region)
+				      (1- (point))))
+			       (or (not new-beg)
+				   (< <>-pos new-beg)))
+			(setq new-beg <>-pos))
+		      (when (or (not new-end) (> (point) new-end))
+			(setq new-end (point))))))))
+
+	  (when old-len
+	    (c-clear-char-properties beg end 'syntax-table)
+	    (dolist (elt syn-tab-settings)
+	      (if (cdr elt)
+		  (c-put-char-property (car elt) 'syntax-table (cdr elt)))))
+	  ;; Swap the '(15) syntax-table property on open string LFs back
+	  ;; again.
+	  (when swap-open-string-ends
+	    (if (c-get-char-property (1- beg-literal-end)
+				     'syntax-table)
+		(progn
+		  (c-clear-char-property (1- beg-literal-end)
+					 'syntax-table)
+		  (c-put-string-fence (1- end-literal-end)))
+	      (c-put-string-fence (1- beg-literal-end))
+	      (c-clear-char-property (1- end-literal-end)
+				     'syntax-table)))))
+      ;; Extend the fontification region, if needed.
+      (and new-beg
+	   (< new-beg c-new-BEG)
+	   (setq c-new-BEG new-beg))
+      (and new-end
+	   (> new-end c-new-END)
+	   (setq c-new-END new-end)))))
 
 (defun c-before-change-check-<>-operators (beg end)
   ;; When we're deleting text, unmark certain pairs of "< .... >" which are


> Geza

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70435; Package emacs. Full text available.

Message received at 70435 <at> debbugs.gnu.org:


Received: (at 70435) by debbugs.gnu.org; 28 Apr 2024 20:31:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 28 16:31:50 2024
Received: from localhost ([127.0.0.1]:52738 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s1BBe-0001cU-6r
	for submit <at> debbugs.gnu.org; Sun, 28 Apr 2024 16:31:50 -0400
Received: from mail.muc.de ([193.149.48.3]:55215)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1s1BBc-0001cN-0i
 for 70435 <at> debbugs.gnu.org; Sun, 28 Apr 2024 16:31:48 -0400
Received: (qmail 33571 invoked by uid 3782); 28 Apr 2024 22:31:21 +0200
Received: from muc.de (p4fe15141.dip0.t-ipconnect.de [79.225.81.65]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Sun, 28 Apr 2024 22:31:21 +0200
Received: (qmail 31886 invoked by uid 1000); 28 Apr 2024 20:31:17 -0000
Date: Sun, 28 Apr 2024 20:31:17 +0000
To: Herman =?iso-8859-1?Q?G=E9za?= <geza.herman@HIDDEN>
Subject: Re: bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as
 parentheses
Message-ID: <Zi6yFdb9ppQr2qOb@ACM>
References: <87le5cuuyq.fsf@HIDDEN> <Zi5u418Bzy0ryzb1@ACM>
 <87y18xifpb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87y18xifpb.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 70435
Cc: acm@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 70435 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello again, Géza.

On Sun, Apr 28, 2024 at 18:47:47 +0200, Herman, Géza wrote:
> Hello Alan,

> Alan Mackenzie <acm@HIDDEN> writes:

> > You've been a little less than fully explicit, but I think you're
> > executing these commands in the *scratch* buffer.  The first two
> > lines, which are commented out in emacs-lisp-mode, are no longer
> > commented out in C++ Mode.  There is a whole line of garbage after
> > the last end of statement marker, the (double) semicolon on line 2.

> > On using ig<TAB> to insert the snippet, it is hardly surprising that
> > CC Mode's syntactic analysis gets confused.  If you first comment
> > out those first two lines (put the region around them and do C-c
> > C-c), then the inserted snippet appears to get the correct syntax on
> > its template markers.

> > I don't think there's a bug here.  If you could show ig<TAB>
> > producing the effect when typed inside a syntactically correct
> > context, things might be different.  Can you reproduce the effect in
> > correct C++ code?

> You're right, it seems that the example I provided wasn't the best 
> (this issue happens with me in real code, I tried to create a 
> minimal reproducible example).

That's always appreciated.

> If you delete the garbage from the scratch buffer, the bug doesn't 
> reproduce indeed.  But, if you run (setq 
> font-lock-maximum-decoration 2) before switching to c++-mode, the 
> issue reproduces with an empty scratch buffer.  I use this setting 
> because font-lock runs much faster this way, and I rely on the LSP 
> server to do the "full" highlighting.

I confirm I can reproduce the bug with font-lock-maximum-decoration set
to 2.  I'll look into it.

> Sorry about the bad example, here are the fixed repro steps:

> Repro:
> - put the yasnippet file (included below) into
> <emacs-config-dir>/snippets/c++-mode/something
> - install yasnippet
> - start emacs, scratch buffer appears
> - delete the contents of the scratch buffer
> - M-: (setq font-lock-maximum-decoration 2)
> - 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.

> Geza

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70435; Package emacs. Full text available.

Message received at 70435 <at> debbugs.gnu.org:


Received: (at 70435) by debbugs.gnu.org; 28 Apr 2024 17:02:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 28 13:02:24 2024
Received: from localhost ([127.0.0.1]:51237 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s17ux-0001MJ-Mc
	for submit <at> debbugs.gnu.org; Sun, 28 Apr 2024 13:02:24 -0400
Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:50544)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <geza.herman@HIDDEN>) id 1s17uu-0001M8-S6
 for 70435 <at> debbugs.gnu.org; Sun, 28 Apr 2024 13:02:21 -0400
Received: by mail-ed1-x52b.google.com with SMTP id
 4fb4d7f45d1cf-56e6acb39d4so4443390a12.1
 for <70435 <at> debbugs.gnu.org>; Sun, 28 Apr 2024 10:02:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1714323715; x=1714928515; darn=debbugs.gnu.org;
 h=mime-version:message-id:in-reply-to:date:subject:cc:to:from
 :references:from:to:cc:subject:date:message-id:reply-to;
 bh=Ee6WH+blKBrgELRiykasdvQvzxNp3yAA73DZ0oT0OnY=;
 b=OSm1AW2Lhh6RK7GRQrBoej0sSwJkarxYd4vXltdwFCnokKN9/iH8i5q5Z+48SO2BSi
 N5NS23nQLhNO8utto1bVwGAZgwrR/J8VBipW7MLpwg1aCCcqV8AFzPD798AHBWf+9baP
 0APZESu6uliPWu309ZZNmHDdC6zLaqwGTe+VbJZTUH6hnuxKBGMzGDXXluFu+mw6LbRn
 CWIXMhlZd2eHEgPBoXmi8bboAtTGcazSRHKckFhbQRr09Hcd5OfgHPz3J5FJbZ3mKi2J
 8Xc988q5fvZPqy2zxMdVw5T9yA5wDDeUXv6bLBU4YOQ7EQ3awKxnUOeBtYxjT/jzU+9d
 ruJw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1714323715; x=1714928515;
 h=mime-version:message-id:in-reply-to:date:subject:cc:to:from
 :references:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=Ee6WH+blKBrgELRiykasdvQvzxNp3yAA73DZ0oT0OnY=;
 b=i3tgLuKV+ID/P5SC86mkaP6NQx7RW3aITH84u6V0qab3QJzdjp8xU86uijSJXyntc4
 Zs4w92/GXEkGsnMqSchZM1UE6ms3z1HVxjnop3LSk51/fXN4tZ1Zv4xY03w1L+u907N9
 Bm1o4liciQgylftnc7rrOYMBR2HQMteX9XNdwt8XXFCYW+oAM14UwEFjTqOz0Si3DUIL
 SH6AqQIfxAN6zcWezHr4sHxT3p24OkKgVa8ssK88wlGj1RIjXIHCszo7XGl31SS6ybiA
 rTzC+hAGRBpzarigKslEdWR96hk+HtYNfLbuBoJJxD3XWYXBmfIsWIMKX+9yRfjXLeou
 REXQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCXo9fNmeeCLJSKcpY23gGiDQx5T+k9Yd4zFqOAAT/da+GdCH30ycXC7d+Ljzwe3mGzipvHsJY9koHZoQdOwaNqb0xCjwX0=
X-Gm-Message-State: AOJu0Yz/dqShZjjFZ4eDNyrh8Fq1cgYDjSxDqRtR1OQRC7aYuSPd0xf2
 YoNFNeWs/VfzHkzS0dJix/Lv5lz2cV8+qumVuz4DFNovv6oMLUat
X-Google-Smtp-Source: AGHT+IFM911F7k7oz/qf87YRnuwzBsqw8kA6JnZdmHR3q9IIlYXCG3GkXLo9I/JPs2bNee1MsIdQyw==
X-Received: by 2002:a17:906:16d7:b0:a58:86c0:1275 with SMTP id
 t23-20020a17090616d700b00a5886c01275mr4880181ejd.30.1714323715030; 
 Sun, 28 Apr 2024 10:01:55 -0700 (PDT)
Received: from localhost (netacc-gpn-4-8-242.pool.yettel.hu. [84.224.8.242])
 by smtp.gmail.com with ESMTPSA id
 ld14-20020a170906f94e00b00a58ff5adad2sm444145ejb.90.2024.04.28.10.01.54
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 28 Apr 2024 10:01:54 -0700 (PDT)
References: <87le5cuuyq.fsf@HIDDEN> <Zi5u418Bzy0ryzb1@ACM>
From: =?utf-8?Q?Herman=2C_G=C3=A9za?= <geza.herman@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>
Subject: Re: bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as
 parentheses
Date: Sun, 28 Apr 2024 18:47:47 +0200
In-reply-to: <Zi5u418Bzy0ryzb1@ACM>
Message-ID: <87y18xifpb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70435
Cc: Herman@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 70435 <at> debbugs.gnu.org,
 =?utf-8?Q?G=C3=A9za?= <geza.herman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello Alan,

Alan Mackenzie <acm@HIDDEN> writes:

> You've been a little less than fully explicit, but I think 
> you're
> executing these commands in the *scratch* buffer.  The first two 
> lines,
> which are commented out in emacs-lisp-mode, are no longer 
> commented out
> in C++ Mode.  There is a whole line of garbage after the last 
> end of
> statement marker, the (double) semicolon on line 2.
>
> On using ig<TAB> to insert the snippet, it is hardly surprising 
> that CC
> Mode's syntactic analysis gets confused.  If you first comment 
> out those
> first two lines (put the region around them and do C-c C-c), 
> then the
> inserted snippet appears to get the correct syntax on its 
> template
> markers.
>
> I don't think there's a bug here.  If you could show ig<TAB> 
> producing
> the effect when typed inside a syntactically correct context, 
> things
> might be different.  Can you reproduce the effect in correct C++ 
> code?

You're right, it seems that the example I provided wasn't the best 
(this issue happens with me in real code, I tried to create a 
minimal reproducible example).

If you delete the garbage from the scratch buffer, the bug doesn't 
reproduce indeed.  But, if you run (setq 
font-lock-maximum-decoration 2) before switching to c++-mode, the 
issue reproduces with an empty scratch buffer.  I use this setting 
because font-lock runs much faster this way, and I rely on the LSP 
server to do the "full" highlighting.

Sorry about the bad example, here are the fixed repro steps:

Repro:
- put the yasnippet file (included below) into
<emacs-config-dir>/snippets/c++-mode/something
- install yasnippet
- start emacs, scratch buffer appears
- delete the contents of the scratch buffer
- M-: (setq font-lock-maximum-decoration 2)
- 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.

Geza




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70435; Package emacs. Full text available.

Message received at 70435 <at> debbugs.gnu.org:


Received: (at 70435) by debbugs.gnu.org; 28 Apr 2024 15:45:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 28 11:45:08 2024
Received: from localhost ([127.0.0.1]:50887 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s16iC-0000ML-BR
	for submit <at> debbugs.gnu.org; Sun, 28 Apr 2024 11:45:08 -0400
Received: from mail.muc.de ([193.149.48.3]:34651)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1s16i9-0000Lg-9F
 for 70435 <at> debbugs.gnu.org; Sun, 28 Apr 2024 11:45:06 -0400
Received: (qmail 10323 invoked by uid 3782); 28 Apr 2024 17:44:39 +0200
Received: from muc.de (p4fe15141.dip0.t-ipconnect.de [79.225.81.65]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Sun, 28 Apr 2024 17:44:39 +0200
Received: (qmail 13064 invoked by uid 1000); 28 Apr 2024 15:44:35 -0000
Date: Sun, 28 Apr 2024 15:44:35 +0000
To: Herman@HIDDEN, =?iso-8859-1?Q?G=E9za?= <geza.herman@HIDDEN>
Subject: Re: bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as
 parentheses
Message-ID: <Zi5u418Bzy0ryzb1@ACM>
References: <87le5cuuyq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87le5cuuyq.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 70435
Cc: acm@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, 70435 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Géza.

On Wed, Apr 17, 2024 at 12:47:25 +0200, Herman wrote:

> 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.

You've been a little less than fully explicit, but I think you're
executing these commands in the *scratch* buffer.  The first two lines,
which are commented out in emacs-lisp-mode, are no longer commented out
in C++ Mode.  There is a whole line of garbage after the last end of
statement marker, the (double) semicolon on line 2.

On using ig<TAB> to insert the snippet, it is hardly surprising that CC
Mode's syntactic analysis gets confused.  If you first comment out those
first two lines (put the region around them and do C-c C-c), then the
inserted snippet appears to get the correct syntax on its template
markers.

I don't think there's a bug here.  If you could show ig<TAB> producing
the effect when typed inside a syntactically correct context, things
might be different.  Can you reproduce the effect in correct C++ code?

> 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---



> In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, cairo version
>  1.18.0) of 2024-04-12 built on okoska
> Repository revision: b83d0d07bb316cd851517897a9d688d639441f90
> Repository branch: my-modifications
> Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
> System Description: Debian GNU/Linux trixie/sid

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70435; Package emacs. Full text available.

Message received at 70435 <at> debbugs.gnu.org:


Received: (at 70435) by debbugs.gnu.org; 27 Apr 2024 10:08:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 27 06:08:42 2024
Received: from localhost ([127.0.0.1]:38986 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0ez2-0008Ea-EN
	for submit <at> debbugs.gnu.org; Sat, 27 Apr 2024 06:08:42 -0400
Received: from mail.muc.de ([193.149.48.3]:64214)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1s0eyz-0008D4-En
 for 70435 <at> debbugs.gnu.org; Sat, 27 Apr 2024 06:08:38 -0400
Received: (qmail 1868 invoked by uid 3782); 27 Apr 2024 12:08:12 +0200
Received: from muc.de (pd953a3f0.dip0.t-ipconnect.de [217.83.163.240]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Sat, 27 Apr 2024 12:08:11 +0200
Received: (qmail 4238 invoked by uid 1000); 27 Apr 2024 10:08:11 -0000
Date: Sat, 27 Apr 2024 10:08:11 +0000
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70435: 30.0.50; cc-mode: <> are sometimes not reconized as
 parentheses
Message-ID: <ZizOi27mZ1_0K5lb@ACM>
References: <87le5cuuyq.fsf@HIDDEN>
 <86mspfw6fx.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <86mspfw6fx.fsf@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 70435
Cc: 70435 <at> debbugs.gnu.org,
 Herman =?iso-8859-1?Q?G=E9za?= <geza.herman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

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@HIDDEN>
> > 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).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70435; Package emacs. Full text available.

Message received at 70435 <at> debbugs.gnu.org:


Received: (at 70435) by debbugs.gnu.org; 27 Apr 2024 08:35:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 27 04:35:00 2024
Received: from localhost ([127.0.0.1]:38892 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0dWK-0007vh-9A
	for submit <at> debbugs.gnu.org; Sat, 27 Apr 2024 04:35:00 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52338)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s0dVW-0007nZ-SN
 for 70435 <at> debbugs.gnu.org; Sat, 27 Apr 2024 04:34:11 -0400
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 <eliz@HIDDEN>)
 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==;
Date: Sat, 27 Apr 2024 11:33:38 +0300
Message-Id: <86mspfw6fx.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: =?utf-8?Q?Herman_G=C3=A9za?= <geza.herman@HIDDEN>, Alan Mackenzie
 <acm@HIDDEN>
In-Reply-To: <87le5cuuyq.fsf@HIDDEN> (Herman <at> debbugs.gnu.org)
Subject: Re: bug#70435: 30.0.50;
 cc-mode: <> are sometimes not reconized as parentheses
References: <87le5cuuyq.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70435
Cc: 70435 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Herman <at> debbugs.gnu.org, GĂ©za <geza.herman@HIDDEN>
> 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70435; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Apr 2024 10:48:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 17 06:48:04 2024
Received: from localhost ([127.0.0.1]:45860 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rx2pc-000377-UL
	for submit <at> debbugs.gnu.org; Wed, 17 Apr 2024 06:48:03 -0400
Received: from lists.gnu.org ([2001:470:142::17]:51434)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <geza.herman@HIDDEN>) id 1rx2pY-00035M-6G
 for submit <at> debbugs.gnu.org; Wed, 17 Apr 2024 06:47:59 -0400
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 <geza.herman@HIDDEN>)
 id 1rx2pF-0006nf-DI
 for bug-gnu-emacs@HIDDEN; Wed, 17 Apr 2024 06:47:37 -0400
Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <geza.herman@HIDDEN>)
 id 1rx2pD-0007sB-6N
 for bug-gnu-emacs@HIDDEN; Wed, 17 Apr 2024 06:47:37 -0400
Received: by mail-ej1-x632.google.com with SMTP id
 a640c23a62f3a-a44ad785a44so659006766b.3
 for <bug-gnu-emacs@HIDDEN>; Wed, 17 Apr 2024 03:47:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713350853; x=1713955653; darn=gnu.org;
 h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=y7IGzdT+ni6+Lcj2CE83TH8GyZfdUTkMlRHsmzfu+so=;
 b=S1CikmT6eeC/o0QvPT/v3V8pipols4areT6mLeH9HTjyu043IxqCr7fnzRO3TCKyH1
 /IrFPPylXYoSxHtHsNEOUB/Y8oXD3PvUFsAg4R5fbKCTxC8BJX94BZaetmJ0qcQV422M
 TKwAt9Ft/KgzGXHlpvkzzHcxeiz9xvGNCl14jxWocm4R4x7mlGqWubRxyHqjFAaDv5Oj
 GibORiCNEFScY+zEo3gPbX/+M23MqKcq1ipDd1d3Og8fFiSt6SLbBigCzO9Tg8ogRv7P
 1mYNl7C3lLdZB1X6wbboIY29IQ8yVCw/6Y8X82zHJt1OPdSjnzSYL2WmzdvES/NKqv9C
 jfFg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713350853; x=1713955653;
 h=mime-version:message-id:date:subject:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=y7IGzdT+ni6+Lcj2CE83TH8GyZfdUTkMlRHsmzfu+so=;
 b=ixLGPaGFTOxIDXvBz93feqnoleehsQwl1I3MBB5y1pgmthVkMA0POxmg0OeSvJcQio
 rZE6Uv0ZPc2CUkZ3QHuhnVX8+E9n50ceKsUkdJ7qaJmQQy/je3sRjuoc/PZYX+kltSnF
 qc28xfwA6/EZlQSl5eR/dWv/9DU78AVj/QLGtmXxYVOsqDzByFQOijpjjjh3IkI/Zmyp
 Vs5RJvXbh2bo+0iteIa3BH1BGBQe9xUX2BYQWkjz54fvsBWW1kSEdMi53xVYZBiM5xEZ
 X2lK3STmR/rgkx+dSXjZehfcvK95ZmpiNyDF2sunPTA0xjwGJumAiyZumoGVVi+J0aEo
 5Luw==
X-Gm-Message-State: AOJu0YxxJE5MIQQmLM1pLr/7Cnsn401nsrc8F/ulGPWadOxowOhfIVeS
 Wmkpdj435vyxHdlwG9bsNnxqWQC362XDDxvODqaH2/Ea4xR3SbJW3fZngw==
X-Google-Smtp-Source: AGHT+IG6gN5BbXWAMRPl42dOgHqRGVlXU972LIWH5BWzROLvCtYeFSTUPCcQfkn8sP0IhKyLQdqqTA==
X-Received: by 2002:a17:906:b354:b0:a51:c6ec:e4f with SMTP id
 cd20-20020a170906b35400b00a51c6ec0e4fmr8500180ejb.37.1713350852705; 
 Wed, 17 Apr 2024 03:47:32 -0700 (PDT)
Received: from localhost (netacc-gpn-4-8-242.pool.yettel.hu. [84.224.8.242])
 by smtp.gmail.com with ESMTPSA id
 l1-20020a17090615c100b00a524e3f2f9esm5615401ejd.98.2024.04.17.03.47.31
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 17 Apr 2024 03:47:32 -0700 (PDT)
From: =?utf-8?Q?Herman=2C_G=C3=A9za?= <geza.herman@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.50; cc-mode: <> are sometimes not reconized as parentheses
X-Debbugs-Cc: 
Date: Wed, 17 Apr 2024 12:47:25 +0200
Message-ID: <87le5cuuyq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::632;
 envelope-from=geza.herman@HIDDEN; helo=mail-ej1-x632.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)


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---



In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, cairo version
 1.18.0) of 2024-04-12 built on okoska
Repository revision: b83d0d07bb316cd851517897a9d688d639441f90
Repository branch: my-modifications
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: Debian GNU/Linux trixie/sid

Configured using:
 'configure --with-native-compilation --without-compress-install
 --without-gconf --without-gsettings --without-dbus --with-small-ja-dic
 --with-json --with-xinput2 --with-x-toolkit=no --with-tree-sitter
 --with-cairo --with-cairo-xcb --disable-silent-rules
 'CFLAGS=-mtune=native -march=native -g3 -O3''

Configured features:
ACL CAIRO FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LCMS2 LIBOTF
LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY OLDXMENU PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM ZLIB

Important settings:
  value of $LC_ALL: C.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  vertico-multiform-mode: t
  recentf-mode: t
  which-key-mode: t
  global-auto-revert-mode: t
  savehist-mode: t
  ws-butler-global-mode: t
  ws-butler-mode: t
  diff-hl-flydiff-mode: t
  global-diff-hl-mode: t
  clean-aindent-mode: t
  global-whitespace-mode: t
  marginalia-mode: t
  vertico-mode: t
  global-anzu-mode: t
  anzu-mode: t
  global-evil-matchit-mode: t
  evil-matchit-mode: t
  evil-snipe-override-mode: t
  evil-snipe-mode: t
  evil-snipe-override-local-mode: t
  evil-snipe-local-mode: t
  global-evil-surround-mode: t
  evil-surround-mode: t
  global-evil-visualstar-mode: t
  evil-visualstar-mode: t
  better-jumper-mode: t
  better-jumper-local-mode: t
  evil-leader-mode: t
  global-evil-leader-mode: t
  global-hl-todo-mode: t
  winum-mode: t
  hes-mode: t
  gcmh-mode: t
  global-page-break-lines-mode: t
  evil-mode: t
  evil-local-mode: t
  save-place-mode: t
  override-global-mode: t
  minibuffer-depth-indicate-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-history-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  abbrev-mode: t

Load-path shadows:
/home/geza/.emacs.d/elpa/transient-20240226.2332/transient hides /usr/local/share/emacs/30.0.50/lisp/transient
~/.emacs.d/lisp/emacs-gdb/gdb-mi hides /usr/local/share/emacs/30.0.50/lisp/progmodes/gdb-mi

Features:
(shadow sort project mail-extr emacsbug message mailcap yank-media puny
evil-collection-dired dired-git-info peep-dired dired-narrow delsel
dired-filter f s dired-aux dired-x dired-subtree dired-hacks-utils
evil-collection-wdired wdired ls-lisp dired dired-loaddefs rfc822 mml
mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util
time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-fns radix-tree mule-util cursor-sensor
evil-collection-consult consult-dir vertico-multiform consult-compile
compile evil-collection-comint comint ansi-osc ansi-color recentf
tree-widget wid-edit shut-up consult bookmark text-property-search pp
face-remap drag-stuff which-key autorevert filenotify savehist bm
evil-collection-info info ws-butler diff-hl-flydiff diff diff-hl
log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode
clean-aindent-mode column-enforce-mode whitespace orderless marginalia
vertico anzu evil-matchit evil-matchit-evil-setup evil-matchit-sdk
semantic/lex semantic/fw eieio eieio-core mode-local find-func
evil-exchange evil-args evil-indent-plus evil-textobj-line
evil-textobj-entire evil-textobj-column evil-textobj-anyblock evil-snipe
evil-surround evil-mc evil-mc-command-execute evil-mc-command-record
evil-mc-cursor-make evil-mc-region evil-mc-cursor-state evil-mc-undo
evil-mc-vars evil-mc-known-commands evil-mc-common avy evil-visualstar
evil-collection-simple evil-collection-replace evil-collection annalist
better-jumper pcase cl-macs evil-leader hl-todo compat hl-line
transpose-frame winum dash ov highlight-escape-sequences gcmh
page-break-lines evil evil-integration evil-maps evil-commands reveal
evil-jumps evil-command-window evil-types evil-search evil-ex
evil-macros evil-repeat evil-states evil-core evil-common thingatpt rect
evil-vars ring edmacro kmacro byte-opt saveplace bind-key easy-mmode
advice mb-depth comp cl-seq comp-cstr cl-extra help-mode warnings icons
subr-x gv cl-loaddefs cl-lib comp-run bytecomp byte-compile comp-common
rx rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads inotify lcms2 dynamic-setting font-render-setting cairo xinput2
x multi-tty move-toolbar make-network-process native-compile emacs)

Memory information:
((conses 16 269016 316498) (symbols 48 23000 189) (strings 32 74049 29305) (string-bytes 1 3233199) (vectors 16 36374)
 (vector-slots 8 426217 134450) (floats 8 230 192) (intervals 56 2422 251) (buffers 992 12))




Acknowledgement sent to Herman, GĂ©za <geza.herman@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#70435; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 2 May 2024 13:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.