Function: preview-install-styles
preview-install-styles is an autoloaded, interactive and byte-compiled
function defined in preview.el.
Signature
(preview-install-styles DIR &optional FORCE-OVERWRITE FORCE-SAVE)
Documentation
Install the TeX style files into a permanent location DIR.
This must be in the TeX search path. If FORCE-OVERWRITE is greater than 1, files will get overwritten without query, if it is less than 1 or nil, the operation will fail. The default of 1 for interactive use will query.
Similarly FORCE-SAVE can be used for saving
preview-TeX-style-dir to record the fact that the uninstalled
files are no longer needed in the search path.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/preview.el
;;;###autoload
(defun preview-install-styles (dir &optional force-overwrite
force-save)
"Install the TeX style files into a permanent location DIR.
This must be in the TeX search path. If FORCE-OVERWRITE is greater
than 1, files will get overwritten without query, if it is less
than 1 or nil, the operation will fail. The default of 1 for interactive
use will query.
Similarly FORCE-SAVE can be used for saving
`preview-TeX-style-dir' to record the fact that the uninstalled
files are no longer needed in the search path."
(interactive "DPermanent location for preview TeX styles
pp")
(unless preview-TeX-style-dir
(error "Styles are already installed"))
(dolist (file (or
(condition-case nil
(directory-files
(progn
(string-match
"\\`\\(\\.[:;]\\)?\\(.*?\\)\\([:;]\\)?\\'"
preview-TeX-style-dir)
(match-string 2 preview-TeX-style-dir))
t "\\.\\(sty\\|def\\|cfg\\)\\'")
(error nil))
(error "Can't find files to install")))
(copy-file file dir (cond ((eq force-overwrite 1) 1)
((numberp force-overwrite)
(> force-overwrite 1))
(t force-overwrite))))
(if (cond ((eq force-save 1)
(y-or-n-p "Stop using non-installed styles permanently? "))
((numberp force-save)
(> force-save 1))
(t force-save))
(customize-save-variable 'preview-TeX-style-dir nil)
(customize-set-variable 'preview-TeX-style-dir nil)))