aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2025-06-07 13:32:41 +0300
committerEli Zaretskii2025-06-07 13:32:41 +0300
commitbed490f0f2d2a8ec7181a7a6b65520a7e40f78fb (patch)
treeb9f0cb41c3050ad72c3493d576fd34354a2fe3ae
parent12397e3eb00c052455f03dc024e9335834f0c6ef (diff)
downloademacs-bed490f0f2d2a8ec7181a7a6b65520a7e40f78fb.tar.gz
emacs-bed490f0f2d2a8ec7181a7a6b65520a7e40f78fb.zip
; Fix last change (bug#78396)
* lisp/paren.el (show-paren-not-in-comments-or-strings): * etc/NEWS: * doc/emacs/programs.texi (Matching): Fix wording and punctuation in doc string, defcustom tags, manual, and NEWS.
-rw-r--r--doc/emacs/programs.texi6
-rw-r--r--etc/NEWS13
-rw-r--r--lisp/paren.el19
3 files changed, 21 insertions, 17 deletions
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 56cc321866d..446f1c864c7 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -1061,8 +1061,10 @@ nonblank line.
1061@vindex show-paren-not-in-comments-or-strings 1061@vindex show-paren-not-in-comments-or-strings
1062If the value of @code{show-paren-not-in-comments-or-strings} is 1062If the value of @code{show-paren-not-in-comments-or-strings} is
1063@code{all}, delimiters inside comments and strings will not be 1063@code{all}, delimiters inside comments and strings will not be
1064highlighted. Otherwise if the value is set to @code{on-mismatch}, the 1064highlighted. Otherwise, if the value is set to @code{on-mismatch}, the
1065mismatched delimiters inside comments will not be highlighted. 1065mismatched delimiters inside comments will not be highlighted. The
1066default is @code{nil}, so delimiters inside comments and strings are
1067always highlighted.
1066@end itemize 1068@end itemize
1067 1069
1068@cindex Electric Pair mode 1070@cindex Electric Pair mode
diff --git a/etc/NEWS b/etc/NEWS
index 1c65e2b1ad3..1f29fe5f0b4 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -483,12 +483,13 @@ setting is an alternative to 'help-at-pt-display-when-idle'.
483Customize this to nil to disable starting new asynchronous native 483Customize this to nil to disable starting new asynchronous native
484compilations while AC power is not connected. 484compilations while AC power is not connected.
485 485
486** New user option 'show-paren-not-in-comments-or-strings' 486** New user option 'show-paren-not-in-comments-or-strings'.
487This option tells show-paren not to highlight the parens that are inside 487If this option is non-nil, it tells 'show-paren-mode' not to highlight
488a comment or string. If set to 'all', do not highlight the parens that 488the parens that are inside comments and strings. If set to 'all',
489are inside comments or strings. If set to 'on-mismatch', the parens 489'show-paren-mode' will never highlight parens that are inside comments
490mismatched inside comments will not be highlighted. If set to nil (the 490or strings. If set to 'on-mismatch', mismatched parens inside comments
491default), highlight the parens wherever they are. 491and strings will not be highlighted. If set to nil (the default),
492highlight the parens wherever they are.
492 493
493 494
494* Editing Changes in Emacs 31.1 495* Editing Changes in Emacs 31.1
diff --git a/lisp/paren.el b/lisp/paren.el
index 986576a8e1d..5a70e2771b3 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -111,16 +111,17 @@ On non-graphical frames, the context is shown in the echo area."
111 :version "29.1") 111 :version "29.1")
112 112
113(defcustom show-paren-not-in-comments-or-strings nil 113(defcustom show-paren-not-in-comments-or-strings nil
114 "Do not highlight the paren that are inside a comment or string. 114 "If non-nil, do not highlight the parens inside comments and strings.
115If set to `all', do not highlight the paren that are inside comments 115If set to `all', never highlight parens inside comments and strings.
116or strings. 116If set to `on-mismatch', do not highlight mismatched parens inside
117If set to `on-mismatch', the paren mismatched inside comments will not be 117comments and strings.
118highlighted. 118If set to nil (the default), always highlight parens wherever they are."
119If set to nil (by default), highlight the paren wherever it is."
120 :type '(choice 119 :type '(choice
121 (const :tag "Never highlight" all) 120 (const :tag "Never highlight parens in comments and strings" all)
122 (const :tag "Don't highlight when mismatched" on-mismatch) 121 (const
123 (const :tag "Always highlight" nil)) 122 :tag "Don't highlight mismatched parens in comments and strings"
123 on-mismatch)
124 (const :tag "Always highlight parens" nil))
124 :version "31.1") 125 :version "31.1")
125 126
126(defvar show-paren--idle-timer nil) 127(defvar show-paren--idle-timer nil)