Function: desktop-buffer-preview
desktop-buffer-preview is an autoloaded and byte-compiled function
defined in preview.el.
Signature
(desktop-buffer-preview FILE-NAME BUFFER-NAME MISC)
Documentation
Hook function for restoring persistent previews into a buffer.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/preview.el
;; Add autoload cookies explicitly for desktop.el.
;; <Background> desktop.el assumes the following two:
;; (1) The file associated with the major mode by autoload has defun
;; of handler, which restores the state of the buffer.
;; (2) The file has suitable `add-to-list' form also for
;; `desktop-buffer-mode-handlers' to register the entry of the
;; handler.
;; This isn't the case for preview-latex. Thus we register both of
;; them as autoload cookies in AUCTeX initialzation code.
;;;###autoload
(defun desktop-buffer-preview (file-name _buffer-name misc)
"Hook function for restoring persistent previews into a buffer."
(when (and file-name (file-readable-p file-name))
(let ((buf (find-file-noselect file-name)))
(if (eq (car misc) 'preview)
(with-current-buffer buf
(preview-buffer-restore misc)
buf)
buf))))