Function: reftex-expand-path
reftex-expand-path is a byte-compiled function defined in
reftex.el.gz.
Signature
(reftex-expand-path PATH &optional DEFAULT-DIR)
Documentation
Expand parts of path ending in // recursively into directory list.
Relative recursive path elements are expanded relative to DEFAULT-DIR.
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/reftex.el.gz
(defun reftex-expand-path (path &optional default-dir)
"Expand parts of path ending in `//' recursively into directory list.
Relative recursive path elements are expanded relative to DEFAULT-DIR."
(let (path1 dir recursive)
(while (setq dir (pop path))
(if (setq recursive (string= (substring dir -2) "//"))
(setq dir (substring dir 0 -1)))
(if (and recursive
(not (file-name-absolute-p dir)))
(setq dir (expand-file-name dir default-dir)))
(if recursive
;; Expand recursively
(setq path1 (append (reftex-recursive-directory-list dir) path1))
;; Keep unchanged
(push dir path1)))
(nreverse path1)))