Function: nxml-back-to-section-start
nxml-back-to-section-start is a byte-compiled function defined in
nxml-outln.el.gz.
Signature
(nxml-back-to-section-start &optional INVISIBLE-OK)
Documentation
Try to move back to the start of the section containing point.
The start of the section must be <= point.
Only visible sections are included unless INVISIBLE-OK is non-nil.
If found, return t. Otherwise move to point-min and return nil.
If unbalanced section tags are found, signal an nxml-outline-error.
Source Code
;; Defined in /usr/src/emacs/lisp/nxml/nxml-outln.el.gz
(defun nxml-back-to-section-start (&optional invisible-ok)
"Try to move back to the start of the section containing point.
The start of the section must be <= point.
Only visible sections are included unless INVISIBLE-OK is non-nil.
If found, return t. Otherwise move to `point-min' and return nil.
If unbalanced section tags are found, signal an `nxml-outline-error'."
(when (or (nxml-after-section-start-tag)
(nxml-section-tag-backward))
(let (open-tags found)
(while (let (section-start-pos)
(setq section-start-pos xmltok-start)
(if (nxml-token-end-tag-p)
(setq open-tags (cons (xmltok-end-tag-qname)
open-tags))
(if (not open-tags)
(when (and (nxml-token-starts-line-p)
(or invisible-ok
(not (get-char-property section-start-pos
'invisible)))
(nxml-heading-start-position))
(setq found t))
(let ((qname (xmltok-start-tag-qname)))
(unless (string= (car open-tags) qname)
(nxml-outline-error "Mismatched end-tag"))
(setq open-tags (cdr open-tags)))))
(goto-char section-start-pos)
(and (not found)
(nxml-section-tag-backward))))
found)))