Function: rng-validate-prepare
rng-validate-prepare is a byte-compiled function defined in
rng-valid.el.gz.
Signature
(rng-validate-prepare)
Documentation
Prepare to do some validation, initializing point and the state.
Return t if there is work to do, nil otherwise.
Source Code
;; Defined in /usr/src/emacs/lisp/nxml/rng-valid.el.gz
(defun rng-validate-prepare ()
"Prepare to do some validation, initializing point and the state.
Return t if there is work to do, nil otherwise."
(cond ((= rng-validate-up-to-date-end (point-min))
(rng-set-initial-state)
t)
((= rng-validate-up-to-date-end (point-max))
nil)
(t (let ((state (get-text-property (1- rng-validate-up-to-date-end)
'rng-state)))
(cond (state
(rng-restore-state state)
(goto-char rng-validate-up-to-date-end))
(t
(let ((pos (previous-single-property-change
rng-validate-up-to-date-end
'rng-state)))
(cond (pos
(rng-restore-state
(or (get-text-property (1- pos) 'rng-state)
(error "Internal error: state null")))
(goto-char pos))
(t (rng-set-initial-state))))))))))