diff --git a/etc/NEWS b/etc/NEWS index 687beda0f21..605d4049ada 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -113,17 +113,6 @@ 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, typing `block-comment-start' -closes it inserting their corresponding `block-comment-end'. -Thus, allows closing block comments for major modes ​​that support it, -such as: -- c-mode, c++-mode, java-mode, js-mode, css-mode, and derived -- html-mode, mhtml-mode, xml-mode and nxml-mode -- pascal-mode -- lua-ts-mode -- lisp-mode and common-lisp-mode - ** Network Security Manager (NSM) is now more strict. *** NSM warns about TLS 1.1 by default. @@ -1679,6 +1668,14 @@ Visiting a file in such mode ask for confirmation before installing its tree-sitter grammar. Then it highlights the visited file according to syntax defined by the grammar. +** New minor mode 'electric-block-comment-mode'. +This mode automatically close block comment, typing +`block-comment-start' closes it inserting their corresponding +`block-comment-end'. Thus, allows closing block comments for major +modes ​​that support it, such as: c-mode, c++-mode, java-mode, js-mode, +css-mode, and derived: html-mode, mhtml-mode, xml-mode and nxml-mode, +pascal-mode, lua-ts-mode, lisp-mode and common-lisp-mode + * Incompatible Lisp Changes in Emacs 31.1 diff --git a/lisp/electric.el b/lisp/electric.el index 86c01438e9a..da5fa973757 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -758,8 +758,10 @@ corresponding `block-comment-end'." :group 'electricity :version "31.1" (if electric-block-comment-mode - (add-hook 'post-self-insert-hook #'electric-block-comment-post-self-insert-function 10 t) - (remove-hook 'post-self-insert-hook #'electric-block-comment-post-self-insert-function t))) + (add-hook 'post-self-insert-hook + #'electric-block-comment-post-self-insert-function 10 t) + (remove-hook 'post-self-insert-hook + #'electric-block-comment-post-self-insert-function t))) (provide 'electric)