Your IP : 216.73.216.48


Current Path : /usr/X11R6/share/emacs/24.5/lisp/eshell/
Upload File :
Current File : //usr/X11R6/share/emacs/24.5/lisp/eshell/esh-var.elc

;ELC
;;; Compiled
;;; in Emacs version 24.5.1
;;; 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.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\302\303!\210\302\304!\210\302\305!\210\302\306!\210\302\307!\210\302\310!\210\311\312\313\314\315\316\317\320&\210\321\322\323\324\325DD\326\327\330\331\332\317\312&	\210\321\333\323\324\334DD\335\331\336\317\312&\210\321\337\323\324\340DD\341\331\336\317\312&\210\321\342\323\324\343DD\344\331\336\317\312&\210\321\345\323\324\346DD\347\331\350\317\312&\210\321\351\323\324\352DD\353\331\354\317\312&\210\355\351\356\357#\207" [provide esh-var require esh-util esh-cmd esh-opt pcomplete env ring custom-declare-group eshell-var nil "Variable interpolation is introduced whenever the '$' character\nappears unquoted in any argument (except when that argument is\nsurrounded by single quotes).  It may be used to interpolate a\nvariable value, a subcommand, or even the result of a Lisp form." :tag "Variable handling" :group eshell custom-declare-variable eshell-var-load-hook funcall function #[0 "\300\207" [nil] 1 "\n\n(fn)"] "A list of functions to call when loading `eshell-var'." :version "24.1" :type hook eshell-prefer-lisp-variables #[0 "\300\207" [nil] 1 "\n\n(fn)"] "If non-nil, prefer Lisp variables to environment variables." boolean eshell-complete-export-definition #[0 "\300\207" [t] 1 "\n\n(fn)"] "If non-nil, completing names for `export' shows current definition." eshell-modify-global-environment #[0 "\300\207" [nil] 1 "\n\n(fn)"] "If non-nil, using `export' changes Emacs's global environment." eshell-variable-name-regexp #[0 "\300\207" ["[A-Za-z0-9_-]+"] 1 "[A-Za-z0-9_-]+\n\n(fn)"] "A regexp identifying what constitutes a variable name reference.\nNote that this only applies for '$NAME'.  If the syntax '$<NAME>' is\nused, then NAME can contain any character, including angle brackets,\nif they are quoted with a backslash." regexp eshell-variable-aliases-list #[0 "\300\207" [(("COLUMNS" (lambda (indices) (window-width)) t) ("LINES" (lambda (indices) (window-height)) t) ("_" (lambda (indices) (if (not indices) (car (last eshell-last-arguments)) (eshell-apply-indices eshell-last-arguments indices)))) ("?" eshell-last-command-status) ("$" eshell-last-command-result) ("0" eshell-command-name) ("1" (lambda (indices) (nth 0 eshell-command-arguments))) ("2" (lambda (indices) (nth 1 eshell-command-arguments))) ("3" (lambda (indices) (nth 2 eshell-command-arguments))) ("4" (lambda (indices) (nth 3 eshell-command-arguments))) ("5" (lambda (indices) (nth 4 eshell-command-arguments))) ("6" (lambda (indices) (nth 5 eshell-command-arguments))) ("7" (lambda (indices) (nth 6 eshell-command-arguments))) ("8" (lambda (indices) (nth 7 eshell-command-arguments))) ("9" (lambda (indices) (nth 8 eshell-command-arguments))) ("*" (lambda (indices) (if (not indices) eshell-command-arguments (eshell-apply-indices eshell-command-arguments indices)))))] 1 "\n\n(fn)"] "This list provides aliasing for variable references.\nIt is very similar in concept to what `eshell-user-aliases-list' does\nfor commands.  Each member of this defines the name of a command,\nand the Lisp value to return for that variable if it is accessed\nvia the syntax '$NAME'.\n\nIf the value is a function, that function will be called with two\narguments: the list of the indices that was used in the reference, and\nwhether the user is requesting the length of the ultimate element.\nFor example, a reference of '$NAME[10][20]' would result in the\nfunction for alias `NAME' being called (assuming it were aliased to a\nfunction), and the arguments passed to this function would be the list\n'(10 20)', and nil." (repeat (list string sexp (choice (const :tag "Copy to environment" t) (const :tag "Use only in Eshell" nil)))) put risky-local-variable t] 10)
#@44 Initialize the variable handle code.

(fn)
(defalias 'eshell-var-initialize #[0 "\204
\306\301!\210\307\310	\"\311\n\312\313#\210\306\303!\210\314\315\"\306\304!\210\314\f\316\"\317\320\321\322\211$\210\317\323\324\325\322$\210\326\211
>\262\205I\317\327\330\325\322$\210\317\327\331\325\322$\207" [eshell-modify-global-environment process-environment eshell-command-map eshell-special-chars-inside-quoting eshell-special-chars-outside-quoting eshell-modules-list make-local-variable mapcar concat define-key [(meta 118)] eshell-insert-envvar append (36) (36) add-hook eshell-parse-argument-hook eshell-interpolate-variable t eshell-prepare-command-hook eshell-handle-local-variables nil eshell-cmpl pcomplete-try-first-hook eshell-complete-variable-reference eshell-complete-variable-assignment] 5 (#$ . 4095)])
#@56 Allow for the syntax 'VAR=val <command> <args>'.

(fn)
(defalias 'eshell-handle-local-variables #[0 "\204	\203	@	A\202\302\303!	\205i\304\"\205i\305\306\307\310\311C\312C\304		\"\203Y\211\313\314\315\"\314\316\f\"\314\316
\"G\317UFC\244\210\303@!\262A\262\202)\211A\262\320\321	DEC#D\"\207" [eshell-last-command-name eshell-last-arguments "\\`\\([A-Za-z_][A-Za-z0-9_]*\\)=\\(.*\\)\\'" eshell-stringify string-match throw eshell-replace-command eshell-as-subcommand append progn t setenv match-string 1 2 0 eshell-named-command quote] 16 (#$ . 4922)])
#@109 Parse a variable interpolation.
This function is explicit for adding to `eshell-parse-argument-hook'.

(fn)
(defalias 'eshell-interpolate-variable #[0 "\300f\301=\205`TdU?\205\300u\210\302\303 D\207" [nil 36 eshell-escape-arg eshell-parse-variable] 2 (#$ . 5513)])
#@65 Define a VAR-ALIAS using DEFINITION.

(fn VAR-ALIAS DEFINITION)
(defalias 'eshell/define #[514 "\211\204\301\302\"\"\2026\302\"\303G\304U\203!@\202\"DD\2030\301\302\"\"\211B\266\305\207" [eshell-variable-aliases-list delq assoc quote 1 nil] 8 (#$ . 5788)])
#@86 This alias allows the `export' command to act as bash users expect.

(fn &rest SETS)
(defalias 'eshell/export #[128 "\211\205&\211@;\203\300\301@\"\203\302\303\304@\"\303\305@\"\"\210\211A\262\202\207" [string-match "^\\([^=]+\\)=\\(.*\\)" setenv match-string 1 2] 6 (#$ . 6075)])
#@50 Completion function for Eshell's `export'.

(fn)
(defalias 'pcomplete/eshell-mode/export #[0 "\300\301\302\211\211$\205\f\202\207" [pcomplete--here #[0 "\203	\207\302 \207" [eshell-complete-export-definition process-environment eshell-envvar-names] 1 "\n\n(fn)"] nil] 5 (#$ . 6373)])
#@49 Unset an environment variable.

(fn &rest ARGS)
(defalias 'eshell/unset #[128 "\211\205\211@;\203\300@\301\302#\210\211A\262\202\207" [setenv nil t] 5 (#$ . 6669)])
#@49 Completion function for Eshell's `unset'.

(fn)
(defalias 'pcomplete/eshell-mode/unset #[0 "\300\301\302\211\211$\205\f\202\207" [pcomplete--here #[0 "\300 \207" [eshell-envvar-names] 1 "\n\n(fn)"] nil] 5 (#$ . 6848)])
#@51 Allow command-ish use of `setq'.

(fn &rest ARGS)
(defalias 'eshell/setq #[128 "\300\203!\301@!\211A@\262L\262\211AA\262\262\266\202\211\207" [nil intern] 6 (#$ . 7076)])
#@48 Completion function for Eshell's `setq'.

(fn)
(defalias 'pcomplete/eshell-mode/setq #[0 "\300\301\302\211\211$\205\300\303\302\211\211$\205\202\207" [pcomplete--here #[0 "\302	\303#\207" [pcomplete-stub obarray all-completions boundp] 4 "\n\n(fn)"] nil #[0 "\300\207" [nil] 1 "\n\n(fn)"]] 5 (#$ . 7267)])
#@51 Implementation of `env' in Lisp.

(fn &rest ARGS)
(defalias 'eshell/env #[128 "\300 \210\301!\302\303\"\262\304\305\306#\211\307\310 \311\"\211\203)\211@\312\313\"\210A\266\202\202\210\314 \207" [eshell-init-print-buffer eshell-flatten-list mapcar eshell-stringify eshell--do-opts "env" ((104 "help" nil nil "show this usage screen") :external "env" :usage "<no arguments>") sort eshell-environment-variables string-lessp eshell-buffered-print "\n" eshell-flush] 9 (#$ . 7586)])
#@72 Insert ENVVAR-NAME into the current buffer at point.

(fn ENVVAR-NAME)
(defalias 'eshell-insert-envvar #[257 "\300\301\"\207" [insert-and-inherit "$"] 4 (#$ . 8080) (byte-code "\300\301\302\"C\207" [read-envvar-name "Name of environment variable: " t] 3)])
#@92 Return a list of currently visible environment variable names.

(fn &optional ENVIRONMENT)
(defalias 'eshell-envvar-names #[256 "\301\302\206\"\207" [process-environment mapcar #[257 "\211\300\301\302\"O\207" [0 string-match "="] 6 "\n\n(fn X)"]] 4 (#$ . 8344)])
#@175 Return a `process-environment', fully updated.
This involves setting any variable aliases which affect the
environment, as specified in `eshell-variable-aliases-list'.

(fn)
(defalias 'eshell-environment-variables #[0 "\302\303\"	\211\203(\211@\3048\203!\305@\306\307@!\206\310!\"\210A\266\202\202\210)\207" [process-environment eshell-variable-aliases-list mapcar concat 2 setenv eshell-stringify eshell-get-variable ""] 7 (#$ . 8619)])
#@339 Parse the next variable reference at point.
The variable name could refer to either an environment variable, or a
Lisp variable.  The priority order depends on the setting of
`eshell-prefer-lisp-variables'.

Its purpose is to call `eshell-parse-variable-ref', and then to
process any indices that come after the variable reference.

(fn)
(defalias 'eshell-parse-variable #[0 "\300f\301=\205\300u\210\302\300\211\303 \262m?\205\300f\304=\205\305 \262\306\307\310DDCE\262\2036\311D\2027\207" [nil 35 t eshell-parse-variable-ref 91 eshell-parse-indices let indices quote length] 7 (#$ . 9077)])
#@355 Eval a variable reference.
Returns a Lisp form which, if evaluated, will return the value of the
variable.

Possible options are:

  NAME          an environment or Lisp variable value
  <LONG-NAME>   disambiguates the length of the name
  {COMMAND}     result of command is variable's value
  (LISP-FORM)   result of Lisp form is variable's value

(fn)
(defalias 'eshell-parse-variable-ref #[0 "\303f\304=\203'\305\304\306\"\211\204\307\310\304\"\202&\311\312\313\314`TB!DDDTb\210\207\303f\315>\203G\303f\316=\203:\317 \202<\320 \211\205F\321\322!\323E\207\303f\324=\203\224\305\324\325\"\211\204]\307\310\324\"\202\223\326!`T{\327Q\330\331\332\333\334DEDC\335\313\314!D\336\337\340\341\342\343\303\344
DEDDED\333DFETb\210\266\202\207\303f\345=\203\250\346\347\350D\351\347\352\346EDC\217\207\353\354\303f!	\"\203\276\303u\210\321\354`Sf!\323E\207\355\n!\203\317\321\356\357!\323E\357\225b\210\207\360\361!\207" [temporary-file-directory eshell-variable-aliases-list eshell-variable-name-regexp nil 123 eshell-find-delimiter 125 throw eshell-incomplete eshell-convert eshell-command-to-value eshell-as-subcommand eshell-parse-command (39 34) 39 eshell-parse-literal-quote eshell-parse-double-quote eshell-get-variable eval indices 60 62 make-temp-file " > " let eshell-current-handles eshell-create-handles quote overwrite progn ignore nconc eshell-this-command-hook list function lambda delete-file 40 #1=#:err funcall #[0 "\300\301\302\303p!DDD\207" [eshell-command-to-value eshell-lisp-command quote read] 5 "\n\n(fn)"] end-of-file #[257 "\300\301\302\"\207" [throw eshell-incomplete 40] 4 "\n\n(fn IGNORED)"] assoc char-to-string looking-at match-string 0 error "Invalid variable reference"] 16 (#$ . 9692)])
#@51 Parse and return a list of list of indices.

(fn)
(defalias 'eshell-parse-indices #[0 "\301\301f\302=\203.\303\302\304\"\211\204\305\306\302\"\210\202*\301u\210\301\307`\"B\262)\211Tb\210\210\202\211\237\207" [eshell-glob-function nil 91 eshell-find-delimiter 93 throw eshell-incomplete eshell-parse-arguments] 5 (#$ . 11438)])
#@67 Get the value for the variable NAME.

(fn NAME &optional INDICES)
(defalias 'eshell-get-variable #[513 "\303\"\211\203\211\211A@\262\202\203\"\304!\203\"\211!\202d\305;\203R\306!\211\203J\307!\203J	\204E\211\n>\204E\310!\204J\211J\202M\310!\262\202b9\203\\J\202b\311\312\313!\"\"\207" [eshell-variable-aliases-list eshell-prefer-lisp-variables eshell--local-vars assoc functionp eshell-apply-indices intern-soft boundp getenv error "Unknown variable `%s'" eshell-stringify] 9 (#$ . 11782)])
#@748 Apply to VALUE all of the given INDICES, returning the sub-result.
The format of INDICES is:

  ((INT-OR-NAME-OR-OTHER INT-OR-NAME INT-OR-NAME ...)
   ...)

Each member of INDICES represents a level of nesting.  If the first
member of a sublist is not an integer or name, and the value it's
reference is a string, that will be used as the regexp with which is
to divide the string into sub-parts.  The default is whitespace.
Otherwise, each INT-OR-NAME refers to an element of the list value.
Integers imply a direct index, and names, an associate lookup using
`assoc'.

For example, to retrieve the second element of a user's record in
'/etc/passwd', the variable reference would look like:

  ${egrep johnw /etc/passwd}[: 2]

(fn VALUE INDICES)
(defalias 'eshell-apply-indices #[514 "\211\203\201\211@;\203<\301\211@@\262;\2031\302\303\304Q\211@@\262\"\2041\211@@\262\262A\262\305\306\307\"\"\262\210\211G\310W\203M\311\312\313!\"\210\202y\211G\314U\203^\315@\"\262\202y\316C\203t\211\315@\"C\244\210A\262\202`\211A\262\210\210\211A\262\202\207" [eshell-variable-name-regexp nil string-match "^" "$" mapcar eshell-convert split-string 0 error "Invalid array variable index: %s" eshell-stringify 1 eshell-index-value t] 9 (#$ . 12314)])
#@58 Reference VALUE using the given INDEX.

(fn VALUE INDEX)
(defalias 'eshell-index-value #[514 "\211;\203\300\"A\207\301!\203\"\211\302!V\203\303\304!\207\305\"\207<\2036\211GV\2032\303\306!\207\2118\207\307!\203K\211GV\203G\303\310!\207H\207\303\311!\207" [assoc ring-p ring-length error "Index exceeds length of ring" ring-ref "Index exceeds length of list" vectorp "Index exceeds length of vector" "Invalid data type for indexing"] 5 (#$ . 13597)])
#@54 If there is a variable reference, complete it.

(fn)
(defalias 'eshell-complete-variable-reference #[0 "\302\211\303\"`{\266\202\302\304\305\306Q\"\211\262\205#T\302O\307\310\311 \"\207" [eshell-variable-name-regexp pcomplete-stub nil pcomplete-begin string-match "\\$\\(" "\\)?\\'" throw pcomplete-completions eshell-variables-list] 6 (#$ . 14075)])
#@46 Generate list of applicable variables.

(fn)
(defalias 'eshell-variables-list #[0 "\303	\211\203 \211@\304\305P@\"\203\211@B\262A\266\202\202\210\306\307\310\311\312\313 !\"\314\n\315##\316\"\207" [pcomplete-stub eshell-variable-aliases-list obarray nil string-match "^" sort append mapcar #[257 "\300!\211\203\211;\203\301!\203\302P\202\207" [eshell-get-variable file-directory-p "/"] 4 "\n\n(fn VARNAME)"] eshell-envvar-names eshell-environment-variables all-completions boundp string-lessp] 9 (#$ . 14441)])
#@71 If there is a variable assignment, allow completion of entries.

(fn)
(defalias 'eshell-complete-variable-assignment #[0 "\302\211\303\"`{\266\202\302\304\305\306Q\"\205.\307\225\262\304\310\"\203$\311\225\262\302O\312\313\314 \"\207" [eshell-variable-name-regexp pcomplete-stub nil pcomplete-begin string-match "\\`" "=" 0 "\\(:\\)[^:]*\\'" 1 throw pcomplete-completions pcomplete-entries] 6 (#$ . 14983)])