%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/ |
Current File : //usr/local/share/emacs/27.2/lisp/env.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (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 "\301\302\303\304\"#\305!\203 \306\307#\202 \211\207" [locale-coding-system substring 0 string-match "=" multibyte-string-p decode-coding-string t] 7 "\n\n(fn ENVENTRY)"] append nil read-envvar-name-history] 9 (#$ . 447)]) (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\203M \304\303\"\305!\211\2044 \306!\203) !\211\262?\202* \2034 \301\225\262\202H \307\206: \310\311\211$\262\301\224G\\\262\266\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 (#$ . 1178)]) #@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 (#$ . 2393)]) #@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\262A\262\2029 \211\204\251 \204\223 \203\251 \203\241 \310Q\202\243 B\202\253 )\207" [case-fold-search inhibit-changing-match-data "\\`" regexp-quote "\\(=\\|\\'\\)" nil t string-match "="] 16 (#$ . 2624)]) #@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 "\303!\203) \203) \304P!\211@\305=\204( \306!>\204( \307\310\206&