Function: preview-make-filename

preview-make-filename is a byte-compiled function defined in preview.el.

Signature

(preview-make-filename FILE TEMPDIR)

Documentation

Generate a preview filename from FILE and TEMPDIR.

Filenames consist of a CONS-cell with absolute file name as CAR and TEMPDIR as CDR. TEMPDIR is a copy of TeX-active-tempdir with the directory name, the reference count and its top directory name elements. If FILE is already in that form, the file name itself gets converted into a CONS-cell with a name and a reference count.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/preview.el
(defun preview-make-filename (file tempdir)
  "Generate a preview filename from FILE and TEMPDIR.
Filenames consist of a CONS-cell with absolute file name as CAR
and TEMPDIR as CDR.  TEMPDIR is a copy of `TeX-active-tempdir'
with the directory name, the reference count and its top directory
name elements.  If FILE is already in that form, the file name itself
gets converted into a CONS-cell with a name and a reference count."
  (if (consp file)
      (progn
        (if (consp (car file))
            (setcdr (car file) (1+ (cdr (car file))))
          (setcar file (cons (car file) 1)))
        file)
    (setcar (nthcdr 2 tempdir) (1+ (nth 2 tempdir)))
    (cons (expand-file-name file (nth 0 tempdir))
          tempdir)))