Function: xsdre-check-range-list
xsdre-check-range-list is a byte-compiled function defined in
xsd-regexp.el.gz.
Signature
(xsdre-check-range-list RANGE-LIST)
Documentation
Check that RANGE-LIST is a range-list.
Signal an error if it is not.
Source Code
;; Defined in /usr/src/emacs/lisp/nxml/xsd-regexp.el.gz
(defun xsdre-check-range-list (range-list)
"Check that RANGE-LIST is a range-list.
Signal an error if it is not."
(let ((last nil))
(while range-list
(unless (consp range-list)
(error "Range list not a list"))
(let ((head (car range-list)))
(unless (or (integerp head)
(and (consp head)
(integerp (car head))
(integerp (cdr head))))
(error "Bad range %s" head))
(when (and last
(not (< (1+ last) (xsdre-range-first head))))
(error "Ranges not strictly increasing"))
(setq last (xsdre-range-last head)))
(setq range-list (cdr range-list))))
t)