mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
* lisp/env.el (env--substitute-vars-regexp): Don't use rx (for bootstrap).
This commit is contained in:
parent
53371430cd
commit
67dd8ad119
2 changed files with 5 additions and 4 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue