574 |
;; |
;; |
575 |
;; Add hook if lazy-lock.el is fontifying on scrolling or is deferring. |
;; Add hook if lazy-lock.el is fontifying on scrolling or is deferring. |
576 |
(when (or fontifying defer-change defer-scroll defer-context) |
(when (or fontifying defer-change defer-scroll defer-context) |
|
(make-local-hook 'window-scroll-functions) |
|
577 |
(add-hook 'window-scroll-functions (if defer-scroll |
(add-hook 'window-scroll-functions (if defer-scroll |
578 |
'lazy-lock-defer-after-scroll |
'lazy-lock-defer-after-scroll |
579 |
'lazy-lock-fontify-after-scroll) |
'lazy-lock-fontify-after-scroll) |
581 |
;; |
;; |
582 |
;; Add hook if lazy-lock.el is fontifying and is not deferring changes. |
;; Add hook if lazy-lock.el is fontifying and is not deferring changes. |
583 |
(when (and fontifying (not defer-change) (not defer-context)) |
(when (and fontifying (not defer-change) (not defer-context)) |
|
(make-local-hook 'before-change-functions) |
|
584 |
(add-hook 'before-change-functions 'lazy-lock-arrange-before-change nil t)) |
(add-hook 'before-change-functions 'lazy-lock-arrange-before-change nil t)) |
585 |
;; |
;; |
586 |
;; Replace Font Lock mode hook. |
;; Replace Font Lock mode hook. |
597 |
nil t) |
nil t) |
598 |
;; |
;; |
599 |
;; Add package-specific hook. |
;; Add package-specific hook. |
|
(make-local-hook 'outline-view-change-hook) |
|
600 |
(add-hook 'outline-view-change-hook 'lazy-lock-fontify-after-visage nil t) |
(add-hook 'outline-view-change-hook 'lazy-lock-fontify-after-visage nil t) |
|
(make-local-hook 'hs-hide-hook) |
|
601 |
(add-hook 'hs-hide-hook 'lazy-lock-fontify-after-visage nil t)) |
(add-hook 'hs-hide-hook 'lazy-lock-fontify-after-visage nil t)) |
602 |
|
|
603 |
(defun lazy-lock-install-timers (dtime stime) |
(defun lazy-lock-install-timers (dtime stime) |