diff options
| author | Dmitry Gutov | 2021-09-29 03:48:27 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2021-09-29 03:48:27 +0300 |
| commit | ee856b76ff6a241cefec1f448a2c5528ad0f1c56 (patch) | |
| tree | f171f5f6233c371f3d95e486fed4b1a51a157d19 | |
| parent | 568b8b977fc6b702655b2f9ca9f358aa1e6f12c4 (diff) | |
| download | emacs-ee856b76ff6a241cefec1f448a2c5528ad0f1c56.tar.gz emacs-ee856b76ff6a241cefec1f448a2c5528ad0f1c56.zip | |
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.
| -rw-r--r-- | etc/NEWS | 9 | ||||
| -rw-r--r-- | lisp/paren.el | 2 |
2 files changed, 10 insertions, 1 deletions
| @@ -1077,10 +1077,17 @@ This command is bound to 'C-x C-k d'. | |||
| 1077 | It used to be enabled when Emacs is started in GUI mode but not when started | 1077 | It used to be enabled when Emacs is started in GUI mode but not when started |
| 1078 | in text mode. The cursor still only actually blinks in GUI frames. | 1078 | in text mode. The cursor still only actually blinks in GUI frames. |
| 1079 | 1079 | ||
| 1080 | ** 'show-paren-mode' is now enabled by default. | ||
| 1081 | To go back to the previous behavior, customize the user option by the | ||
| 1082 | same name to nil. | ||
| 1083 | |||
| 1080 | +++ | 1084 | +++ |
| 1081 | ** New minor mode 'show-paren-local-mode'. | 1085 | ** New minor mode 'show-paren-local-mode'. |
| 1082 | It serves as a local counterpart for 'show-paren-mode', allowing you | 1086 | It serves as a local counterpart for 'show-paren-mode', allowing you |
| 1083 | to toggle it separately in different buffers. | 1087 | to toggle it separately in different buffers. To use it only in |
| 1088 | programming modes, for example, add the following to your init file: | ||
| 1089 | |||
| 1090 | (add-hook 'prog-mode-hook #'show-paren-local-mode) | ||
| 1084 | 1091 | ||
| 1085 | 1092 | ||
| 1086 | * Changes in Specialized Modes and Packages in Emacs 28.1 | 1093 | * 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. | |||
| 107 | This is a global minor mode. To toggle the mode in a single buffer, | 107 | This is a global minor mode. To toggle the mode in a single buffer, |
| 108 | use `show-paren-local-mode'." | 108 | use `show-paren-local-mode'." |
| 109 | :global t :group 'paren-showing | 109 | :global t :group 'paren-showing |
| 110 | :initialize 'custom-initialize-delay | ||
| 111 | :init-value t | ||
| 110 | ;; Enable or disable the mechanism. | 112 | ;; Enable or disable the mechanism. |
| 111 | ;; First get rid of the old idle timer. | 113 | ;; First get rid of the old idle timer. |
| 112 | (when show-paren--idle-timer | 114 | (when show-paren--idle-timer |