Function: comint--fontify-input-fontify-region
comint--fontify-input-fontify-region is a byte-compiled function
defined in comint.el.gz.
Signature
(comint--fontify-input-fontify-region ORIG-FUN BEG END &rest ARGS)
Documentation
Fontify user input in the current comint buffer.
Fontify the input text in the region with the help of an indirect buffer.
Skip fontification of input regions with non-nil
comint--fontify-input-inhibit-fontification text property.
Designed as an advice for use in font-lock-fontify-region-function.
Source Code
;; Defined in /usr/src/emacs/lisp/comint.el.gz
(defun comint--fontify-input-fontify-region (orig-fun beg end &rest args)
"Fontify user input in the current comint buffer.
Fontify the input text in the region with the help of an indirect buffer.
Skip fontification of input regions with non-nil
`comint--fontify-input-inhibit-fontification' text property.
Designed as an advice for use in `font-lock-fontify-region-function'."
(pcase (apply orig-fun beg end args)
(`(jit-lock-bounds ,beg1 . ,end1)
(setq beg beg1 end end1)))
(pcase
(let ((min (point-min))
(max (point-max)))
(with-current-buffer (comint-indirect-buffer)
(narrow-to-region min max)
(comint--intersect-regions
(lambda (_beg end) (comint--dummy-fontify-syntax end))
(lambda (beg end)
(if (get-text-property
beg 'comint--fontify-input-inhibit-fontification)
(comint--dummy-fontify-syntax end)
(apply #'font-lock-fontify-region beg end args)))
beg end)))
(`((jit-lock-bounds ,beg1 . ,_) . (jit-lock-bounds ,_ . ,end1))
(setq beg (min beg beg1))
(setq end (max end end1))))
`(jit-lock-bounds ,beg . ,end))