Function: preview-ps-quote-filename

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

Signature

(preview-ps-quote-filename STR &optional NONREL)

Documentation

Make a PostScript string from filename STR.

The file name is first made relative unless NONREL is not nil.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/preview.el
(defun preview-ps-quote-filename (str &optional nonrel)
  "Make a PostScript string from filename STR.
The file name is first made relative unless
NONREL is not nil."
  (unless nonrel (setq str (file-relative-name str)))
  (let ((index 0))
    (while (setq index (string-match "[\\()]" str index))
      (setq str (replace-match "\\\\\\&" t nil str)
            index (+ 2 index)))
    (concat "(" str ")")))