[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Customizing `blink-matching-paren-distance'
From: |
martin rudalics |
Subject: |
Customizing `blink-matching-paren-distance' |
Date: |
Fri, 26 Aug 2005 12:17:50 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
(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', ...
- Customizing `blink-matching-paren-distance',
martin rudalics <=