Function: python-shell-font-lock-comint-output-filter-function
python-shell-font-lock-comint-output-filter-function is a
byte-compiled function defined in python.el.gz.
Signature
(python-shell-font-lock-comint-output-filter-function OUTPUT)
Documentation
Clean up the font-lock buffer after any OUTPUT.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-shell-font-lock-comint-output-filter-function (output)
"Clean up the font-lock buffer after any OUTPUT."
(unless (string= output "") ;; See Bug#33959.
(if (let ((output (ansi-color-filter-apply output)))
(and (python-shell-comint-end-of-output-p output)
;; Assume "..." represents a continuation prompt.
(not (string-match "\\.\\.\\." output))))
;; If output ends with an initial (not continuation) input prompt
;; then the font-lock buffer must be cleaned up.
(python-shell-font-lock-cleanup-buffer)
;; Otherwise just add a newline.
(python-shell-font-lock-with-font-lock-buffer
(goto-char (point-max))
(newline)))
output))