Function: nxml-in-mixed-content-p
nxml-in-mixed-content-p is a byte-compiled function defined in
nxml-mode.el.gz.
Signature
(nxml-in-mixed-content-p ENDP)
Documentation
Return non-nil if point is in mixed content.
Point must be after an end-tag or before a start-tag. ENDP is t in the former case, nil in the latter.
Source Code
;; Defined in /usr/src/emacs/lisp/nxml/nxml-mode.el.gz
(defun nxml-in-mixed-content-p (endp)
"Return non-nil if point is in mixed content.
Point must be after an end-tag or before a start-tag.
ENDP is t in the former case, nil in the latter."
(let (matching-tag-pos)
(cond ((not (run-hook-with-args-until-failure
'nxml-in-mixed-content-hook))
nil)
;; See if the matching tag does not start or end a line.
((condition-case nil
(progn
(setq matching-tag-pos
(xmltok-save
(if endp
(and (nxml-scan-element-backward (point))
xmltok-start)
(nxml-scan-element-forward (point)))))
(and matching-tag-pos
(save-excursion
(goto-char matching-tag-pos)
(not (if endp
(progn
(skip-chars-backward " \t")
(bolp))
(looking-at "[ \t]*$"))))))
(nxml-scan-error nil))
t)
;; See if there's data at the same level.
((let (start end)
(if endp
(setq start matching-tag-pos
end (point))
(setq start (point)
end matching-tag-pos))
(save-excursion
(or (when start
(goto-char start)
(nxml-preceding-sibling-data-p))
(when end
(goto-char end)
(nxml-following-sibling-data-p)))))
t)
;; Otherwise, treat as not mixed
(t nil))))