Function: diary-fancy-font-lock-fontify-region-function
diary-fancy-font-lock-fontify-region-function is a byte-compiled
function defined in diary-lib.el.gz.
Signature
(diary-fancy-font-lock-fontify-region-function BEG END &optional VERBOSE)
Documentation
Function to use for font-lock-fontify-region-function in Fancy Diary.
Needed to handle multiline keyword in diary-fancy-font-lock-keywords.
Fontify the region between BEG and END, quietly unless VERBOSE is non-nil.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
;; If region looks like it might start or end in the middle of a
;; multiline pattern, extend the region to encompass the whole pattern.
(defun diary-fancy-font-lock-fontify-region-function (beg end &optional verbose)
"Function to use for `font-lock-fontify-region-function' in Fancy Diary.
Needed to handle multiline keyword in `diary-fancy-font-lock-keywords'.
Fontify the region between BEG and END, quietly unless VERBOSE is non-nil."
(goto-char beg)
(forward-line 0)
(if (looking-at "=+$") (forward-line -1))
(while (and (looking-at " +[^ ]")
(zerop (forward-line -1))))
(goto-char end)
(forward-line 0)
(while (and (looking-at " +[^ ]")
(zerop (forward-line 1))))
(if (looking-at "=+$")
(setq end (line-beginning-position 2)))
(font-lock-default-fontify-region beg end verbose))