Function: lazy-lock-install-hooks

lazy-lock-install-hooks is a byte-compiled function defined in lazy-lock.el.gz.

Signature

(lazy-lock-install-hooks FONTIFYING DEFER-CHANGE DEFER-SCROLL DEFER-CONTEXT)

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/lazy-lock.el.gz
(defun lazy-lock-install-hooks (fontifying
				defer-change defer-scroll defer-context)
  ;;
  ;; Add hook if lazy-lock.el is fontifying on scrolling or is deferring.
  (when (or fontifying defer-change defer-scroll defer-context)
    (add-hook 'window-scroll-functions (if defer-scroll
					   #'lazy-lock-defer-after-scroll
					 #'lazy-lock-fontify-after-scroll)
	      nil t))
  ;;
  ;; Add hook if lazy-lock.el is fontifying and is not deferring changes.
  (when (and fontifying (not defer-change) (not defer-context))
    (add-hook 'before-change-functions #'lazy-lock-arrange-before-change nil t))
  ;;
  ;; Replace Font Lock mode hook.
  (remove-hook 'after-change-functions #'font-lock-after-change-function t)
  (add-hook 'after-change-functions
	    (cond ((and defer-change defer-context)
		   #'lazy-lock-defer-rest-after-change)
		  (defer-change
		   #'lazy-lock-defer-line-after-change)
		  (defer-context
		   #'lazy-lock-fontify-rest-after-change)
		  (t
		   #'lazy-lock-fontify-line-after-change))
	    nil t)
  ;;
  ;; Add package-specific hook.
  (add-hook 'outline-view-change-hook #'lazy-lock-fontify-after-visage nil t)
  (add-hook 'hs-hide-hook #'lazy-lock-fontify-after-visage nil t))