GNU bug report logs - #72311
[PATCH] Treat period as a symbol constituent in cc-mode

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; Severity: wishlist; Reported by: Vladislav Yegorov <vlad@HIDDEN>; Keywords: patch; merged with #72310; dated Fri, 26 Jul 2024 20:00:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 72310 72311. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 72311) by debbugs.gnu.org; 29 Jul 2024 00:00:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 28 20:00:08 2024
Received: from localhost ([127.0.0.1]:44606 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sYDo7-0008Mp-Nm
	for submit <at> debbugs.gnu.org; Sun, 28 Jul 2024 20:00:08 -0400
Received: from fout2-smtp.messagingengine.com ([103.168.172.145]:50057)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@HIDDEN>) id 1sYDo5-0008Li-2e
 for 72311 <at> debbugs.gnu.org; Sun, 28 Jul 2024 20:00:06 -0400
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailfout.nyi.internal (Postfix) with ESMTP id DAA95138015C;
 Sun, 28 Jul 2024 19:59:47 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Sun, 28 Jul 2024 19:59:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm2; t=1722211187;
 x=1722297587; bh=RrSKdhxsSi9Tgxg1LVEtiFhbTqLhdHaFlaTdNK3GG7w=; b=
 C7UFeFiGGwsqtYm23bHsTaFcRcz+H9n+YbcV11JalOmHLD4AACvpavaiemtHKEhR
 4qWF4XqDNkvT76Zh8GuWLHd1nP7OF7Eu+qpkDO32D3sHzCXUQ/8uxxrKmd7BePge
 1UCbrWdw0zw+tMPrI+mUCFwEG3B3E7bpGfNE9BmtKpa5rTlrkqs8R7DwjibGXn8+
 9YIUhtLff35PywHjpKhn+Ffl2xySf1YbLhsJ0NAfXPCjIGtlpDrRRpuT3t4EE4Cb
 kQdLzx1JywQ2QAW5q9p8sHJCszhAvISZx2zp7OFbSaLOpcwbj4qWK8EM5YonWzHP
 dR0J7Wyiifxm2jBljAJBXA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1722211187; x=
 1722297587; bh=RrSKdhxsSi9Tgxg1LVEtiFhbTqLhdHaFlaTdNK3GG7w=; b=S
 OPZOauzb0+YXUIuuASWRoNpS5QoXCxeWa4v3JJ32BtfA6DXZ4BSFrRhCQIeYj6Ur
 k5jRZK5jfIaymrSKFtEZSZkG9XH8V7GXMKAj1nnJ7Ru02VtK6APturnw78qOBg7f
 +oXOj3WzzjqIKvFlTxeKktQA4T+kIrkLZprUdmorvPEbUQE8D4bjlnAxAJhXVN+5
 x5ZikDQQPDA+Q4mAGWFjrk9O8l83Sgs7pGNN6hvRKo67k9RmAnD2BQsQwvIrNDc6
 tQ0kXBkn1wD4os0BNrQcaOZ2sK4f/5ZRpsHgYwIKOKko2+igwcoK9DlpmVfvceGA
 c5XPHg8nAGeMfCWodJvbA==
X-ME-Sender: <xms:c9umZk5jNFUisTcS1j1PJfm6-rOdqcRhup4sD3xygN0Afmd7a_5K5A>
 <xme:c9umZl54ZNDrnq-M9iLuFV45Y7umt4HdEtG-EAxbvCQYspsKCd0bWHOg3mf0mnE3X
 1JUTNcok0osaalTS58>
X-ME-Received: <xmr:c9umZjcM9HBDG9SL_bNqeYNBdfkug6SsH3_hCzLmKhixDUI56PnqmSdiKveCde15y71_>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrjedugddvlecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht
 rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth
 gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej
 heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh
 hithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtoheptd
X-ME-Proxy: <xmx:c9umZpIJepTQEkT5juhqRH9R7m3q1gC_gfQEQjoeGvmIJ2HSQXYZcw>
 <xmx:c9umZoIDa4fgjayYa_u0TTevVu3PVAQFWOic0l287ij4nSegZvG4-Q>
 <xmx:c9umZqzmdUYkfm6_CO1088iBJMkryrMEa8WBCcwR_Mf7nvsqwKVDBQ>
 <xmx:c9umZsJQny4l5u3OgBYQGY-EQYU0JRm4RV131TgHX_2f43SmNLI0xQ>
 <xmx:c9umZijmqZQj4gG3sDInxjqKxH1ZoigSyVbYrOstyi6wBBmSBvWAKKwA>
Feedback-ID: i0e71465a:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun,
 28 Jul 2024 19:59:46 -0400 (EDT)
Message-ID: <f9dd955c-ab53-470a-a8a2-1b4d3a1aa03c@HIDDEN>
Date: Mon, 29 Jul 2024 02:59:44 +0300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#72311: [PATCH] Treat period as a symbol constituent in cc-mode
To: Alan Mackenzie <acm@HIDDEN>, Vladislav Yegorov <vlad@HIDDEN>
References: <87h6ccm02t.fsf@HIDDEN> <871q3g3qfp.fsf@HIDDEN>
 <86ikwr2xbo.fsf@HIDDEN> <87wml78a0s.fsf@HIDDEN> <ZqTZeaCVeDbsP1j6@ACM>
Content-Language: en-US
From: Dmitry Gutov <dmitry@HIDDEN>
In-Reply-To: <ZqTZeaCVeDbsP1j6@ACM>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 72311
Cc: Eli Zaretskii <eliz@HIDDEN>, Jeremy Bryant <jb@HIDDEN>,
 72311 <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.7 (-)

On 27/07/2024 14:26, Alan Mackenzie wrote:
> It would be possible to put a syntax-table text property on a '.' when
> it is followed directly by a decimal digit, with no space between.
> Maybe we could also check that there's a valid number character before
> the . (space, BOL, 0-9, -, ...?), but that might be over engineering.

That sounds like the better choice indeed, but given the increase in 
complexity maybe the minor improvement in behavior is not really worth 
the effort.




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

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


Received: (at 72311) by debbugs.gnu.org; 27 Jul 2024 18:52:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 27 14:52:14 2024
Received: from localhost ([127.0.0.1]:42407 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sXmWb-0004Kx-Ei
	for submit <at> debbugs.gnu.org; Sat, 27 Jul 2024 14:52:13 -0400
Received: from mout-p-102.mailbox.org ([80.241.56.152]:45292)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vlad@HIDDEN>) id 1sXddl-0002oT-7s
 for 72311 <at> debbugs.gnu.org; Sat, 27 Jul 2024 05:23:01 -0400
Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4WWJzn6Q19z9sml;
 Sat, 27 Jul 2024 11:22:13 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yegorov.org; s=MBO0001;
 t=1722072133;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=lV8nRuKCdS9pH1mt2r+XUD+bE4A4TM/JjpaOrnMfBp8=;
 b=Dfb1DjmjKOMvesYwjGXtcYIbTz5JX1v0lI2YqMgjCOQ03WsTDyqG7PMRGDbQ1Geh+PXw2B
 cl9ye2XpjQDKWuGiitG4mshgPK6OsaxgrR8/C4tmkrS69tP0hAO6fM0uuqnGBajbL85Fdy
 zRpXxrz6XdhmJZMiCszBnmyTugSs28R5tl+Jvxo95nKVpQE9ATaO0eE11tKihixZS5OXPb
 LWqb2jUB4tqyfeJGlkZoBjsuUBAoCyzwW05xzqYzwi2guvhmBT0ziz5bmepFYAJbu7pboM
 OedqTSCmQbZOjrmpm1Mr4ZZnh2amfa9or7Oov79fRNVhR8TFnGCWmGgUyCLuNA==
From: Vladislav Yegorov <vlad@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#72311: [PATCH] Treat period as a symbol constituent in cc-mode
In-Reply-To: <86ikwr2xbo.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 27 Jul
 2024 08:55:23 +0300")
References: <87h6ccm02t.fsf@HIDDEN> <871q3g3qfp.fsf@HIDDEN>
 <86ikwr2xbo.fsf@HIDDEN>
Date: Sat, 27 Jul 2024 11:22:11 +0200
Message-ID: <87wml78a0s.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 72311
X-Mailman-Approved-At: Sat, 27 Jul 2024 14:52:12 -0400
Cc: Alan Mackenzie <acm@HIDDEN>, 72311 <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.7 (-)


> What about stuff like 'foo.bar', where 'foo' is a struct and 'bar' is
> its member? won't this change make them a single symbol?

You are right, kind of forgot about that.  I think in that case a simple
syntax table modification like my patch provides won't do the trick.

My motivation for this patch was to able to use C-M-f (forward-sexp) to
skip over decimal numbers.  What are your thoughts on defining a
forward-sexp-function that will use a alternate syntax table in certain
contexts? maybe a bit too hacky?




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

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


Received: (at 72311) by debbugs.gnu.org; 27 Jul 2024 11:27:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 27 07:27:09 2024
Received: from localhost ([127.0.0.1]:40634 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sXfZs-0007DO-OP
	for submit <at> debbugs.gnu.org; Sat, 27 Jul 2024 07:27:08 -0400
Received: from mail.muc.de ([193.149.48.3]:41165)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <acm@HIDDEN>) id 1sXfZq-0007CS-Cm
 for 72311 <at> debbugs.gnu.org; Sat, 27 Jul 2024 07:27:06 -0400
Received: (qmail 52350 invoked by uid 3782); 27 Jul 2024 13:26:50 +0200
Received: from muc.de (p4fe15a81.dip0.t-ipconnect.de [79.225.90.129]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Sat, 27 Jul 2024 13:26:50 +0200
Received: (qmail 9846 invoked by uid 1000); 27 Jul 2024 11:26:49 -0000
Date: Sat, 27 Jul 2024 11:26:49 +0000
To: Vladislav Yegorov <vlad@HIDDEN>
Subject: Re: bug#72311: [PATCH] Treat period as a symbol constituent in cc-mode
Message-ID: <ZqTZeaCVeDbsP1j6@ACM>
References: <87h6ccm02t.fsf@HIDDEN> <871q3g3qfp.fsf@HIDDEN>
 <86ikwr2xbo.fsf@HIDDEN> <87wml78a0s.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <87wml78a0s.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: 72311
Cc: acm@HIDDEN, Eli Zaretskii <eliz@HIDDEN>,
 Jeremy Bryant <jb@HIDDEN>, 72311 <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, Vladislav and Eli.

On Sat, Jul 27, 2024 at 11:22:11 +0200, Vladislav Yegorov wrote:

> > What about stuff like 'foo.bar', where 'foo' is a struct and 'bar'
> > is its member? won't this change make them a single symbol?

That was my first reaction, too.

> You are right, kind of forgot about that.  I think in that case a
> simple syntax table modification like my patch provides won't do the
> trick.

> My motivation for this patch was to able to use C-M-f (forward-sexp)
> to skip over decimal numbers.  What are your thoughts on defining a
> forward-sexp-function that will use a alternate syntax table in
> certain contexts? maybe a bit too hacky?

It would be possible to put a syntax-table text property on a '.' when
it is followed directly by a decimal digit, with no space between.
Maybe we could also check that there's a valid number character before
the . (space, BOL, 0-9, -, ...?), but that might be over engineering.

My next thought is, for consistency, how would we handle something like
1.381E-23?  For consistency, C-M-f ought to move forward over that
number in its entirety.  That would need some more rigorous analysis of
every piece of text, probably by a regexp, and putting syntax-table
properties on both the '.' and the '-'.  This would slow CC Mode down,
even if not by a lot.

So, it could be done, yes.  Is it worth doing, though?  I've got very
little experience of hacking files with lots of floating point constants
in them, so it's difficult for me to judge just how annoying it is for
C-M-f and C-M-b only to move over part of a number.

-- 
Alan Mackenzie (Nuremberg, Germany).




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

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


Received: (at 72311) by debbugs.gnu.org; 27 Jul 2024 05:55:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 27 01:55:45 2024
Received: from localhost ([127.0.0.1]:40367 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sXaPB-0005YO-8s
	for submit <at> debbugs.gnu.org; Sat, 27 Jul 2024 01:55:45 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52390)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sXaP8-0005YA-JS
 for 72311 <at> debbugs.gnu.org; Sat, 27 Jul 2024 01:55:43 -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 1sXaOs-0005zv-SB; Sat, 27 Jul 2024 01:55:26 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=GynJDd/clWt+L638lL0UGVZKeK80apeDAnrs0fuKB30=; b=FY7c1UzVcX62
 auS67GL+4bzZfnHmk9jwx6Hil/lpI3uFIYdG5xUtV0TVHiLYKmBNIoE7TauKtTchwzykJdxj2OKWr
 bBeEFqc0bmc5KaFGE44T7AOXHWk+LZclJc/PbLeO1yiDhwrk3QDA2yYYq7XYK19fafEB2AptKjrOL
 6mBJpaD6Se4Y1u1VyCxDYR92UUTKwrwfNEVlif6deTA0zh7NiiDDw+fWpI9Am9C5XQuiD/KO9EmtS
 nhcQCIAzYjH9qi+eG5wgZB/0HGWShEnk3qlNknDJjfAIKwbMI42/f9HZPkKyWKR6mCOftiz7SjUBW
 SUBT3Ed9+qI1sS9ySAN9UA==;
Date: Sat, 27 Jul 2024 08:55:23 +0300
Message-Id: <86ikwr2xbo.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>, Vladislav Yegorov <vlad@HIDDEN>
In-Reply-To: <871q3g3qfp.fsf@HIDDEN> (message from Vladislav Yegorov on
 Fri, 26 Jul 2024 21:26:34 +0200)
Subject: Re: bug#72311: [PATCH] Treat period as a symbol constituent in cc-mode
References: <87h6ccm02t.fsf@HIDDEN> <871q3g3qfp.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72311
Cc: 72311 <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 (---)

> Cc: 72311 <at> debbugs.gnu.org
> From: Vladislav Yegorov <vlad@HIDDEN>
> Date: Fri, 26 Jul 2024 21:26:34 +0200
> 
> Subject: [PATCH] Treat period as a symbol constituent in cc-mode
> 
> * lisp/progmodes/cc-langs.el: Classify period as a symbol constituent,
> so decimal points for example don't divide the number into two symbols.

What about stuff like 'foo.bar', where 'foo' is a struct and 'bar' is
its member? won't this change make them a single symbol?




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

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


Received: (at 72311) by debbugs.gnu.org; 26 Jul 2024 21:38:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 26 17:38:13 2024
Received: from localhost ([127.0.0.1]:40176 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sXSdd-00074U-I7
	for submit <at> debbugs.gnu.org; Fri, 26 Jul 2024 17:38:13 -0400
Received: from out-188.mta1.migadu.com ([95.215.58.188]:56266)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jb@HIDDEN>) id 1sXSdb-00074E-Pd
 for 72311 <at> debbugs.gnu.org; Fri, 26 Jul 2024 17:38:08 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net;
 s=key1; t=1722029872;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=d8dWDDGp7gDHTJpctJFfyJwjiuSJVRfipVZnI5FvHPw=;
 b=f+BhUEAJkr77wXafI//pTDdigRrO4jkooDywwFeWLhm6/AdAeJ5dzKPOMADq8eopPoFNHQ
 /BzOWvhWwE32PT7CSKM7upaMbU7aD48vrbZcvyBgVeGClYCYVUbHCcVAImWtjcNdbaIFzv
 RwvP1uWdscFtS/PCZlALTWBAF4T6gipDP5+P8syWvio4zrXFXuPWeQDNipXU31V15dEJwB
 kOsMtKF5m3elGwa8Xi4wuZntuK/+2ym3tvWLoRKGo2ANkx4B0J6UUi2un1PCKwLlSgAP/+
 Qr6WoWG/P+uHWMNDrgEU0EmPa7pmRQr6LZr1gffDxdfK8Ych02IS/jxdfiMROw==
From: Jeremy Bryant <jb@HIDDEN>
To: Vladislav Yegorov <vlad@HIDDEN>
Subject: Re: bug#72311: [PATCH] Treat period as a symbol constituent in cc-mode
In-Reply-To: <871q3g3qfp.fsf@HIDDEN> (Vladislav Yegorov's message of
 "Fri, 26 Jul 2024 21:26:34 +0200")
References: <87h6ccm02t.fsf@HIDDEN> <871q3g3qfp.fsf@HIDDEN>
Date: Fri, 26 Jul 2024 22:37:51 +0100
Message-ID: <87ikwral74.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 72311
Cc: Alan Mackenzie <acm@HIDDEN>, 72311 <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: -0.0 (/)

Vladislav Yegorov <vlad@HIDDEN> writes:

> I am sorry, I forgot the actual patch.
>
> [2. text/patch; 0001-Treat-period-as-a-symbol-constituent-in-cc-mode.patch]...

Alan, any thoughts?




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

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


Received: (at submit) by debbugs.gnu.org; 26 Jul 2024 19:59:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 26 15:59:19 2024
Received: from localhost ([127.0.0.1]:40099 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sXR5z-0004XQ-BE
	for submit <at> debbugs.gnu.org; Fri, 26 Jul 2024 15:59:19 -0400
Received: from lists.gnu.org ([209.51.188.17]:36458)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vlad@HIDDEN>) id 1sXQaY-0003mR-LN
 for submit <at> debbugs.gnu.org; Fri, 26 Jul 2024 15:26:51 -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 <vlad@HIDDEN>) id 1sXQaP-0007Op-9j
 for bug-gnu-emacs@HIDDEN; Fri, 26 Jul 2024 15:26:41 -0400
Received: from mout-p-202.mailbox.org ([80.241.56.172])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <vlad@HIDDEN>) id 1sXQaN-0006kZ-HK
 for bug-gnu-emacs@HIDDEN; Fri, 26 Jul 2024 15:26:41 -0400
Received: from smtp202.mailbox.org (smtp202.mailbox.org
 [IPv6:2001:67c:2050:b231:465::202])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4WVyRb4xTgz9sPv;
 Fri, 26 Jul 2024 21:26:35 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yegorov.org; s=MBO0001;
 t=1722021995;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=n51egUsLilpZlqf1LnNAyqM6RQksY5yMP6eL96RYZX8=;
 b=E966lvArf2vEsVSziaJmgB3untTxSMsL0VrPx6Dc8iB+MZO0wyE01/NBnNta7DhRWQoeSp
 /97B9tvMRBs5ZDcvE3uOHgqIJpIwNrifsqEJYB+uom/P66svM1HBpAy3FatkYKtPfvd3PQ
 L8K7lwHU7EkxnR8fKSwI2IAoqKt0law0N3xOPNLwE3XAO8VE3Gk/x7wv42pr9e5ZABUbHM
 lk9fWZGGHfSfs7xeVbYKqD/3mmH1LBuHKbG9ZMZUHtC4Zn16ZudoWOqdXicBD1CCo/qhrI
 1r+r3287MitQkdzAyQU0dA7eaHBpwOvOqtvtp7+9lxE2eZtPqhqflLeQYUHglw==
From: Vladislav Yegorov <vlad@HIDDEN>
To: Vladislav Yegorov <vlad@HIDDEN>
Subject: Re: [PATCH] Treat period as a symbol constituent in cc-mode
In-Reply-To: <87h6ccm02t.fsf@HIDDEN> (Vladislav Yegorov's message of
 "Fri, 26 Jul 2024 21:20:58 +0200")
References: <87h6ccm02t.fsf@HIDDEN>
Date: Fri, 26 Jul 2024 21:26:34 +0200
Message-ID: <871q3g3qfp.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Rspamd-Queue-Id: 4WVyRb4xTgz9sPv
Received-SPF: pass client-ip=80.241.56.172; envelope-from=vlad@HIDDEN;
 helo=mout-p-202.mailbox.org
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 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,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 26 Jul 2024 15:59:16 -0400
Cc: bug-gnu-emacs@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: -2.3 (--)

--=-=-=
Content-Type: text/plain

I am sorry, I forgot the actual patch.


--=-=-=
Content-Type: text/patch
Content-Disposition: attachment;
 filename=0001-Treat-period-as-a-symbol-constituent-in-cc-mode.patch

From 0378400ba000cdaf0612b80406e29aee1fd97231 Mon Sep 17 00:00:00 2001
From: Vladislav Yegorov <vlad@HIDDEN>
Date: Fri, 26 Jul 2024 20:55:22 +0200
Subject: [PATCH] Treat period as a symbol constituent in cc-mode

* lisp/progmodes/cc-langs.el: Classify period as a symbol constituent,
so decimal points for example don't divide the number into two symbols.
---
 lisp/progmodes/cc-langs.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 72cfdfa..f253df9 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -336,6 +336,7 @@ the comment syntax to handle both line style \"//\" and block style
   ;; Never native compile to allow cc-mode.el:467 hack.
   (declare (speed -1))
   (modify-syntax-entry ?_  "_"     table)
+  (modify-syntax-entry ?.  "_"     table)
   (modify-syntax-entry ?\\ "\\"    table)
   (modify-syntax-entry ?+  "."     table)
   (modify-syntax-entry ?-  "."     table)
-- 
2.45.2


--=-=-=--




Acknowledgement sent to Vladislav Yegorov <vlad@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#72311; 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: Tue, 11 Feb 2025 19:30:02 UTC

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