Function: nxml-preceding-sibling-data-p
nxml-preceding-sibling-data-p is a byte-compiled function defined in
nxml-mode.el.gz.
Signature
(nxml-preceding-sibling-data-p)
Documentation
Return non-nil if there is a previous sibling that is data.
Source Code
;; Defined in /usr/src/emacs/lisp/nxml/nxml-mode.el.gz
(defun nxml-preceding-sibling-data-p ()
"Return non-nil if there is a previous sibling that is data."
(let ((lim (max (- (point) nxml-mixed-scan-distance)
nxml-prolog-end))
(level 0)
found end)
(xmltok-save
(save-excursion
(while (and (< lim (point))
(>= level 0)
(not found)
(progn
(setq end (point))
(search-backward "<" lim t)))
(nxml-move-outside-backwards)
(save-excursion
(xmltok-forward)
(let ((prev-level level))
(cond ((eq xmltok-type 'end-tag)
(setq level (1+ level)))
((eq xmltok-type 'start-tag)
(setq level (1- level))))
(when (eq prev-level 0)
(while (and (< (point) end) (not found))
(xmltok-forward)
(when (memq xmltok-type '(data cdata-section char-ref))
(setq found t)))))))))
found))