emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master ee856b7: Enable show-paren-mode by default


From: Dmitry Gutov
Subject: master ee856b7: Enable show-paren-mode by default
Date: Tue, 28 Sep 2021 20:48:37 -0400 (EDT)

branch: master
commit ee856b76ff6a241cefec1f448a2c5528ad0f1c56
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    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.
---
 etc/NEWS      | 9 ++++++++-
 lisp/paren.el | 2 ++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/etc/NEWS b/etc/NEWS
index 4fd5036..21cc3c5 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 708605f..ce6aa9a 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]