+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.
(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.