Function: python-shell-font-lock-turn-on
python-shell-font-lock-turn-on is an interactive and byte-compiled
function defined in python.el.gz.
Signature
(python-shell-font-lock-turn-on &optional MSG)
Documentation
Turn on shell font-lock.
With argument MSG show activation message.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defun python-shell-font-lock-turn-on (&optional msg)
"Turn on shell font-lock.
With argument MSG show activation message."
(interactive "p")
(python-shell-with-shell-buffer
(python-shell-font-lock-kill-buffer)
(setq-local python-shell--font-lock-buffer nil)
(add-hook 'post-command-hook
#'python-shell-font-lock-post-command-hook nil 'local)
(add-hook 'kill-buffer-hook
#'python-shell-font-lock-kill-buffer nil 'local)
(add-hook 'comint-output-filter-functions
#'python-shell-font-lock-comint-output-filter-function
'append 'local)
(when msg
(message "Shell font-lock is enabled"))))