;ELC   
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.



(defvar read-envvar-name-history nil)
#@239 Read environment variable name, prompting with PROMPT.
Optional second arg MUSTMATCH, if non-nil, means require existing envvar name.
If it is also not t, RET does not exit if it does non-null completion.

(fn PROMPT &optional MUSTMATCH)
(defalias 'read-envvar-name #[513 "\301\302\303\304!\"\305\305\306&\207" [process-environment completing-read mapcar #[257 "\211\301\302\303\"O\304!\203 \305\306#\207\207" [locale-coding-system 0 string-search "=" multibyte-string-p decode-coding-string t] 6 "\n\n(fn ENVENTRY)"] append nil read-envvar-name-history] 9 (#$ . 123)])
(defvar setenv-history nil)
(defconst env--substitute-vars-regexp "\\$\\(?:\\(?1:[[:alnum:]_]+\\)\\|{\\(?1:[^{}]+\\)}\\|\\$\\)")
#@829 Substitute environment variables referred to in STRING.
`$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.

If WHEN-UNDEFINED is omitted or nil, references to undefined environment
variables are replaced by the empty string; if it is a function, the
function is called with the variable's name as argument, and should return
the text with which to replace it, or nil to leave it unchanged.
If it is non-nil and not a function, references to undefined variables are
left unchanged.

Use `$$' to insert a single dollar sign.

(fn STRING &optional WHEN-UNDEFINED)
(defalias 'substitute-env-vars #[513 "\301\302#\203\\ \303\224\203K \304\303\"\305!\211\2044 \306!\203) !\211\262?\202* \2034 \301\225\266\203\202 \307\206: \310\311\211$\262\301\224G\\\266\203\202 \307\312\311\211$\262\301\224T\262\202 \207" [env--substitute-vars-regexp 0 string-match 1 match-string getenv functionp replace-match "" t "$"] 10 (#$ . 838)])
#@17 

(fn FILENAME)
(defalias 'substitute-env-in-file-name #[257 "\301\302>\203\f \303\202 \304\"\207" [system-type substitute-env-vars (windows-nt ms-dos) #[257 "\300\226!\207" [getenv] 3 "\n\n(fn VAR)"] t] 5 (#$ . 2054)])
#@158 Set VARIABLE to VALUE in ENV, adding empty entries if KEEP-EMPTY.
Changes ENV by side-effect, and returns its new value.

(fn ENV VARIABLE VALUE KEEP-EMPTY)
(defalias 'setenv-internal #[1028 "\302\303!\304Q\305\305\211\2049 \2049 \2039 @;\2039 	@\305\306\307#)\266\203\2039 A\202\253 \203\206 @;\203\206 @\305\306\307#)\266\203\203| \203e \310	Q\240\210\202v \203q \240\210\202v A\241\210\306\262\305\262\262A\262\2029 \211\204\251 \204\223 \203\251 \203\241 \310Q\202\243 	B\202\253 )\207" [case-fold-search inhibit-changing-match-data "\\`" regexp-quote "\\(=\\|\\'\\)" nil t string-match "="] 16 (#$ . 2285)])
#@945 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.

Interactively, a prefix argument means to unset the variable, and
otherwise the current value (if any) of the variable appears at
the front of the history list when you type in the new value.
This function always replaces environment variables in the new
value when called interactively.

SUBSTITUTE-ENV-VARS, if non-nil, means to substitute environment
variables in VALUE with `substitute-env-vars', which see.
This is normally used only for interactive calls.

The return value is the new value of VARIABLE, or nil if
it was removed from the environment.

This function works by modifying `process-environment'.

As a special case, setting variable `TZ' calls `set-time-zone-rule' as
a side-effect.

(fn VARIABLE &optional VALUE SUBSTITUTE-ENV-VARS)
(defalias 'setenv #[769 "\302!\203) \203) \303P!\211@\304=\204( \305!>\204( \306\307\206& \310#\210\210\2036 \211\2036 \311!\262\302!\203B \312\"\262\203R \302!\203R \312\"\262\313\314\"\203^ \306\315\"\210\316\230\203h \317!\210\320	\321$\207" [locale-coding-system process-environment multibyte-string-p find-coding-systems-string undecided coding-system-base error "Can't encode `%s=%s' with `locale-coding-system'" "" substitute-env-vars encode-coding-string string-search "=" "Environment variable name `%s' contains `='" "TZ" set-time-zone-rule setenv-internal t] 8 (#$ . 2964) (byte-code "\203 \301\302\303\"\304D\207\301\305\304\"\306!\211\203 \307\310\"\210\311\312\313\"\304\211\211\310&\314E\207" [current-prefix-arg read-envvar-name "Clear environment variable: " exact nil "Set environment variable: " getenv add-to-history setenv-history read-from-minibuffer format "Set %s to value: " t] 10)])
#@510 Get the value of environment variable VARIABLE.
VARIABLE should be a string.  Value is nil if VARIABLE is undefined in
the environment.  Otherwise, value is a string.

If optional parameter FRAME is non-nil, then it should be a
frame.  This function will look up VARIABLE in its `environment'
parameter.

Otherwise, this function searches `process-environment' for
VARIABLE.  If it is not found there, then it continues the search
in the environment list of the selected frame.

(fn VARIABLE &optional FRAME)
(defalias 'getenv #[513 "\302\303!\203 \304\"\202 \205 \305\306!\236\"	\203' \211\203' \307\"\262\310\311!\203: \312\313\2037 \2028 \314\"\210\207" [locale-coding-system enable-multibyte-characters getenv-internal multibyte-string-p encode-coding-string environment frame-parameters decode-coding-string called-interactively-p interactive message "%s" "Not set"] 7 (#$ . 4862) (byte-code "\300\301\302\"C\207" [read-envvar-name "Get environment variable: " t] 3)])
#@286 Set VARIABLES in the environment and execute BODY.
VARIABLES is a list of variable settings of the form (VAR VALUE),
where VAR is the name of the variable (a string) and VALUE
is its value (also a string).

The previous values will be be restored upon exit.

(fn VARIABLES &rest BODY)
(defalias 'with-environment-variables '(macro . #[385 ":\204\n \300\301\"\210\302\303\304\305\306\"\"BB\207" [error "Invalid VARIABLES: %s" let ((process-environment (copy-sequence process-environment))) append mapcar #[257 "\300@A@E\207" [setenv] 4 "\n\n(fn ELEM)"]] 8 (#$ . 5857)]))
(byte-code "\300\301\302\303#\304\301\305\306#\210\307\310!\207" [function-put with-environment-variables lisp-indent-function 1 put edebug-form-spec (sexp body) provide env] 5)
