Function: TeX-parse-path
TeX-parse-path is a byte-compiled function defined in tex.el.
Signature
(TeX-parse-path ENV)
Documentation
Return a list if private TeX directories found in environment variable ENV.
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-parse-path (env)
"Return a list if private TeX directories found in environment variable ENV."
(let* ((value (getenv env))
(entries (and value
(split-string
value
(if (string-match ";" value) ";" ":"))))
(global (append '("/" "\\")
(mapcar #'file-name-as-directory
TeX-macro-global)))
entry
answers)
(while entries
(setq entry (car entries))
(setq entries (cdr entries))
(setq entry (file-name-as-directory
(if (string-match "/?/?\\'" entry)
(substring entry 0 (match-beginning 0))
entry)))
(or (not (file-name-absolute-p entry))
(member entry global)
(setq answers (cons entry answers))))
answers))