Function: lazy-lock-arrange-before-change

lazy-lock-arrange-before-change is a byte-compiled function defined in lazy-lock.el.gz.

Signature

(lazy-lock-arrange-before-change BEG END)

Source Code

;; Defined in /usr/src/emacs/lisp/obsolete/lazy-lock.el.gz
;; (c) Deletion in the buffer.  Here, a `window-end' marker can become visible.
;;     Fontification occurs by adding `lazy-lock-arrange-before-change' to
;;     `before-change-functions' and `lazy-lock-fontify-after-trigger' to the
;;     hook `redisplay-end-trigger-functions'.  Before every deletion, the
;;     marker `window-redisplay-end-trigger' position is set to the soon-to-be
;;     changed `window-end' position.  If the marker becomes visible,
;;     `lazy-lock-fontify-after-trigger' gets called.  Ouch.  Note that we only
;;     have to deal with this eventuality if there is no on-the-fly deferral.

(defun lazy-lock-arrange-before-change (beg end)
  ;; Called from `before-change-functions'.
  ;; Arrange that if text becomes visible it will be fontified (if a deletion
  ;; is pending, text might become visible at the bottom).
  (unless (eq beg end)
    (let ((windows (get-buffer-window-list (current-buffer) 'nomini t)) window)
      (while windows
	(setq window (car windows))
	(unless (markerp (window-redisplay-end-trigger window))
	  (set-window-redisplay-end-trigger window (make-marker)))
	(set-marker (window-redisplay-end-trigger window) (window-end window))
	(setq windows (cdr windows))))))