/[emacs]/emacs/lisp/env.el
ViewVC logotype

Diff of /emacs/lisp/env.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.26 by gerd, Mon Oct 29 09:10:48 2001 UTC revision 1.27 by lektu, Tue Feb 4 11:16:21 2003 UTC
# Line 55  If it is also not t, RET does not exit i Line 55  If it is also not t, RET does not exit i
55  `$FOO' where FOO is an environment variable name means to substitute  `$FOO' where FOO is an environment variable name means to substitute
56  the value of that variable.  The variable name should be terminated  the value of that variable.  The variable name should be terminated
57  with a character not a letter, digit or underscore; otherwise, enclose  with a character not a letter, digit or underscore; otherwise, enclose
58  the entire variable name in braces.  Use `$$' to insert a single  the entire variable name in braces.  Use `$$' to insert a single
59  dollar sign."  dollar sign."
60    (let ((start 0))    (let ((start 0))
61      (while (string-match      (while (string-match
62              (rx (or (and "$" (submatch (1+ (in "a-zA-Z0-9_"))))              (rx (or (and "$" (submatch (1+ (in "a-zA-Z0-9_"))))
63                      (and "${" (submatch (minimal-match (0+ anything))) "}")                      (and "${" (submatch (minimal-match (0+ anything))) "}")
64                      "$$"))                      "$$"))
# Line 101  This function works by modifying `proces Line 101  This function works by modifying `proces
101         (when value         (when value
102           (push value setenv-history))           (push value setenv-history))
103         ;; Here finally we specify the args to give call setenv with.         ;; Here finally we specify the args to give call setenv with.
104         (list var         (list var
105               (read-from-minibuffer (format "Set %s to value: " var)               (read-from-minibuffer (format "Set %s to value: " var)
106                                     nil nil nil 'setenv-history                                     nil nil nil 'setenv-history
107                                     value)                                     value)
108               nil               nil
109               t))))               t))))
110    (if unset    (if unset
111        (setq value nil)        (setq value nil)
112      (if substitute-env-vars      (if substitute-env-vars
113          (setq value (substitute-env-vars value))))          (setq value (substitute-env-vars value))))

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26