Function: font-lock-fontify-block
font-lock-fontify-block is an interactive and byte-compiled function
defined in font-lock.el.gz.
Signature
(font-lock-fontify-block &optional ARG)
Documentation
Fontify some lines the way font-lock-fontify-buffer would.
The lines could be a function or paragraph, or a specified number of lines.
If ARG is given, fontify that many lines before and after point, or 16 lines if
no ARG is given and font-lock-mark-block-function is nil.
If font-lock-mark-block-function non-nil and no ARG is given, it is used to
delimit the region to fontify.
Probably introduced at or before Emacs version 19.31.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/font-lock.el.gz
(defun font-lock-fontify-block (&optional arg)
"Fontify some lines the way `font-lock-fontify-buffer' would.
The lines could be a function or paragraph, or a specified number of lines.
If ARG is given, fontify that many lines before and after point, or 16 lines if
no ARG is given and `font-lock-mark-block-function' is nil.
If `font-lock-mark-block-function' non-nil and no ARG is given, it is used to
delimit the region to fontify."
(interactive "P")
(let ((inhibit-point-motion-hooks t)
deactivate-mark)
;; Make sure we have the right `font-lock-keywords' etc.
(if (not font-lock-mode) (font-lock-set-defaults))
(save-mark-and-excursion
(save-match-data
(condition-case error-data
(if (or arg (not font-lock-mark-block-function))
(let ((lines (if arg (prefix-numeric-value arg) 16)))
(font-lock-fontify-region
(save-excursion (forward-line (- lines)) (point))
(save-excursion (forward-line lines) (point))))
(funcall font-lock-mark-block-function)
(font-lock-fontify-region (point) (mark)))
((error quit) (message "Fontifying block...%s" error-data)))))))