Function: ansi-color-make-extent

ansi-color-make-extent is a byte-compiled function defined in ansi-color.el.gz.

Signature

(ansi-color-make-extent FROM TO &optional BUFFER)

Documentation

Make an extent for the range [FROM, TO) in BUFFER.

BUFFER defaults to the current buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/ansi-color.el.gz
(defun ansi-color-make-extent (from to &optional buffer)
  "Make an extent for the range [FROM, TO) in BUFFER.

BUFFER defaults to the current buffer."
  ;; The overlay might end at the process-mark in comint
  ;; buffers.  In that case, new text will be inserted before the
  ;; process-mark, ie. inside the overlay (using insert-before-marks).
  ;; In order to avoid this, we use the `insert-behind-hooks' overlay
  ;; property to make sure it works.
  (let ((overlay (make-overlay from to buffer)))
    (overlay-put overlay 'evaporate t)
    (overlay-put overlay 'modification-hooks '(ansi-color-freeze-overlay))
    (overlay-put overlay 'insert-behind-hooks '(ansi-color-freeze-overlay))
    overlay))