Function: shell-reapply-ansi-color

shell-reapply-ansi-color is a byte-compiled function defined in shell.el.gz.

Signature

(shell-reapply-ansi-color)

Documentation

Reapply ansi-color faces to the existing contents of the buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/shell.el.gz
(defun shell-reapply-ansi-color ()
  "Reapply ansi-color faces to the existing contents of the buffer."
  (save-restriction
    (widen)
    (let* ((pos (point-min))
	   (end (or (next-single-property-change pos 'ansi-color-face)
		    (point-max)))
	   face)
      (while end
	(if (setq face (get-text-property pos 'ansi-color-face))
	    (put-text-property pos (or end (point-max))
			       'font-lock-face face))
	(setq pos end
	      end (next-single-property-change pos 'ansi-color-face))))))