Function: preview-watch-preamble
preview-watch-preamble is a byte-compiled function defined in
preview.el.
Signature
(preview-watch-preamble FILE COMMAND FORMAT-CONS &optional OUT-FILE)
Documentation
Set up a watch on master file FILE.
FILE can be an associated buffer instead of a filename. COMMAND is the command that generated the format. FORMAT-CONS contains the format info for the main format dump handler. OUT-FILE replaces FILE to determine the dump-files, if non-nil.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/preview.el
(defun preview-watch-preamble (file command format-cons &optional out-file)
"Set up a watch on master file FILE.
FILE can be an associated buffer instead of a filename.
COMMAND is the command that generated the format.
FORMAT-CONS contains the format info for the main format dump handler.
OUT-FILE replaces FILE to determine the dump-files, if non-nil."
(let ((buffer (if (bufferp file)
file
(find-buffer-visiting file)))
ov)
(setcdr
format-cons
(cl-list*
(or out-file file)
command
(when buffer
(with-current-buffer buffer
(save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(unless (re-search-forward preview-dump-threshold nil t)
(error "Can't find preamble of `%s'" file))
(setq ov (make-overlay (point-min) (point)))
(overlay-put ov 'format-cons format-cons)
(overlay-put ov 'insert-in-front-hooks
'(preview-preamble-changed-function))
(overlay-put ov 'modification-hooks
'(preview-preamble-changed-function))
ov))))))))