summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/env.el5
2 files changed, 5 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b3decbd3dac..b54a3e281af 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/env.el b/lisp/env.el
index f770dd27d75..5f7c61b719a 100644
--- a/lisp/env.el
+++ b/lisp/env.el
@@ -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.