Function: TeX-kpathsea-detect-path-delimiter
TeX-kpathsea-detect-path-delimiter is a byte-compiled function defined
in tex.el.
Signature
(TeX-kpathsea-detect-path-delimiter)
Documentation
Auto detect the path delimiter for kpsewhich command.
Usually return ":" or ";". If auto detect fails for some reason, return nil.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-kpathsea-detect-path-delimiter ()
"Auto detect the path delimiter for kpsewhich command.
Usually return \":\" or \";\". If auto detect fails for some reason,
return nil."
(let ((res (ignore-errors
(with-output-to-string
(call-process "kpsewhich" nil
(list standard-output nil) nil
"--expand-path" "{.,..}")))))
;; kpsewhich expands "{.,..}" to ".:SOMEDIR" or ".;SOMEDIR"
;; according to its environment.
;; Don't use "{.,.}" instead because kpsewhich of MiKTeX 2.9
;; simplifies it to just a ".", not ".;.".
(and (stringp res) (> (length res) 0)
;; Check whether ; is contained. This should work even if
;; some implementation of kpsewhich considers it sane to
;; insert drive letters or directory separators or whatever
;; else to the current directory.
(if (string-match ";" res) ";" ":"))))