bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#51032: 29.0.50; Choices for blink-matching-paren


From: Stefan Kangas
Subject: bug#51032: 29.0.50; Choices for blink-matching-paren
Date: Tue, 5 Oct 2021 17:23:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

close 51032 28.1
thanks

Daniel Martín <mardani29@yahoo.es> writes:

> Arash Esbati <arash@gnu.org> writes:
>
>>
>> Is there a specific reason why users cannot choose this feature
>>
>>     With any other non-nil value, the off-screen position of the opening
>>     paren will be shown in the echo area.
>>
>> via customize interface?  Currently, one has to do
>>
>>    (setq blink-matching-paren 'show)
>>
>> in the init file to get that behavior.  Or am I missing something?
>>

Thanks for the bug report.

> I wonder if the documentation is correct.  The off-screen position of an
> open paren is shown in the echo area when the variable is non-nil and
> not 'jump-offscreen (and of course the open paren is off-screen).
>
> I don't see how 'show is treated differently than t.

Yup, there is no particular behavior associated with `show'.

Valid choices here include nil, t, `jump', and `jump-offscreen', and
while the last one will move the cursor off screen, t and jump will only
show the position in the echo area.

I have now fixed this on master (commit b2c50d7cf3) with the below
patch.  This change will be a part of the upcoming Emacs 28.1.

diff --git a/lisp/simple.el b/lisp/simple.el
index 3695415163..459fc67944 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -8419,11 +8419,16 @@ paren-blinking

 (defcustom blink-matching-paren t
   "Non-nil means show matching open-paren when close-paren is inserted.
-If t, highlight the paren.  If `jump', briefly move cursor to its
-position.  If `jump-offscreen', move cursor there even if the
-position is off screen.  With any other non-nil value, the
-off-screen position of the opening paren will be shown in the
-echo area."
+In addition, if the opening paren is not visible on screen, show
+its position in the echo area.
+
+The valid values are:
+
+  nil               Disable.
+  non-nil           Highlight the opening paren.
+  `jump'            Briefly move cursor to its position.
+  `jump-offscreen'  Briefly move cursor to its position,
+                    even if the opening paren is not on screen."
   :type '(choice
           (const :tag "Disable" nil)
           (const :tag "Highlight" t)





reply via email to

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