Variable: comint-fontify-input-mode-hook

comint-fontify-input-mode-hook is a customizable variable defined in comint.el.gz.

Value

nil

Documentation

Hook run after entering or leaving comint-fontify-input-mode(var)/comint-fontify-input-mode(fun).

No problems result if this variable is not bound. add-hook automatically binds it. (This is true for all hook variables.)

Source Code

;; Defined in /usr/src/emacs/lisp/comint.el.gz
(define-minor-mode comint-fontify-input-mode
  "Enable input fontification in the current comint buffer.
This minor mode is useful if the current major mode derives from
`comint-mode' and if `comint-indirect-setup-function' is set.
Comint modes that support input fontification usually set this
variable buffer-locally to a major-mode command whose
font-locking is desired for input text.

Input text is fontified through an indirect buffer created with
`comint-indirect-buffer', which see.

This function signals an error if `comint-use-prompt-regexp' is
non-nil.  Input fontification isn't compatible with this
setting."
  :lighter nil
  :interactive (comint-mode)
  (if comint-fontify-input-mode
      (let ((success nil))
        (unwind-protect
            (progn
              (comint--fontify-input-on)
              (setq success t))
          (unless success
            (setq comint-fontify-input-mode nil)
            (comint--fontify-input-off))))
    (comint--fontify-input-off)))