Function: preview-call-hook

preview-call-hook is a byte-compiled function defined in preview.el.

Signature

(preview-call-hook SYMBOL &rest REST)

Documentation

Call a function from preview-image-creators.

This looks up SYMBOL in the preview-image-creators entry for the image type preview-image-type and calls the hook function given there with the arguments specified there followed by REST. If such a function is specified in there, that is.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/preview.el
(defun preview-call-hook (symbol &rest rest)
  "Call a function from `preview-image-creators'.
This looks up SYMBOL in the `preview-image-creators' entry
for the image type `preview-image-type' and calls the
hook function given there with the arguments specified there
followed by REST.  If such a function is specified in there,
that is."
  (when (eq preview-image-type 'dvipng)
    (message "Using `dvipng' for `preview-image-type' is obsolete.  Use `dvi*' \
and set `preview-dvi*-image-type' instead.")
    (setq preview-image-type 'dvi*))

  (let ((hook (cdr (assq symbol
                    (cdr (assq preview-image-type
                               preview-image-creators))))))
    (when hook
      (apply (car hook) (append (cdr hook) rest)))))