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 FUN BEG END VERBOSE)
Documentation
Fontify process output and user input in the current comint buffer.
First, fontify the region between BEG and END using FUN. Then
fontify only the input text in the region with the help of an
indirect buffer. VERBOSE is passed to the fontify-region
functions. Skip fontification of input regions with non-nil
comint--fontify-input-inhibit-fontification text property.
Source Code
;; Defined in /usr/src/emacs/lisp/comint.el.gz
(defun comint--fontify-input-fontify-region (fun beg end verbose)
"Fontify process output and user input in the current comint buffer.
First, fontify the region between BEG and END using FUN. Then
fontify only the input text in the region with the help of an
indirect buffer. VERBOSE is passed to the fontify-region
functions. Skip fontification of input regions with non-nil
`comint--fontify-input-inhibit-fontification' text property."
(pcase (funcall fun beg end verbose)
(`(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
nil (lambda (beg end)
(unless (get-text-property
beg 'comint--fontify-input-inhibit-fontification)
(font-lock-fontify-region beg end verbose)))
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))