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

Previous Next

Package: emacs;

Reported by: Elijah Gabe Pérez <eg642616 <at> gmail.com>

Date: Mon, 17 Mar 2025 19:41:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Elijah Gabe Pérez <eg642616 <at> gmail.com>
Cc: 77081 <at> debbugs.gnu.org
Subject: bug#77081: [PATCH] New minor mode: `electric-block-comment-mode'
Date: Sat, 22 Mar 2025 14:04:44 +0200
> From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
> 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"




This bug report was last modified 105 days ago.

Previous Next


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