GNU bug report logs -
#77081
[PATCH] New minor mode: `electric-block-comment-mode'
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 29 Mar 2025 14:03:57 +0300
with message-id <86bjtk85eq.fsf <at> gnu.org>
and subject line Re: bug#77081: [PATCH] New minor mode: `electric-block-comment-mode'
has caused the debbugs.gnu.org bug report #77081,
regarding [PATCH] New minor mode: `electric-block-comment-mode'
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
77081: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77081
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Hello,
This minor automatically lets you close block comment when typing
a block comment start.
Thus...
#+begin_src
typing /* in c-mode
automatically inserts */.
electric-block-comment-mode: on
/*|
^ cursor
/* | */
^ cursor
Or in lua --[[ inserts ]]--.
electric-block-comment-mode: on
--[[|
^ cursor
--[[ | ]]--
^ cursor
#+end_src
and so on.
*However, there is a problem,*
This minor mode uses =block-comment-start= and =block-comment-end=
variables, which most of the major modes do not use or define.
The reason I decided to use these variables is because are more explicit
with the type of comment that is used/supported.
I would like to hear your feedback.
[Message part 4 (text/html, inline)]
[0001-New-minor-mode-electric-block-comment-mode.patch (text/x-patch, attachment)]
[Message part 6 (text/plain, inline)]
--
- E.G via GNU Emacs and Org.
[Message part 7 (message/rfc822, inline)]
> From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
> Cc: 77081 <at> debbugs.gnu.org
> Date: Sat, 22 Mar 2025 13:51:42 -0600
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> — 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.
>
> I agree, done.
>
> Sending fixed patch.
Thanks, installed on the master branch, and closing the bug.
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.