diff options
| author | Eli Zaretskii | 2025-06-07 13:32:41 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2025-06-07 13:32:41 +0300 |
| commit | bed490f0f2d2a8ec7181a7a6b65520a7e40f78fb (patch) | |
| tree | b9f0cb41c3050ad72c3493d576fd34354a2fe3ae | |
| parent | 12397e3eb00c052455f03dc024e9335834f0c6ef (diff) | |
| download | emacs-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.texi | 6 | ||||
| -rw-r--r-- | etc/NEWS | 13 | ||||
| -rw-r--r-- | lisp/paren.el | 19 |
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 |
| 1062 | If the value of @code{show-paren-not-in-comments-or-strings} is | 1062 | If 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 |
| 1064 | highlighted. Otherwise if the value is set to @code{on-mismatch}, the | 1064 | highlighted. Otherwise, if the value is set to @code{on-mismatch}, the |
| 1065 | mismatched delimiters inside comments will not be highlighted. | 1065 | mismatched delimiters inside comments will not be highlighted. The |
| 1066 | default is @code{nil}, so delimiters inside comments and strings are | ||
| 1067 | always highlighted. | ||
| 1066 | @end itemize | 1068 | @end itemize |
| 1067 | 1069 | ||
| 1068 | @cindex Electric Pair mode | 1070 | @cindex Electric Pair mode |
| @@ -483,12 +483,13 @@ setting is an alternative to 'help-at-pt-display-when-idle'. | |||
| 483 | Customize this to nil to disable starting new asynchronous native | 483 | Customize this to nil to disable starting new asynchronous native |
| 484 | compilations while AC power is not connected. | 484 | compilations 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'. |
| 487 | This option tells show-paren not to highlight the parens that are inside | 487 | If this option is non-nil, it tells 'show-paren-mode' not to highlight |
| 488 | a comment or string. If set to 'all', do not highlight the parens that | 488 | the parens that are inside comments and strings. If set to 'all', |
| 489 | are inside comments or strings. If set to 'on-mismatch', the parens | 489 | 'show-paren-mode' will never highlight parens that are inside comments |
| 490 | mismatched inside comments will not be highlighted. If set to nil (the | 490 | or strings. If set to 'on-mismatch', mismatched parens inside comments |
| 491 | default), highlight the parens wherever they are. | 491 | and strings will not be highlighted. If set to nil (the default), |
| 492 | highlight 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. |
| 115 | If set to `all', do not highlight the paren that are inside comments | 115 | If set to `all', never highlight parens inside comments and strings. |
| 116 | or strings. | 116 | If set to `on-mismatch', do not highlight mismatched parens inside |
| 117 | If set to `on-mismatch', the paren mismatched inside comments will not be | 117 | comments and strings. |
| 118 | highlighted. | 118 | If set to nil (the default), always highlight parens wherever they are." |
| 119 | If 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) |