* Customizing `blink-matching-paren-distance'
@ 2005-08-26 10:17 martin rudalics
2005-08-27 3:41 ` Richard M. Stallman
0 siblings, 1 reply; 3+ messages in thread
From: martin rudalics @ 2005-08-26 10:17 UTC (permalink / raw)
(defcustom blink-matching-paren-distance (* 25 1024)
"*If non-nil, is maximum distance to search for matching open-paren."
:type 'integer
:group 'paren-blinking)
The doc-string implies that this variable can be nil but customize does
not permit setting it to nil. Moreover, the doc-string should say what
happens when this variable is nil, like
(defcustom blink-matching-paren-distance (* 25 1024)
"*If non-nil, is maximum distance to search for matching open-paren.
If nil, search stops at the begin of the accessible portion of the buffer."
:type '(choice (const nil) integer)
:group 'paren-blinking)
Also, users should not be allowed to enter a negative value here, but I
don't know whether there's a standard way to do this. Writing
:type '(choice (const nil)
(integer
:match (lambda (widget value) (>= value 0))))
causes a misleading error message when a negative value is entered.
A simple customization type like `nonnegative-integer' would be probably
the right thing. But this might lead to asking for `positive-integer',
`nonnegative-number', `positive-float', ...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Customizing `blink-matching-paren-distance'
2005-08-26 10:17 Customizing `blink-matching-paren-distance' martin rudalics
@ 2005-08-27 3:41 ` Richard M. Stallman
2005-08-27 12:31 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Richard M. Stallman @ 2005-08-27 3:41 UTC (permalink / raw)
Cc: emacs-devel
(defcustom blink-matching-paren-distance (* 25 1024)
"*If non-nil, is maximum distance to search for matching open-paren.
If nil, search stops at the begin of the accessible portion of the buffer."
:type '(choice (const nil) integer)
:group 'paren-blinking)
That seems reasonable; would someone please install it?
Also, users should not be allowed to enter a negative value here, but I
don't know whether there's a standard way to do this.
There is no need for that.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Customizing `blink-matching-paren-distance'
2005-08-27 3:41 ` Richard M. Stallman
@ 2005-08-27 12:31 ` Eli Zaretskii
0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2005-08-27 12:31 UTC (permalink / raw)
Cc: rudalics, emacs-devel
> From: "Richard M. Stallman" <rms@gnu.org>
> Date: Fri, 26 Aug 2005 23:41:35 -0400
> Cc: emacs-devel@gnu.org
>
> (defcustom blink-matching-paren-distance (* 25 1024)
> "*If non-nil, is maximum distance to search for matching open-paren.
>
> If nil, search stops at the begin of the accessible portion of the buffer."
> :type '(choice (const nil) integer)
> :group 'paren-blinking)
>
> That seems reasonable; would someone please install it?
Done. Thanks, Martin.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-27 12:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-26 10:17 Customizing `blink-matching-paren-distance' martin rudalics
2005-08-27 3:41 ` Richard M. Stallman
2005-08-27 12:31 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.