Subject: bug#72311: closed (Re: bug#72311: [PATCH] Treat period as a symbol constituent in cc-mode)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 23 Feb 2025 00:50:02 +0000

Your bug report

#72311: [PATCH] Treat period as a symbol constituent in cc-mode

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
72311: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72311
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#72311: [PATCH] Treat period as a symbol constituent in cc-mode
From: Stefan Kangas <[email-masked]>
To: Dmitry Gutov <[email-masked]>
Cc: Alan Mackenzie <[email-masked]>, Eli Zaretskii <[email-masked]>, Vladislav Yegorov <[email-masked]>, Jeremy Bryant <[email-masked]>, [email-masked]
Date: Sun, 23 Feb 2025 00:49:49 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Dmitry Gutov <[email-masked]> writes:

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

It sounds like this is not a change that we want to make, so I'm closing
this now.

Nevertheless, thanks for the patch, Vladislav.

Subject: Re: [PATCH] Treat period as a symbol constituent in cc-mode
From: Vladislav Yegorov <[email-masked]>
To: Vladislav Yegorov <[email-masked]>
Cc: [email-masked]
Date: Fri, 26 Jul 2024 21:26:34 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

I am sorry, I forgot the actual patch.

>From 0378400ba000cdaf0612b80406e29aee1fd97231 Mon Sep 17 00:00:00 2001
From: Vladislav Yegorov <[email-masked]>
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