?
Current Path : /usr/share/emacs/24.3/lisp/eshell/ |
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/eshell/esh-opt.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:10:55 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/eshell/esh-opt.el ;;; in Emacs version 24.3.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\304\305\306\307\310\311&\207" [provide esh-opt custom-declare-group eshell-opt nil "The options processing code handles command argument parsing for\nEshell commands implemented in Lisp." :tag "Command options processing" :group eshell] 8) #@2558 Process NAME's MACRO-ARGS using a set of command line OPTIONS. After doing so, stores settings in local symbols as declared by OPTIONS; then evaluates BODY-FORMS -- assuming all was OK. OPTIONS is a list, beginning with one or more elements of the form: (SHORT LONG VALUE SYMBOL HELP-STRING) Each of these elements represents a particular command-line switch. SHORT is either nil, or a character that can be used as a switch -SHORT. LONG is either nil, or a string that can be used as a switch --LONG. At least one of SHORT and LONG must be non-nil. VALUE is the value associated with the option. It can be either: t - the option needs a value to be specified after the switch; nil - the option is given the value t; anything else - specifies the actual value for the option. SYMBOL is either nil, or the name of the Lisp symbol that will be bound to VALUE. A nil SYMBOL calls `eshell-show-usage', and so is appropriate for a "--help" type option. HELP-STRING is a documentation string for the option. Any remaining elements of OPTIONS are :KEYWORD arguments. Some take arguments, some do not. The recognized :KEYWORDS are: :external STRING STRING is an external command to run if there are unknown switches. :usage STRING STRING is the initial part of the command's documentation string. It appears before the options are listed. :post-usage STRING STRING is an optional trailing part of the command's documentation string. It appears after the options, but before the final part of the documentation about the associated external command (if there is one). :show-usage If present, then show the usage message if the command is called with no arguments. :preserve-args If present, do not pass MACRO-ARGS through `eshell-flatten-list' and `eshell-stringify-list'. For example, OPTIONS might look like: '((?C nil nil multi-column "multi-column display") (nil "help" nil nil "show this usage display") (?r "reverse" nil reverse-list "reverse order while sorting") :external "ls" :usage "[OPTION]... [FILE]... List information about the FILEs (the current directory by default). Sort entries alphabetically across.") `eshell-eval-using-options' returns the value of the last form in BODY-FORMS. If instead an external command is run (because of an unknown option), the tag `eshell-external' will be thrown with the new process for its value. Lastly, any remaining arguments will be available in a locally interned variable `args' (created using a `let' form). (defalias 'eshell-eval-using-options '(macro . #[(name macro-args options &rest body-forms) "\305\306\307\211A@)>\203 \n\202 \310\311\nDDDC\305\312\313\314\315\316\211A@)\"\"\317\"\320\321\314\fBBFEE\207" [options x macro-args name body-forms let temp-args :preserve-args eshell-stringify-list eshell-flatten-list append delq nil mapcar #[(opt) "<\205 \3018\207" [opt 3] 2] (usage-msg last-value ext-command args) eshell-do-opt lambda] 11 (#$ . 834)])) (put 'eshell-eval-using-options 'edebug-form-spec '(form form sexp body)) #@113 Helper function for `eshell-eval-using-options'. This code doesn't really need to be macro expanded everywhere. (defalias 'eshell-do-opt #[(name options body-fun) "\304\305\215\211\203 \306\307\310\n \"\"\207\207" [temp-args args ext-command last-value eshell-ext-command (byte-code "\301\302\215\211\205\f \303\304\"\207" [usage-msg eshell-usage (byte-code "\305 G\306U\203 \307\n>\203 \310\311\312\n\"\"\210\313 \n#\f \305\207" [last-value args options name body-fun nil 0 :show-usage throw eshell-usage eshell-show-usage eshell-process-args] 5) error "%s"] 3) throw eshell-external eshell-external-command] 5 (#$ . 3936)]) #@52 Display the usage message for NAME, using OPTIONS. (defalias 'eshell-show-usage #[(name options) "\306\307\310 >\211A@)#\311 >\312 >\313 \203\220 @<\203\211 @\314@\203N A@\203N \306\315\306\316@A@#\3178#P\202\210 @\203i \306\315\306\320@\"\3178#P\202\210 A@\203\206 \306\315\306\321A@\"\3178#P\202\210 \313) A\211\204 \f\203\244 \205\233 \322\f\211A@)Q \203\276 \323 \211A@)!\211\203\276 \306\324 \"P\325\326\",\207" [name options x had-option post-usage extcmd format "usage: %s %s\n\n" :usage :external :post-usage nil t " %-20s %s\n" "-%c, --%s" 4 "-%c" " --%s" "\n" eshell-search-path "\nThis command is implemented in Lisp. If an unrecognized option is\npassed to this command, the external version '%s'\nwill be called instead." throw eshell-usage usage opt] 8 (#$ . 4582)]) #@155 Using NAME's remaining args (index AI), set the OPT within OPTIONS. If the option consumes an argument for its value, the argument list will be modified. (defalias 'eshell-set-option #[(name ai opt options) "\3058\204 \306 \n\"\207\3078\310=\203<