[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/env.el [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/env.el [lexbind] |
Date: |
Tue, 14 Oct 2003 19:51:48 -0400 |
Index: emacs/lisp/env.el
diff -c emacs/lisp/env.el:1.26.4.1 emacs/lisp/env.el:1.26.4.2
*** emacs/lisp/env.el:1.26.4.1 Fri Apr 4 01:20:04 2003
--- emacs/lisp/env.el Tue Oct 14 19:51:00 2003
***************
*** 63,74 ****
`$FOO' where FOO is an environment variable name means to substitute
the value of that variable. The variable name should be terminated
with a character not a letter, digit or underscore; otherwise, enclose
! the entire variable name in braces. Use `$$' to insert a single
! dollar sign."
(let ((start 0))
(while (string-match
(eval-when-compile
! (rx (or (and "$" (submatch (1+ (regexp "[:alnum:]_"))))
(and "${" (submatch (minimal-match (0+ anything))) "}")
"$$")))
string start)
--- 63,76 ----
`$FOO' where FOO is an environment variable name means to substitute
the value of that variable. The variable name should be terminated
with a character not a letter, digit or underscore; otherwise, enclose
! the entire variable name in braces. For instance, in `ab$cd-x',
! `$cd' is treated as an environment variable.
!
! Use `$$' to insert a single dollar sign."
(let ((start 0))
(while (string-match
(eval-when-compile
! (rx (or (and "$" (submatch (1+ (regexp "[[:alnum:]_]"))))
(and "${" (submatch (minimal-match (0+ anything))) "}")
"$$")))
string start)
***************
*** 89,96 ****
(defun setenv (variable &optional value unset substitute-env-vars)
"Set the value of the environment variable named VARIABLE to VALUE.
! VARIABLE should be a string. VALUE is optional; if not provided or is
! `nil', the environment variable VARIABLE will be removed. UNSET
if non-nil means to remove VARIABLE from the environment.
SUBSTITUTE-ENV-VARS, if non-nil, means to substitute environment
variables in VALUE with `substitute-env-vars', where see.
--- 91,98 ----
(defun setenv (variable &optional value unset substitute-env-vars)
"Set the value of the environment variable named VARIABLE to VALUE.
! VARIABLE should be a string. VALUE is optional; if not provided or
! nil, the environment variable VARIABLE will be removed. UNSET
if non-nil means to remove VARIABLE from the environment.
SUBSTITUTE-ENV-VARS, if non-nil, means to substitute environment
variables in VALUE with `substitute-env-vars', where see.
***************
*** 126,132 ****
(memq (coding-system-base locale-coding-system) codings))
(error "Can't encode `%s=%s' with `locale-coding-system'"
variable (or value "")))))
! (if unset
(setq value nil)
(if substitute-env-vars
(setq value (substitute-env-vars value))))
--- 128,134 ----
(memq (coding-system-base locale-coding-system) codings))
(error "Can't encode `%s=%s' with `locale-coding-system'"
variable (or value "")))))
! (if unset
(setq value nil)
(if substitute-env-vars
(setq value (substitute-env-vars value))))
***************
*** 178,181 ****
--- 180,184 ----
(provide 'env)
+ ;;; arch-tag: b7d6a8f7-bc81-46db-8e39-8d721d4ed0b8
;;; env.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/env.el [lexbind],
Miles Bader <=