;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:20:45 2007 ;;; from file /home/cyd/emacs/lisp/env.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`env.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list read-envvar-name-history default-boundp set-default nil] 3) #@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\n\306\307&\207" [prompt process-environment mustmatch completing-read mapcar #[(enventry) "\203\303 \304\305\306 \"O\n\307#\202 \304\305\306 \"OC\207" [enable-multibyte-characters enventry locale-coding-system decode-coding-string 0 string-match "=" t] 6] nil read-envvar-name-history] 7 (#$ . 695)]) (byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list setenv-history default-boundp set-default nil] 3) #@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 (#$ . 1426)]) #@869 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. Interactively, the current value (if any) of the variable appears at the front of the history list when you type in the new value. Interactively, always replace environment variables in the new value. 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\202\302\321\322\317P!P\323 \323\324\230\203{\325\n!\210\203\261\316@\"\203\250\326\n\323=\203\235\327@ \"\202\245\317\nQ\240\210\323A\211\204\200\204\301\n\203\301\317\nQ B,\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 `='" "\\`" regexp-quote nil "TZ" set-time-zone-rule t delq found scan case-fold-search pattern] 5 (#$ . 2310) (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)]) #@242 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. This function consults the variable `process-environment' for its value. (defalias 'getenv #[(variable) "\304\305!\203\306 \"\202! \203\n\203\307\n \"t\203/\310\311\n\203,\n\202-\312\"\210\n)\207" [variable locale-coding-system value enable-multibyte-characters getenv-internal multibyte-string-p encode-coding-string decode-coding-string message "%s" "Not set"] 4 (#$ . 4429) (list (read-envvar-name "Get environment variable: " t))]) (provide 'env)