Function: ff-list-replace-env-vars
ff-list-replace-env-vars is a byte-compiled function defined in
find-file.el.gz.
Signature
(ff-list-replace-env-vars SEARCH-LIST)
Documentation
Replace environment variables (of the form $VARIABLE) in SEARCH-LIST.
Source Code
;; Defined in /usr/src/emacs/lisp/find-file.el.gz
(defun ff-list-replace-env-vars (search-list)
"Replace environment variables (of the form $VARIABLE) in SEARCH-LIST."
(let (list
(var (car search-list)))
(while search-list
(if (string-match "\\(.*\\)\\$[({]*\\([[:alnum:]_]+\\)[)}]*\\(.*\\)" var)
(setq var
(concat
(match-string 1 var)
(getenv (match-string 2 var))
(match-string 3 var))))
(setq search-list (cdr search-list))
(setq list (cons var list))
(setq var (car search-list)))
(setq search-list (reverse list))))