* lisp/env.el (env--substitute-vars-regexp): Don't use rx (for bootstrap).

This commit is contained in:
Stefan Monnier 2012-11-08 20:31:54 -05:00
parent 53371430cd
commit 67dd8ad119
2 changed files with 5 additions and 4 deletions

View file

@ -1,3 +1,7 @@
2012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
* env.el (env--substitute-vars-regexp): Don't use rx (for bootstrap).
2012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
* files.el (hack-one-local-variable--obsolete): New function.

View file

@ -58,10 +58,7 @@ If it is also not t, RET does not exit if it does non-null completion."
(defvar setenv-history nil)
(defconst env--substitute-vars-regexp
(rx "$"
(or (submatch-n 1 (1+ (regexp "[[:alnum:]_]")))
(and "{" (submatch-n 1 (minimal-match (0+ anything))) "}")
"$")))
"\\$\\(?:\\(?1:[[:alnum:]_]+\\)\\|{\\(?1:[^{}]+\\)}\\|\\$\\)")
(defun substitute-env-vars (string &optional only-defined)
"Substitute environment variables referred to in STRING.