unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Vladislav Yegorov <vlad@yegorov.org>
To: Vladislav Yegorov <vlad@yegorov.org>
Cc: 72311@debbugs.gnu.org
Subject: bug#72311: [PATCH] Treat period as a symbol constituent in cc-mode
Date: Fri, 26 Jul 2024 21:26:34 +0200	[thread overview]
Message-ID: <871q3g3qfp.fsf@yegorov.org> (raw)
In-Reply-To: <87h6ccm02t.fsf@yegorov.org> (Vladislav Yegorov's message of "Fri, 26 Jul 2024 21:20:58 +0200")

[-- Attachment #1: Type: text/plain, Size: 40 bytes --]

I am sorry, I forgot the actual patch.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Treat-period-as-a-symbol-constituent-in-cc-mode.patch --]
[-- Type: text/patch, Size: 993 bytes --]

From 0378400ba000cdaf0612b80406e29aee1fd97231 Mon Sep 17 00:00:00 2001
From: Vladislav Yegorov <vlad@yegorov.org>
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


  reply	other threads:[~2024-07-26 19:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-26 19:20 bug#72310: [PATCH] Treat period as a symbol constituent in cc-mode Vladislav Yegorov
2024-07-26 19:26 ` Vladislav Yegorov [this message]
2024-07-26 21:37   ` bug#72311: " Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-27  5:55   ` Eli Zaretskii
2024-07-27  9:22     ` Vladislav Yegorov
2024-07-27 11:26       ` Alan Mackenzie
2024-07-28 23:59         ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871q3g3qfp.fsf@yegorov.org \
    --to=vlad@yegorov.org \
    --cc=72311@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).