From: Dmitry Gutov Date: Wed, 29 Sep 2021 00:48:27 +0000 (+0300) Subject: Enable show-paren-mode by default X-Git-Tag: emacs-28.0.90~540 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ee856b76ff6a241cefec1f448a2c5528ad0f1c56;p=emacs.git Enable show-paren-mode by default * etc/NEWS (https): Mention the change. * lisp/paren.el (show-paren-mode): Enable by default, as discussed on emacs-devel. --- diff --git a/etc/NEWS b/etc/NEWS index 4fd5036c3b3..21cc3c50cd1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1077,10 +1077,17 @@ This command is bound to 'C-x C-k d'. It used to be enabled when Emacs is started in GUI mode but not when started in text mode. The cursor still only actually blinks in GUI frames. +** 'show-paren-mode' is now enabled by default. +To go back to the previous behavior, customize the user option by the +same name to nil. + +++ ** New minor mode 'show-paren-local-mode'. It serves as a local counterpart for 'show-paren-mode', allowing you -to toggle it separately in different buffers. +to toggle it separately in different buffers. To use it only in +programming modes, for example, add the following to your init file: + +(add-hook 'prog-mode-hook #'show-paren-local-mode) * Changes in Specialized Modes and Packages in Emacs 28.1 diff --git a/lisp/paren.el b/lisp/paren.el index 708605f7944..ce6aa9ae13b 100644 --- a/lisp/paren.el +++ b/lisp/paren.el @@ -107,6 +107,8 @@ after `show-paren-delay' seconds of Emacs idle time. This is a global minor mode. To toggle the mode in a single buffer, use `show-paren-local-mode'." :global t :group 'paren-showing + :initialize 'custom-initialize-delay + :init-value t ;; Enable or disable the mechanism. ;; First get rid of the old idle timer. (when show-paren--idle-timer