Subject: bug#77424: [PATCH] Add block-comment-start and block-comment-end to supported modes.

From: Elijah Gabe Pérez <[email-masked]>
Date: Sun, 13 Apr 2025 12:36:55 -0600

Eli Zaretskii <[email-masked]> writes:
>> Note: I didn't included cc modes because i don't know which part to add it.
>
> Please tell more about this aspect: what exactly did you not know?

I think that i found the solution.  See below patch:

>From 7a02efe1243b5047795cd95c2ac3935953a01c23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?= <[email-masked]>
Date: Sun, 13 Apr 2025 12:26:08 -0600
Subject: [PATCH] ; Add block-comment variables to cc-mode.

* lisp/progmodes/cc-cmds.el (c-indent-new-comment-line):
Add block-comment-start and block-comment-end
* lisp/progmodes/cc-mode.el (c-basic-common-init):
Declare block-comment-start and block-comment-end buffer-local.
---
 lisp/progmodes/cc-cmds.el | 1 +
 lisp/progmodes/cc-mode.el | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 9230faa56da..06397d23321 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -5015,6 +5015,7 @@ c-indent-new-comment-line
 		      (setq comment-start "/* " comment-end " */"))
 		  (unless (string-match "[ \t]*//" comment-start)
 		    (setq comment-start "// " comment-end "")))
+		(setq block-comment-start "/*" block-comment-end "*/")
 		(setq col (save-excursion
 			    (back-to-indentation)
 			    (current-column)))
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index efeb6c1005a..fa3788ba383 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -610,6 +610,8 @@ c-basic-common-init
   (make-local-variable 'comment-start)
   (make-local-variable 'comment-end)
   (make-local-variable 'comment-start-skip)
+  (make-local-variable 'block-comment-start)
+  (make-local-variable 'block-comment-end)
 
   (make-local-variable 'paragraph-start)
   (make-local-variable 'paragraph-separate)
-- 
2.49.0

-- 
                                          - E.G via GNU Emacs and Org.