?
Current Path : /usr/share/emacs/24.3/lisp/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/env.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:12:50 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/env.el ;;; in Emacs version 24.3 ;;; 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) #@206 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. (defalias 'read-envvar-name #[(prompt &optional mustmatch) "\303\304\305\306 !\"\307\n\307\310&\207" [prompt process-environment mustmatch completing-read mapcar #[(enventry) "\303\304\305\"O\306 !\203 \307 \n\310#\202 )\207" [enventry str locale-coding-system 0 string-match "=" multibyte-string-p decode-coding-string t] 5] append nil read-envvar-name-history] 7 (#$ . 583)]) (defvar setenv-history nil) #@417 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. Use `$$' to insert a single dollar sign. (defalias 'substitute-env-vars #[(string) "\303\304\305 #\203Z \306\224\203+ \307\310\306 \"!\311\n\206 \312\313\211 $\303\224\nG\\)\202 \314\224\203L \307\310\314 \"!\311\n\206= \312\313\211 $\303\224\nG\\)\202 \311\315\313\211 $\303\224T\202 )\207" [start string value 0 string-match "\\$\\([[:alnum:]_]+\\)\\|\\${\\(\\(?:.\\|\n\\)*?\\)}\\|\\$\\$" 1 getenv match-string replace-match "" t 2 "$"] 5 (#$ . 1209)]) #@122 Set VARIABLE to VALUE in ENV, adding empty entries if KEEP-EMPTY. Changes ENV by side-effect, and returns its new value. (defalias 'setenv-internal #[(env variable value keep-empty) "\306\307!\310Q\311 \311\211 \2042 \2042 \2032 @;\2032 \312 @\"\2032 A\202\225 \f\203s \f@;\203s \312 \f@\"\203j \203U \f\313Q\240\210\202f \203a \f\240\210\202f \fA\241\210\314\311\f\fA\211\2046 \n\204\224 \204\201 \203\224 \203\216 \313Q\202\217 B\202\225 -\207" [variable env found prev scan case-fold-search "\\`" regexp-quote "\\(=\\|\\'\\)" nil string-match "=" t pattern value keep-empty] 6 (#$ . 2061)]) #@894 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. (defalias 'setenv #[(variable &optional value substitute-env-vars) "\306!\203* \203* \307\nP!\211@\310=\204) \311 !>\204) \312\313\n\206' \314#\210)\n\2036 \f\2036 \304\n!\306!\203A \315 \"\n\203P \306\n!\203P \315\n \"\316\317\"\203\\ \312\320\"\210\321\230\203f \322\n!\210\323 \n\324$\n\207" [variable locale-coding-system value codings substitute-env-vars process-environment multibyte-string-p find-coding-systems-string undecided coding-system-base error "Can't encode `%s=%s' with `locale-coding-system'" "" encode-coding-string string-match "=" "Environment variable name `%s' contains `='" "TZ" set-time-zone-rule setenv-internal t] 6 (#$ . 2703) (byte-code "\203 \303\304\305\"\306D\207\303\307\306\"\310 !\211\203 \311\312\n\"\210 \313\314\315 \"\306\211\211\312\n&\316E*\207" [current-prefix-arg var value 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] 9)]) #@478 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. (defalias 'getenv #[(variable &optional frame) "\305\306!\203 \307 \"\202 \n\205 \310\311\n!\236\"\f\203' \203' \312 \"\313\314!\203: \315\316\2037 \2028 \317\"\210)\207" [variable locale-coding-system frame value 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"] 5 (#$ . 4623) (list (read-envvar-name "Get environment variable: " t))]) (provide 'env)