Function: cperl-font-lock-fontify-region-function

cperl-font-lock-fontify-region-function is a byte-compiled function defined in cperl-mode.el.gz.

Signature

(cperl-font-lock-fontify-region-function BEG END LOUDLY)

Documentation

Extend the region to safe positions, then call the default function.

Process from BEG to END. LOUDLY is passed to the default function. Newer font-locks can do it themselves. We unwind only as far as needed for fontification. Syntaxification may do extra unwind via cperl-unwind-to-safe.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cperl-mode.el.gz
(defun cperl-font-lock-fontify-region-function (beg end loudly)
  "Extend the region to safe positions, then call the default function.
Process from BEG to END.  LOUDLY is passed to the default function.
Newer `font-lock's can do it themselves.
We unwind only as far as needed for fontification.  Syntaxification may
do extra unwind via `cperl-unwind-to-safe'."
  (save-excursion
    (goto-char beg)
    (while (and beg
		(progn
		  (beginning-of-line)
		  (eq (get-text-property (setq beg (point)) 'syntax-type)
		      'multiline)))
      (let ((new-beg (cperl-beginning-of-property beg 'syntax-type)))
	(setq beg (if (= new-beg beg) nil new-beg))
	(goto-char new-beg)))
    (setq beg (point))
    (goto-char end)
    (while (and end (< end (point-max))
		(progn
		  (or (bolp) (condition-case nil
				 (forward-line 1)
			       (error nil)))
		  (eq (get-text-property (setq end (point)) 'syntax-type)
		      'multiline)))
      (setq end (next-single-property-change end 'syntax-type nil (point-max)))
      (goto-char end))
    (setq end (point)))
  (font-lock-default-fontify-region beg end loudly))