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


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] New minor mode: `electric-block-comment-mode'
Date: Mon, 17 Mar 2025 13:40:24 -0600
[Message part 1 (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 2 (text/html, inline)]
[0001-New-minor-mode-electric-block-comment-mode.patch (text/x-patch, attachment)]
[Message part 4 (text/plain, inline)]
-- 
                                          - E.G via GNU Emacs and Org.

This bug report was last modified 106 days ago.

Previous Next


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