Function: nxml-outline-set-overlay

nxml-outline-set-overlay is a byte-compiled function defined in nxml-outln.el.gz.

Signature

(nxml-outline-set-overlay CATEGORY START END &optional FRONT-ADVANCE REAR-ADVANCE)

Documentation

Replace any nxml-outline-display overlays between START and END.

Overlays are removed if they overlay the region between START and END, and have a non-nil nxml-outline-display property (typically via their category). If CATEGORY is non-nil, they will be replaced with a new overlay with that category from START to END. If CATEGORY is nil, no new overlay will be created.

Source Code

;; Defined in /usr/src/emacs/lisp/nxml/nxml-outln.el.gz
(defun nxml-outline-set-overlay (category
				 start
				 end
				 &optional
				 front-advance
				 rear-advance)
  "Replace any `nxml-outline-display' overlays between START and END.
Overlays are removed if they overlay the region between START and END,
and have a non-nil `nxml-outline-display' property (typically via their
category).  If CATEGORY is non-nil, they will be replaced with a new
overlay with that category from START to END.  If CATEGORY is nil,
no new overlay will be created."
  (when (< start end)
    (let ((overlays (overlays-in start end))
	  overlay)
      (while overlays
	(setq overlay (car overlays))
	(setq overlays (cdr overlays))
	(when (overlay-get overlay 'nxml-outline-display)
	  (delete-overlay overlay))))
    (and category
	 (let ((overlay (make-overlay start
				      end
				      nil
				      front-advance
				      rear-advance)))
	   (overlay-put overlay 'category category)
	   (setq line-move-ignore-invisible t)
	   overlay))))