Function: jit-lock-deferred-fontify

jit-lock-deferred-fontify is a byte-compiled function defined in jit-lock.el.gz.

Signature

(jit-lock-deferred-fontify)

Documentation

Fontify what was deferred.

Source Code

;; Defined in /usr/src/emacs/lisp/jit-lock.el.gz
;;; Deferred fontification.

(defun jit-lock-deferred-fontify ()
  "Fontify what was deferred."
  (when (and jit-lock-defer-buffers (not memory-full))
    ;; Mark the deferred regions back to `fontified = nil'
    (dolist (buffer jit-lock-defer-buffers)
      (when (buffer-live-p buffer)
	(with-current-buffer buffer
	  ;; (message "Jit-Defer %s" (buffer-name))
	  (with-silent-modifications
	   (let ((pos (point-min)))
	     (while
		 (progn
		   (when (eq (get-text-property pos 'fontified) 'defer)
		     (put-text-property
		      pos (setq pos (next-single-property-change
				     pos 'fontified nil (point-max)))
		      'fontified nil))
		   (setq pos (next-single-property-change
                              pos 'fontified)))))))))
    ;; Force fontification of the visible parts.
    (let ((buffers jit-lock-defer-buffers)
          (jit-lock-defer-timer nil))
      (setq jit-lock-defer-buffers nil)
      ;; (message "Jit-Defer Now")
      (unless (redisplay)                       ;FIXME: Should we `force'?
        (setq jit-lock-defer-buffers buffers))
      ;; (message "Jit-Defer Done")
      )))