From 67dd8ad119474d5c403e3410b4465baef2647609 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 8 Nov 2012 20:31:54 -0500 Subject: [PATCH] * lisp/env.el (env--substitute-vars-regexp): Don't use rx (for bootstrap). --- lisp/ChangeLog | 4 ++++ lisp/env.el | 5 +---- 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 + + * 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. -- 2.39.2