* lisp/wid-edit.el (natnum): New widget type. (Bug#15809)
* doc/lispref/customize.texi (Simple Types): Document it.
@item integer
The value must be an integer.
+@item natnum
+The value must be a nonnegative integer.
+
@item number
The value must be a number (floating point or integer).
---
** ':safe' settings in 'defcustom' are now propagated to the loaddefs files.
++++
+** New ':type' for 'defcustom' for nonnegative integers.
+The new 'natnum' type can be used for options that should be
+nonnegative integers.
+
+++
** ERT can now output more verbose test failure reports.
If the 'EMACS_TEST_VERBOSE' environment variable is set, failure
:type-error "This field should contain an integer"
:match-alternatives '(integerp))
+(define-widget 'natnum 'restricted-sexp
+ "A nonnegative integer."
+ :tag "Integer (positive)"
+ :value 0
+ :type-error "This field should contain a nonnegative integer"
+ :match-alternatives '(natnump))
+
(define-widget 'number 'restricted-sexp
"A number (floating point or integer)."
:tag "Number"