Subject: bug#77081: [PATCH] New minor mode: `electric-block-comment-mode'

From: Eli Zaretskii <[email-masked]>
Date: Sat, 22 Mar 2025 14:04:44 +0200

> From: Elijah Gabe Pérez <[email-masked]>
> Date: Mon, 17 Mar 2025 17:03:42 -0600
> 
> I've noticed a little error in the sent patch,
> sending fixed one.

Thanks.

> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -111,6 +111,10 @@ If you have been using these variables in Lisp code (for example, in
>  font-lock rules), simply quote the symbol, to use the face directly
>  instead of its now-obsolete variable.
>  
> +** New minor mode 'electric-block-comment-mode'
> +This mode automatically close block comment typed, thus typing
> +"/*" in c-mode automatically inserts "*/".
> +

This should mention block-comment-start and block-comment-end.  Also,
it would be good to name a few modes which support block comments,
just so users of those modes will become interested.

> +(defun electric-block-comment-post-self-insert-function ()
> +  "Function that `electric-block-comment' adds to `post-self-insert-hook'.
> +This closes block comment when a block comment start is typed."

This doc string should likewise mention block-comment-start and
block-comment-end.

> +(define-minor-mode electric-block-comment-mode
> +  "Toggle automatic close comment blocks (Electric Comment mode).
                       ^^^^^^^^^^^^^^^^^^^^
"closing of block comments"