Function: preview-place-preview

preview-place-preview is a byte-compiled function defined in preview.el.

Signature

(preview-place-preview SNIPPET START END BOX COUNTERS TEMPDIR PLACE-OPTS)

Documentation

Generate and place an overlay preview image.

This generates the filename for the preview snippet SNIPPET in the current buffer, and uses it for the region between START and END. BOX is an optional preparsed TeX bounding BOX passed on to the place hook. COUNTERS is the info about saved counter structures. TEMPDIR is a copy of TeX-active-tempdir. PLACE-OPTS are additional arguments passed into preview-parse-messages. Return a list with additional info from the placement hook. Those lists get concatenated together and get passed to the close hook.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/preview.el
(defun preview-place-preview (snippet start end
                                      box counters tempdir place-opts)
  "Generate and place an overlay preview image.
This generates the filename for the preview
snippet SNIPPET in the current buffer, and uses it for the
region between START and END.  BOX is an optional preparsed
TeX bounding BOX passed on to the `place' hook.
COUNTERS is the info about saved counter structures.
TEMPDIR is a copy of `TeX-active-tempdir'.
PLACE-OPTS are additional arguments passed into
`preview-parse-messages'.  Return
a list with additional info from the placement hook.
Those lists get concatenated together and get passed
to the close hook."
  (setq preview-current-region nil)
  (let ((ov (make-overlay start end nil nil nil)))
    (overlay-put ov 'priority (TeX-overlay-prioritize start end))
    (overlay-put ov 'preview-map
                 (preview-make-clickable
                  nil nil nil
                  (lambda (event) (interactive "e")
                    (preview-toggle ov 'toggle event))
                  (lambda (event) (interactive "e")
                    (preview-context-menu ov event))))
    (overlay-put ov 'timestamp tempdir)
    (when (cdr counters)
      (overlay-put ov 'preview-counters counters)
      (setq preview-buffer-has-counters t))
    (prog1 (apply #'preview-call-hook 'place ov snippet box
                  place-opts)
      (overlay-put ov 'strings
                   (list (preview-active-string ov)))
      (preview-toggle ov t)
      (preview-clearout start end tempdir ov))))