From: Stefan Monnier Date: Fri, 9 Nov 2012 01:31:54 +0000 (-0500) Subject: * lisp/env.el (env--substitute-vars-regexp): Don't use rx (for bootstrap). X-Git-Tag: emacs-24.3.90~173^2~18^2~153 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=67dd8ad119474d5c403e3410b4465baef2647609;p=emacs.git * lisp/env.el (env--substitute-vars-regexp): Don't use rx (for bootstrap). --- 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 + + * env.el (env--substitute-vars-regexp): Don't use rx (for bootstrap). + 2012-11-08 Stefan Monnier * 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.