Function: preview-check-changes
preview-check-changes is a byte-compiled function defined in
preview.el.
Signature
(preview-check-changes)
Documentation
Check whether the contents under the overlay have changed.
Disable it if that is the case. Ignores text properties.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/preview.el
(defun preview-check-changes ()
"Check whether the contents under the overlay have changed.
Disable it if that is the case. Ignores text properties."
(dolist (ov preview-change-list)
(condition-case nil
(with-current-buffer (overlay-buffer ov)
(let ((text (save-restriction
(widen)
(buffer-substring-no-properties
(overlay-start ov) (overlay-end ov)))))
(if (zerop (length text))
(preview-delete ov)
(unless
(or (eq (overlay-get ov 'preview-state) 'disabled)
(preview-relaxed-string=
text (overlay-get ov 'preview-prechange)))
(overlay-put ov 'insert-in-front-hooks nil)
(overlay-put ov 'insert-behind-hooks nil)
(when (and preview-leave-open-previews-visible
(eq (overlay-get ov 'preview-state) 'active))
;; This is so that remote commands, such as `undo',
;; open active previews before disabling them.
(preview-toggle ov))
(preview-disable ov)))))
(error nil))
(overlay-put ov 'preview-prechange nil))
(setq preview-change-list nil))