;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:21:11 2007 ;;; from file /home/cyd/emacs/lisp/term.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 "`term.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\301B\302\303!\210\304\305!\210\304\306!\210\307\310\311\312\313\314\313\315&\207" [current-load-list term-protocol-version (lambda (#1=#:defconst-tmp-var) (defconst term-protocol-version #1#)) "0.96" require ring ehelp custom-declare-group term nil "General command interpreter in a window." :group processes unix] 8) #@29 Size of input history ring. (defvar term-input-ring-size 32 (#$ . 889)) (byte-code "\301B\302\301!\204\303\301\304\"\210\305B\302\305!\204\303\305\306\"\210\307B\302\307!\204-\303\307\306\"\210\310B\302\310!\204<\303\310\306\"\210\311B\302\311!\204K\303\311\304\"\210\312B\302\312!\204Z\303\312\306\"\210\313B\302\313!\204i\303\313\304\"\210\314B\302\314!\204x\303\314\315\"\210\316B\302\316!\204\207\303\316\306\"\210\317B\302\317!\204\226\303\317\304\"\210\320B\302\320!\204\245\303\320\304\"\210\321B\302\321!\204\264\303\321\304\"\210\322B\302\322!\204\303\303\322\304\"\210\323B\302\323!\204\322\303\323\304\"\210\324B\302\324!\204\341\303\324\304\"\210\304\207" [current-load-list term-saved-home-marker default-boundp set-default nil term-start-line-column 0 term-current-column term-current-row term-insert-mode term-terminal-state term-kill-echo-list term-current-face default term-scroll-start term-pager-count term-saved-cursor term-log-buffer term-scroll-with-delete term-old-mode-map term-pager-old-local-map] 3) #@75 *If non-nil, is file name to use for explicitly requested inferior shell. (custom-declare-variable 'explicit-shell-file-name 'nil '(#$ . -1968) :type '(choice (const nil) file) :group 'term) #@371 Regexp to recognize prompts in the inferior process. Defaults to "^", the null string at BOL. Good choices: Canonical Lisp: "^[^> \n]*>+:? *" (Lucid, franz, kcl, T, cscheme, oaklisp) Lucid Common Lisp: "^\\(>\\|\\(->\\)+\\) *" franz: "^\\(->\\|<[0-9]*>:\\) *" kcl: "^>+ *" shell: "^[^#$%>\n]*[#$%>] *" T: "^>+ *" This is a good thing to set in mode hooks. (defvar term-prompt-regexp "^" (#$ . 2166)) #@381 List of characters to recognize as separate arguments in input. Strings comprising a character in this list will separate the arguments surrounding them, and also be regarded as arguments in their own right (unlike whitespace). See `term-arguments'. Defaults to the empty list. For shells, a good value is (?\| ?& ?< ?> ?\( ?\) ?\;). This is a good thing to set in mode hooks. (defvar term-delimiter-argument-list nil (#$ . 2587)) #@394 *If non-nil, expand input command history references on completion. This mirrors the optional behavior of tcsh (its autoexpand and histlit). If the value is `input', then the expansion is seen on input. If the value is `history', then the expansion is only when inserting into the buffer's input ring. See also `term-magic-space' and `term-dynamic-complete'. This variable is buffer-local. (custom-declare-variable 'term-input-autoexpand 'nil '(#$ . -3028) :type '(choice (const nil) (const t) (const input) (const history)) :group 'term) #@143 *If non-nil, don't add input matching the last on the input ring. This mirrors the optional behavior of bash. This variable is buffer-local. (custom-declare-variable 'term-input-ignoredups 'nil '(#$ . -3577) :type 'boolean :group 'term) #@195 *If non-nil, name of the file to read/write input history. See also `term-read-input-ring' and `term-write-input-ring'. This variable is buffer-local, and is a good thing to set in mode hooks. (custom-declare-variable 'term-input-ring-file-name 'nil '(#$ . -3822) :type 'boolean :group 'term) #@352 *Controls whether interpreter output causes window to scroll. If nil, then do not scroll. If t or `all', scroll all windows showing buffer. If `this', scroll only the selected window. If `others', scroll only those that are not the selected window. The default is nil. See variable `term-scroll-show-maximum-output'. This variable is buffer-local. (custom-declare-variable 'term-scroll-to-bottom-on-output 'nil '(#$ . -4123) :type 'boolean :group 'term) #@209 *Controls how interpreter output causes window to scroll. If non-nil, then show the maximum output when the window is scrolled. See variable `term-scroll-to-bottom-on-output'. This variable is buffer-local. (custom-declare-variable 'term-scroll-show-maximum-output 'nil '(#$ . -4587) :type 'boolean :group 'term) (byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list term-pending-frame default-boundp set-default nil] 3) #@312 Function that submits old text in term mode. This function is called when return is typed while the point is in old text. It returns the text to be submitted as process input. The default is `term-get-old-input-default', which grabs the current line, and strips off leading text matching `term-prompt-regexp'. (defvar term-get-old-input 'term-get-old-input-default (#$ . 5043)) #@188 List of functions called to perform completion. Functions should return non-nil if completion was performed. See also `term-dynamic-complete'. This is a good thing to set in mode hooks. (defvar term-dynamic-complete-functions '(term-replace-by-expanded-history term-dynamic-complete-filename) (#$ . 5429)) #@190 Predicate for filtering additions to input history. Only inputs answering true to this function are saved on the input history list. Default is to save anything that isn't all whitespace. (defvar term-input-filter #[(str) "\301\302\"?\207" [str string-match "\\`\\s *\\'"] 3] (#$ . 5743)) #@160 Functions to call before input is sent to the process. These functions get one argument, a string containing the text to send. This variable is buffer-local. (defvar term-input-filter-functions nil (#$ . 6041)) #@295 Function to actually send to PROCESS the STRING submitted by user. Usually this is just `term-simple-send', but if your mode needs to massage the input string, this is your hook. This is called from the user command `term-send-input'. `term-simple-send' just sends the string plus a newline. (defvar term-input-sender 'term-simple-send (#$ . 6260)) #@87 *Non-nil means go to the end of the line before sending input. See `term-send-input'. (custom-declare-variable 'term-eol-on-send 't '(#$ . -6617) :type 'boolean :group 'term) #@81 Called upon entry into term mode. This is run before the process is cranked up. (custom-declare-variable 'term-mode-hook ''nil '(#$ . 6798) :type 'hook :group 'term) #@318 Called each time a process is exec'd by `term-exec'. This is called after the process is cranked up. It is useful for things that must be done each time a process is executed in a term mode buffer (e.g., `process-kill-without-query'). In contrast, `term-mode-hook' is only executed once when the buffer is created. (custom-declare-variable 'term-exec-hook ''nil '(#$ . 6971) :type 'hook :group 'term) (byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list term-mode-map default-boundp set-default nil] 3) #@71 Keyboard map for sending characters directly to the inferior process. (defvar term-raw-map nil (#$ . 7510)) #@113 Escape character for char sub-mode of term mode. Do not change it directly; use `term-set-escape-char' instead. (defvar term-escape-char nil (#$ . 7625)) (byte-code "\301B\302\301!\204\303\301\304\"\210\305B\302\305!\204\303\305\304\"\210\304\207" [current-load-list term-raw-escape-map default-boundp set-default nil term-pager-break-map] 3) #@123 True if communications via pty; false if by pipe. Buffer local. This is to work around a bug in Emacs process signaling. (defvar term-ptyp t (#$ . 7983)) #@95 Last string searched for by term input history search, for defaulting. Buffer local variable. (defvar term-last-input-match "" (#$ . 8144)) (byte-code "\301B\302\301!\204\303\301\304\"\210\304\207" [current-load-list term-input-ring default-boundp set-default nil] 3) #@40 Index of last matched history element. (defvar term-input-ring-index nil (#$ . 8422)) #@47 Input previously used to match input history. (defvar term-matching-input-from-input-string "" (#$ . 8514)) (byte-code "\301B\302\301!\204\303\301\304\"\210\305\306\307\310#\210\305\311\312\304#\210\305\313\312\304#\210\305\310\312\304#\210\305\314\312\304#\210\305\315\312\304#\210\305\316\312\304#\210\305\317\312\304#\207" [current-load-list term-pager-filter default-boundp set-default t put term-replace-by-expanded-history menu-enable term-input-autoexpand term-input-ring permanent-local term-input-ring-index term-input-filter-functions term-scroll-to-bottom-on-output term-scroll-show-maximum-output term-ptyp] 4) (defalias 'term-in-char-mode '(macro . #[nil "\300\207" [(eq (current-local-map) term-raw-map)] 1])) (defalias 'term-in-line-mode '(macro . #[nil "\300\207" [(not (term-in-char-mode))] 1])) (defalias 'term-pager-enabled '(macro . #[nil "\300\207" [term-pager-count] 1])) (defalias 'term-handling-pager '(macro . #[nil "\300\207" [term-pager-old-local-map] 1])) (defalias 'term-using-alternate-sub-buffer '(macro . #[nil "\300\207" [term-saved-home-marker] 1])) (byte-code "\301B\302\301!\204\303\301\304\"\210\305B\302\305!\204\303\305\304\"\210\306B\302\306!\204-\303\306\304\"\210\307B\302\307!\204<\303\307\304\"\210\310B\302\310!\204K\303\310\304\"\210\311B\302\311!\204Z\303\311\304\"\210\312B\302\312!\204i\303\312\304\"\210\313B\302\313!\204x\303\313\304\"\210\314B\302\314!\204\207\303\314\315\"\210\316B\302\316!\204\226\303\316\304\"\210\317B\302\317!\204\245\303\317\315\"\210\320B\302\320!\204\264\303\320\304\"\210\321B\302\321!\204\303\303\321\304\"\210\322B\302\322!\204\322\303\322\304\"\210\323B\302\323!\204\341\303\323\315\"\210\324B\302\324!\204\360\303\324\325\"\210\326B\302\326!\204\377\303\326\325\"\210\327B\302\327!\204\303\327\325\"\210\304\207" [current-load-list term-ansi-at-host default-boundp set-default nil term-ansi-at-dir term-ansi-at-user term-ansi-at-message term-ansi-at-save-user term-ansi-at-save-pwd term-ansi-at-save-anon term-ansi-current-bold term-ansi-current-color 0 term-ansi-face-already-done term-ansi-current-bg-color term-ansi-current-underline term-ansi-current-reverse term-ansi-current-invisible term-terminal-more-parameters term-terminal-previous-parameter-2 -1 term-terminal-previous-parameter-3 term-terminal-previous-parameter-4] 3) #@41 Default color for foreground in `term'. (custom-declare-variable 'term-default-fg-color ''unspecified '(#$ . 10897) :group 'term :type 'string) #@41 Default color for background in `term'. (custom-declare-variable 'term-default-bg-color ''unspecified '(#$ . 11047) :group 'term :type 'string) (byte-code "\301B\302\301!\204\303\301\304\"\210\301\207" [current-load-list ansi-term-color-vector default-boundp set-default [unspecified "black" "red3" "green3" "yellow3" "blue2" "magenta3" "cyan3" "white"]] 3) #@213 *The maximum size in lines for term buffers. Term buffers are truncated from the top to be no greater than this number. Notice that a setting of 0 means "don't truncate anything". This variable is buffer-local. (defvar term-buffer-maximum-size 2048 (#$ . -11416)) (byte-code "\204\243\306 \307\310\311#\210\307\312\313#\210\307\314\315#\210\307\316\317#\210\307\320\321#\210\307\322\323#\210\307\324\325#\210\307\326\327#\210\307\330\331#\210\307\332\333#\210\307\334\335#\210\307\336\337#\210\307\340\341#\210\307\342\343#\210\307\344\345#\210\307\346\347#\210\307\350\351#\210\307\352\325#\210\307\353\354#\210\307\355\356#\210\307\357\360#\210\307\361\362#\210\307\363\364#\210\307\365\366#\210\307\367\370#\210\307\371\372#\210\373\306\374!\307 \375\376#\210\307 \377\201A#\210\307 \201B\201C#\210\307 \201D\201E#\210\374 B\304 B\201F\304!\204\346\201G\304\306\201H!\"\210\307\201I\201H\fB#\210\307\f\201J\201K#\210\307\f\201L\201M#\210\307\f\201N\201O#\210\307\f\201P\201Q#\210\305 B\201F\305!\2041\201G\305\306\201R!\"\210\307\201S\201R B#\210\307 \201T\201U#\210\307 \201V\201W#\210\307 \201X\201Y#\210\307 \201Z\201[#\210\307 \201\\\201]#\210\307 \201^\201_#\210\307 \201`\201a#\210\307 \201b\201c#\210\307 \201d\201e#\210\307 \201f\201g#\210\307 \201h\201i#\210\307 \201j\201k#\210\307 \201l\201m#\210\307 \201n\201o#\210\307 \201p\201q#\210\307 \201r\201s#\210\307 \201t\201u#\210\306\201v!\307 \201w\201x#\210\307 \201y\201z#\210\307 \201{\201|#\210\307 \201}\201~#\210\307 \201\201\200#\210\307 \201\201\201\202#\210\307\201\203\201v B\211@#\210)\373\207" [term-mode-map newmap term-terminal-menu current-load-list term-completion-menu term-inout-menu make-sparse-keymap define-key "p" term-previous-input "n" term-next-input "r" term-previous-matching-input "s" term-next-matching-input [138412146] term-previous-matching-input-from-input [138412147] term-next-matching-input-from-input "\f" term-show-output " " term-send-input "" term-delchar-or-maybe-eof "" term-bol "" term-kill-input "" backward-kill-word "" term-interrupt-subjob "" term-stop-subjob "" term-quit-subjob " " term-copy-old-input "" term-kill-output "" "" term-show-maximum-output "\f" term-dynamic-list-input-ring "" term-next-prompt "" term-previous-prompt "" term-send-eof " " term-char-mode "\n" term-line-mode "" term-pager-toggle nil "Terminal" [terminal-pager-enable] ("Enable paging" . term-fake-pager-enable) [terminal-pager-disable] term-signals-menu ("Disable paging" . term-fake-pager-disable) [terminal-char-mode] ("Character mode" . term-char-mode) [terminal-line-mode] ("Line mode" . term-line-mode) default-boundp set-default "Complete" [menu-bar completion] [complete-expand] ("Expand File Name" . term-replace-by-expanded-filename) [complete-listing] ("File Completion Listing" . term-dynamic-list-filename-completions) [menu-bar completion complete-file] ("Complete File Name" . term-dynamic-complete-filename) [menu-bar completion complete] ("Complete Before Point" . term-dynamic-complete) "In/Out" [menu-bar inout] [kill-output] ("Kill Current Output Group" . term-kill-output) [next-prompt] ("Forward Output Group" . term-next-prompt) [previous-prompt] ("Backward Output Group" . term-previous-prompt) [show-maximum-output] ("Show Maximum Output" . term-show-maximum-output) [show-output] ("Show Current Output Group" . term-show-output) [kill-input] ("Kill Current Input" . term-kill-input) [copy-input] ("Copy Old Input" . term-copy-old-input) [forward-matching-history] ("Forward Matching Input..." . term-forward-matching-input) [backward-matching-history] ("Backward Matching Input..." . term-backward-matching-input) [next-matching-history] ("Next Matching Input..." . term-next-matching-input) [previous-matching-history] ("Previous Matching Input..." . term-previous-matching-input) [next-matching-history-from-input] ("Next Matching Current Input" . term-next-matching-input-from-input) [previous-matching-history-from-input] ("Previous Matching Current Input" . term-previous-matching-input-from-input) [next-history] ("Next Input" . term-next-input) [previous-history] ("Previous Input" . term-previous-input) [list-history] ("List Input History" . term-dynamic-list-input-ring) [expand-history] ("Expand History Before Point" . term-replace-by-expanded-history) "Signals" [eof] ("EOF" . term-send-eof) [kill] ("KILL" . term-kill-subjob) [quit] ("QUIT" . term-quit-subjob) [cont] ("CONT" . term-continue-subjob) [stop] ("STOP" . term-stop-subjob) [] ("BREAK" . term-interrupt-subjob) [menu-bar signals]] 5) #@58 Change `term-escape-char' and keymaps that depend on it. (defalias 'term-set-escape-char #[(c) "\203\n\304 \305#\210\306\307\n\"\304 \n #\210\304 \310\311\312 \310\"#\210\304 \313\311\312 \313\"#\210\304 \n\305#\210\304 \314\315#\210\304 \316\317#\210\304 \320\321#\210\304 \322\323#\207" [term-escape-char term-raw-map c term-raw-escape-map define-key term-send-raw make-string 1 "" lookup-key current-global-map "" "" term-pager-toggle " " term-char-mode "\n" term-line-mode [134217848] execute-extended-command] 6 (#$ . 16097)]) (byte-code "\306 \306 \307\211\310W\2033\311\312\313\n\"\314#\210\n\315=\204,\n\316=\204,\311 \312\313\n\"\317#\210\nT\211\202 \320 \321\211\203N\f@\311\322 !\314#\210\fA\211\204<*\311\323 #\210\324\325\326 \327\"!;\311 \330\331#\210\311 \332<#\210\311 \333=#\210\311 \334\335#\210\311 \336\337#\210\311 \340\341#\210\311 \342\343#\210\311 \344\345#\210\311 \346\345#\210\311 \347\350#\210\311 \351\352#\210\311 \353\354#\210\311 \355\356#\210\311 \357\360#\210\311 \361\362#\210\311 \363\364#\210\311 \365\366#\210\311 \367\370#\210+\371\372!\207" [map esc-map i elm #:--cl-dolist-temp-- term-raw-map make-keymap 0 128 define-key make-string 1 term-send-raw 79 91 term-send-raw-meta generic-character-list nil vector "" copy-keymap lookup-key current-global-map "" [mouse-2] term-mouse-paste [menu-bar terminal] [menu-bar signals] [up] term-send-up [down] term-send-down [right] term-send-right [left] term-send-left [delete] term-send-del [deletechar] [backspace] term-send-backspace [home] term-send-home [end] term-send-end [insert] term-send-insert [S-prior] scroll-down [S-next] scroll-up [S-insert] term-paste [prior] term-send-prior [next] term-send-next term-set-escape-char 3 term-raw-escape-map term-terminal-menu term-signals-menu] 6) (defalias 'term-window-width #[nil "\203 \203 \302 \207\302 S\207" [window-system overflow-newline-into-fringe window-width] 1]) (byte-code "\304\305\306\307#\210\310B\311\310!\204c\312\310\313 !\206\314 \315\316\211\317W\2033 \n\320\n!I\210\nT\211\202 \321\211\322W\203I \n\320\n!I\210\nT\211\2026\323\211\324W\203_ \n\320\n!I\210\nT\211\202L *\"\210\315\207" [current-load-list standard-display-table i dt put term-mode mode-class special term-display-table default-boundp set-default copy-sequence make-display-table nil 0 10 vector 11 32 128 256] 7) #@1668 Major mode for interacting with an inferior interpreter. The interpreter name is same as buffer name, sans the asterisks. There are two submodes: line mode and char mode. By default, you are in char mode. In char sub-mode, each character (except `term-escape-char') is sent immediately to the subprocess. The escape character is equivalent to the usual meaning of C-x. In line mode, you send a line of input at a time; use \[term-send-input] to send. In line mode, this maintains an input history of size `term-input-ring-size', and you can access it with the commands \[term-next-input], \[term-previous-input], and \[term-dynamic-list-input-ring]. Input ring history expansion can be achieved with the commands \[term-replace-by-expanded-history] or \[term-magic-space]. Input ring expansion is controlled by the variable `term-input-autoexpand', and addition is controlled by the variable `term-input-ignoredups'. Input to, and output from, the subprocess can cause the window to scroll to the end of the buffer. See variables `term-scroll-to-bottom-on-input', and `term-scroll-to-bottom-on-output'. If you accidentally suspend your process, use \[term-continue-subjob] to continue it. This mode can be customized to create specific modes for running particular subprocesses. This can be done by setting the hooks `term-input-filter-functions', `term-input-filter', `term-input-sender' and `term-get-old-input' to appropriate functions, and the variable `term-prompt-regexp' to the appropriate regular expression. Commands in raw mode: \{term-raw-map} Commands in line mode: \{term-mode-map} Entry to this mode runs the hooks on `term-mode-hook'. (defalias 'term-mode #[nil "\306 \210\307\310\311\n!\210\312\f\313\314!\210\315\316!\f\313\317!\210\313\320!\210\313\321!\210\322 \323 S\313\324!\210\313\325!\210\313\326!\210\327 \313\330!\210\327 \313\331!\210\332\313\333!\210\313\334!\210\313\335!\210\313\336!\210\337\335!\203g\204m\340!\313\341!\210\337\341!\203|!\204\312!\313\342!\210\342K\"\313\343!\210\344 #\313\345!\210@%\313\346!\210\312&\313\347!\210\313\350!\210\313\351!\210\313\352!\210\313\353!\210\313\354!\210\313\355!\210\313\356!\210\313\357!\210\313\360!\210\313\361!\210\313\324!\210\313\362!\210\313\363!\210\313\364!\210\313\365!\210\313\366!\210\313\367!\210\313\370!\210\313\371!\210\313\372!\210\313\373!\210\313\374!\210\313\375!\210\313\376!\210>\313\377!\210\313\201D!\210\313\201E!\210\313\201F!\210\313\201G!\210\313\201H!\210\313\201I!\210\313\201J!\210\313\201K!\210\313\201L!\210\313\201M!\210\313\201N!\210\313\201O!\210\313\201P!\210\313\201Q!\210\313\201R!\210\313\201S!\210\313\201T!\210\313\201U!\210\313\201V!\210\313\201W!\210\313\201A!\210\327 A\313\201X!\210\313\201B!\210\312B\313\201C!\210\312C\201Y\201Z!\210\204\267\340!\201[ \207" [major-mode mode-name term-mode-map indent-tabs-mode term-display-table buffer-display-table kill-all-local-variables term-mode "Term" use-local-map nil make-local-variable term-home-marker copy-marker 0 term-saved-home-marker term-height term-width term-window-width window-height term-terminal-parameter term-saved-cursor term-last-input-start make-marker term-last-input-end term-last-input-match "" term-prompt-regexp term-input-ring-size term-input-ring term-input-ring-file-name boundp make-ring term-input-ring-index term-command-hook term-ansi-at-host system-name term-ansi-at-dir term-ansi-at-message ange-ftp-default-user ange-ftp-default-password ange-ftp-generate-anonymous-password term-buffer-maximum-size term-ansi-current-bold term-ansi-current-color term-ansi-face-already-done term-ansi-current-bg-color term-ansi-current-underline term-ansi-current-reverse term-ansi-current-invisible term-terminal-previous-parameter term-terminal-previous-parameter-2 term-terminal-previous-parameter-3 term-terminal-previous-parameter-4 term-terminal-more-parameters term-terminal-state term-kill-echo-list term-start-line-column term-current-column term-current-row term-log-buffer term-scroll-start term-scroll-end term-scroll-with-delete default-directory term-pending-delete-marker term-pending-frame cua-mode term-pager-count term-pager-old-local-map term-old-mode-map term-insert-mode term-dynamic-complete-functions term-completion-fignore term-get-old-input term-matching-input-from-input-string term-input-autoexpand term-input-ignoredups term-delimiter-argument-list term-input-filter-functions term-input-filter term-input-sender term-eol-on-send term-scroll-to-bottom-on-output term-scroll-show-maximum-output term-ptyp term-exec-hook term-vertical-motion term-current-face run-mode-hooks term-mode-hook term-update-mode-line] 2 (#$ . 18492) nil]) (defalias 'term-reset-size #[(height width) "\n\306\211\306 \307\310\"\207" [height term-height width term-width term-start-line-column term-current-row nil term-set-scroll-region 0 term-current-column] 4]) (defalias 'term-check-kill-echo-list #[nil "\306`\307\216\306\210 \203G @\211G` Z\211\neY\203@\f\n`{\230\203@\310 !\210 A\306\211 \f\306\211 \311\202C A+\202 )\n+\207" [term-kill-echo-list save-point found cur str len nil ((byte-code "\204 b\210\302\207" [found save-point nil] 1)) delete-backward-char t start term-current-column term-current-row term-start-line-column] 4]) (defalias 'term-check-size #[(process) "\303 SU\203 \304 U?\205\305\303 S\304 \"\210\306\n #\207" [term-height term-width process window-height term-window-width term-reset-size set-process-window-size] 4]) (defalias 'term-send-raw-string #[(chars) "\303p!\211\204\304\305!\202\306!b\210 \203\307 \310\n\")\207" [proc term-pager-count chars get-buffer-process error "Current buffer has no process" process-mark term-current-row process-send-string] 4]) #@89 Send the last character typed through the terminal-emulator without any interpretation. (defalias 'term-send-raw #[nil "9\203\301N\203\301N\302\303\304\"!\207" [last-input-char ascii-character term-send-raw-string make-string 1] 4 (#$ . 24317) nil]) (defalias 'term-send-raw-meta #[nil "9\203\" \303N\211\203\n@ 9\203! \304N\211\203!\n)\305 !\306 \247\203? \307V\203? \310W\203?\311\312 \"\202C\313\314 \"!)\207" [last-input-char char tmp event-symbol-elements ascii-character event-basic-type term-send-raw-string 127 256 make-string 1 format "%c"] 5 nil nil]) #@68 Insert the last stretch of killed text at the position clicked on. (defalias 'term-mouse-paste #[(click arg) "\303\304!\210\305\306 !\210\307\310\n<\203\311\202!\n\312=\203\313\202!\nS!!\207" [this-command click arg run-hooks mouse-leave-buffer-hook yank mouse-set-point term-send-raw-string current-kill 0 - -1] 4 (#$ . 24912) "e\nP"]) #@50 Insert the last stretch of killed text at point. (defalias 'term-paste #[nil "\300\301\302!!\207" [term-send-raw-string current-kill 0] 3 (#$ . 25262) nil]) (defalias 'term-send-up #[nil "\300\301!\207" [term-send-raw-string "OA"] 2 nil nil]) (defalias 'term-send-down #[nil "\300\301!\207" [term-send-raw-string "OB"] 2 nil nil]) (defalias 'term-send-right #[nil "\300\301!\207" [term-send-raw-string "OC"] 2 nil nil]) (defalias 'term-send-left #[nil "\300\301!\207" [term-send-raw-string "OD"] 2 nil nil]) (defalias 'term-send-home #[nil "\300\301!\207" [term-send-raw-string "[1~"] 2 nil nil]) (defalias 'term-send-insert #[nil "\300\301!\207" [term-send-raw-string "[2~"] 2 nil nil]) (defalias 'term-send-end #[nil "\300\301!\207" [term-send-raw-string "[4~"] 2 nil nil]) (defalias 'term-send-prior #[nil "\300\301!\207" [term-send-raw-string "[5~"] 2 nil nil]) (defalias 'term-send-next #[nil "\300\301!\207" [term-send-raw-string "[6~"] 2 nil nil]) (defalias 'term-send-del #[nil "\300\301!\207" [term-send-raw-string "[3~"] 2 nil nil]) (defalias 'term-send-backspace #[nil "\300\301!\207" [term-send-raw-string ""] 2 nil nil]) #@184 Switch to char ("raw") sub-mode of term mode. Each character you type is sent directly to the inferior without intervention from Emacs, except for the escape character (usually C-c). (defalias 'term-char-mode #[nil "\305 =?\205,\305 \306!\210\307\310p!!\n`\fV\203)\311\216\312K\313\210\314 \210)*\315 \207" [term-raw-map term-old-mode-map term-input-sender save-input-sender pmark current-local-map use-local-map process-mark get-buffer-process ((byte-code "\302\207" [save-input-sender term-input-sender nil] 1)) term-send-string nil term-send-input term-update-mode-line] 3 (#$ . 26414) nil]) #@187 Switch to line ("cooked") sub-mode of term mode. This means that Emacs editing commands work as normally, until you type \[term-send-input] which sends the current line to the inferior. (defalias 'term-line-mode #[nil "\302 =\205 \303 !\210\304 \207" [term-raw-map term-old-mode-map current-local-map use-local-map term-update-mode-line] 2 (#$ . 27027) nil]) (defalias 'term-update-mode-line #[nil "\303 =\203 \203\304\202\305\202 \203\306\202\307\310 \207" [term-raw-map term-pager-count mode-line-process current-local-map (": char page %s") (": char %s") (": line page %s") (": line %s") force-mode-line-update] 2]) #@145 True if there is a process associated w/buffer BUFFER, and it is alive (status RUN or STOP). BUFFER can be either a buffer or the name of one. (defalias 'term-check-proc #[(buffer) "\302!\211\205 \303 !\304>)\207" [buffer proc get-buffer-process process-status (run stop)] 3 (#$ . 27669)]) #@325 Make a term process NAME in a buffer, running PROGRAM. The name of the buffer is made by surrounding NAME with `*'s. If there is already a running process in that buffer, it is not restarted. Optional third arg STARTFILE is the name of a file to send the contents of to the process. Any more args are arguments to PROGRAM. (defalias 'make-term #[(name program &optional startfile &rest switches) "\305\306\306Q!\307 !\204\212 q\210\310 \210)\311 \n \f%\210 )\207" [name buffer program startfile switches get-buffer-create "*" term-check-proc term-mode term-exec] 6 (#$ . 27970)]) #@198 Start a terminal-emulator in a new buffer. The buffer is in Term mode; see `term-mode' for the commands to use in that buffer. \Type \[switch-to-buffer] to switch to another buffer. (defalias 'term #[(program) "\301\302\"q\210\303 \210\304 \210\305\306!\207" [program make-term "terminal" term-mode term-char-mode switch-to-buffer "*terminal*"] 3 (#$ . 28563) (list (read-from-minibuffer "Run program: " (or explicit-shell-file-name (getenv "ESHELL") (getenv "SHELL") "/bin/sh")))]) #@252 Start up a process in buffer for term modes. Blasts any old process running in the buffer. Doesn't set the buffer mode. You can use this to cheaply run a series of processes in the same term buffer. The hook `term-exec-hook' is run after each exec. (defalias 'term-exec #[(buffer name command startfile switches) "\212q\210\306!\211\203\307 !\210)\310\n \f$\311\312!\210 \ndb\210\313 !`\314\223\210\315 \316\"\210\317 \320\"\210\203S\321\322!\210db\210\323!\210`d{`d|\210\324 \"\210\325\326!\210*\207" [buffer proc name command switches process-connection-type get-buffer-process delete-process term-exec-1 make-local-variable term-ptyp process-mark nil set-process-filter term-emulate-terminal set-process-sentinel term-sentinel sleep-for 1 insert-file-contents term-send-string run-hooks term-exec-hook startfile] 6 (#$ . 29069)]) #@80 Sentinel for term buffers. The main purpose is to get rid of the local keymap. (defalias 'term-sentinel #[(proc msg) "\304!\305!\306>\205/\307 !\204\310\311\"\202/p\312\216 q\210\313\311!\210\314\315! \"\210\316!*)\207" [proc buffer obuf msg process-buffer process-status (signal exit) buffer-name set-process-buffer nil ((set-buffer obuf)) use-local-map term-handle-exit process-name delete-process] 3 (#$ . 29928)]) #@73 Write process exit (or other change) message MSG in the current buffer. (defalias 'term-handle-exit #[(process-name msg) "\305d` b\210\306\307 \310\f\261\210\311 \210\205  W\205 b+\207" [opoint omax buffer-read-only process-name msg nil 10 "Process " " " force-mode-line-update] 5 (#$ . 30363)]) (byte-code "\301B\302\301!\204\303\301\304\"\210\301\207" [current-load-list term-term-name default-boundp set-default "eterm-color"] 3) #@33 Termcap capabilities supported. (defvar term-termcap-format "%s%s:li#%d:co#%d:cl=\\E[H\\E[J:cd=\\E[J:bs:am:xn:cm=\\E[%%i%%d;%%dH:nd=\\E[C:up=\\E[A:ce=\\E[K:ho=\\E[H:pt:al=\\E[L:dl=\\E[M:DL=\\E[%%dM:AL=\\E[%%dL:cs=\\E[%%i%%d;%%dr:sf=^J:dc=\\E[P:DC=\\E[%%dP:IC=\\E[%%d@:im=\\E[4h:ei=\\E[4l:mi::so=\\E[7m:se=\\E[m:us=\\E[4m:ue=\\E[m:md=\\E[1m:mr=\\E[7m:me=\\E[m:UP=\\E[%%dA:DO=\\E[%%dB:LE=\\E[%%dD:RI=\\E[%%dC:kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~:mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M:bl=^G:do=^J:le=^H:ta=^I:se=\\E[27m:ue=\\E24m:kb=^?:kD=^[[3~:sc=\\E7:rc=\\E8:r1=\\Ec:" (#$ . 30815)) (defalias 'term-exec-1 #[(name buffer command switches) "\306\307\"\306\310 \"\306\n\311 \f%\306\312 #\306\313 #\306\314 \"\306\315\f\"\257\244\316\211\317\320\321\322\323\306\324 \f#\325& ,\207" [term-term-name data-directory term-termcap-format term-height term-width emacs-version format "TERM=%s" "TERMINFO=%s" "TERMCAP=" "EMACS=%s (term:%s)" "INSIDE_EMACS=%s,term:%s" "LINES=%d" "COLUMNS=%d" t binary apply start-process "/bin/sh" "-c" "stty -nl echo rows %d columns %d sane 2>/dev/null;if [ $1 = .. ]; then shift; fi; exec \"$@\"" ".." term-protocol-version process-environment coding-system-for-read inhibit-eol-conversion process-connection-type name buffer command switches] 10]) #@613 Sets the buffer's `term-input-ring' from a history file. The name of the file is given by the variable `term-input-ring-file-name'. The history ring is of size `term-input-ring-size', regardless of file size. If `term-input-ring-file-name' is nil this function does nothing. If the optional argument SILENT is non-nil, we say nothing about a failure to read the history file. This function is useful for major mode commands and mode hooks. The structure of the history file should be one input command per line, with the most recent command last. See also `term-input-ignoredups' and `term-write-input-ring'. (defalias 'term-read-input-ring #[(&optional silent) "\203\n\306\232\203\f\307\207\310!\204 \206|\311\312\"\207\313\314!\315\316\n!\317\216\212q\210~\210\320 \210\321 !\210db\210\f\nW\203s\322\323\307\324#\203s\325\224\325\225{\203e\326 !\204e\327 \315\"\230\204k\330 \"\210)\fT\211\202<* \307\211,\207" [term-input-ring-file-name silent term-input-ring-size ring count file "" nil file-readable-p message "Cannot read history file %s" get-buffer-create " *temp*" 0 make-ring ((kill-buffer history-buf)) erase-buffer insert-file-contents re-search-backward "^[ ]*\\([^#\n].*\\)[ ]*$" t 1 ring-empty-p ring-ref ring-insert-at-beginning history-buf history term-input-ignoredups term-input-ring term-input-ring-index] 6 (#$ . 32196)]) #@345 Writes the buffer's `term-input-ring' to a history file. The name of the file is given by the variable `term-input-ring-file-name'. The original contents of the file are lost if `term-input-ring' is not empty. If `term-input-ring-file-name' is nil this function does nothing. Useful within process sentinels. See also `term-read-input-ring'. (defalias 'term-write-input-ring #[nil "\203\306\232\204 \203\307 !\203\310\207\311!\204!\312\313\"\207\314\315! \316 !\212\nq\210\317 \210 \320V\203H S\321 \"\322\261\210\2024\323\324 \310\f\310\325%\210\326\310!-\207" [term-input-ring-file-name term-input-ring history-buf ring file index "" ring-empty-p nil file-writable-p message "Cannot write history file %s" get-buffer-create " *Temp Input History*" ring-length erase-buffer 0 ring-ref 10 write-region buffer-string no-message kill-buffer] 6 (#$ . 33586)]) #@49 List in help buffer the buffer's input history. (defalias 'term-dynamic-list-input-ring #[nil "\306!\203\f\307!\203\310\311!\207\312\313\314!S\315 \n\316Y\2030\317\n\"\fB\nS\211\202 \220\320\f!\210 q\210\321y\210\322\323\312\324#\205K\325\326!\210\202<\221\210\327\316!\210\310\330!\210\331 \211\332=\203d\333 !\202i C\211-\207" [term-input-ring conf index history-buffer history ch ring-p ring-empty-p message "No history" nil " *Input History*" ring-length current-window-configuration 0 ring-ref display-completion-list 3 search-backward "completion" move replace-match "history reference" sit-for "Hit space to flush" read-event 32 set-window-configuration unread-command-events] 6 (#$ . 34474) nil]) (defalias 'term-regexp-arg #[(prompt) "\305 \306\211\211\303%\211\307\230\203 \211A@\240\202\n\310\f!*D\207" [last-command prompt regexp minibuffer-history-search-history current-prefix-arg read-from-minibuffer nil "" prefix-numeric-value] 7]) (defalias 'term-search-arg #[(arg) "\303 \204 \304\305!\207\203\306!\203\304\307!\207\310 !\203!\311\312\207 \207" [term-input-ring arg term-input-ring-index term-after-pmark-p error "Not at command line" ring-empty-p "Empty input ring" zerop nil 1] 2]) (defalias 'term-search-start #[(arg) "\203\303 \304V\203\305\202\306\\\307\n!\"\207 \304Y\203\304\207\307\n!S\207" [term-input-ring-index arg term-input-ring mod 0 1 -1 ring-length] 4]) #@95 Return the string ARG places along the input ring. Moves relative to `term-input-ring-index'. (defalias 'term-previous-input-string #[(arg) "\303 \203\304\n \\\305!\"\202\n\"\207" [term-input-ring term-input-ring-index arg ring-ref mod ring-length] 6 (#$ . 35918)]) #@40 Cycle backwards through input history. (defalias 'term-previous-input #[(arg) "\301\302\"\207" [arg term-previous-matching-input "."] 3 (#$ . 36196) "*p"]) #@39 Cycle forwards through input history. (defalias 'term-next-input #[(arg) "\301[!\207" [arg term-previous-input] 2 (#$ . 36359) "*p"]) #@111 Return the string matching REGEXP ARG places along the input ring. Moves relative to `term-input-ring-index'. (defalias 'term-previous-matching-input-string #[(regexp arg) "\304 \"\211\205 \305 \n\")\207" [regexp arg pos term-input-ring term-previous-matching-input-string-position ring-ref] 4 (#$ . 36501)]) #@120 Return the index matching REGEXP ARG places along the input ring. Moves relative to START, or `term-input-ring-index'. (defalias 'term-previous-matching-input-string-position #[(regexp arg &optional start) "\306!\203\f\307!\203\310\311!\210\312!\n\313V\203\314\202\315\316\f\206(\317\n! Z \"\320\211\n\313U\204\200\204\200 \316 \\ \" W\203n\204n\321\322 \"\"\204n\316 \\ \"\211U\202H\n\313V\203y\nS\202{\nT\211\2024\321\322 \"\"\205\214 -\207" [term-input-ring len arg motion start n ring-p ring-empty-p error "No history" ring-length 0 1 -1 mod term-search-start nil string-match ring-ref tried-each-ring-item prev regexp] 6 (#$ . 36820)]) #@218 Search backwards through input history for match for REGEXP. (Previous history elements are earlier commands.) With prefix argument N, search for Nth previous match. If N is negative, find the next or Nth next match. (defalias 'term-previous-matching-input #[(regexp arg) "\305!\306 \"\211\204\307\310!\202(\n\311\312\nT\"\210\313\314p!!`|\210\315\f\n\"c)\207" [arg regexp pos term-input-ring-index term-input-ring term-search-arg term-previous-matching-input-string-position error "Not found" message "History item: %d" process-mark get-buffer-process ring-ref] 4 (#$ . 37518) (term-regexp-arg "Previous input matching (regexp): ")]) #@227 Search forwards through input history for match for REGEXP. (Later history elements are more recent commands.) With prefix argument N, search for Nth following match. If N is negative, find the previous or Nth previous match. (defalias 'term-next-matching-input #[(regexp arg) "\302 [\"\207" [regexp arg term-previous-matching-input] 3 (#$ . 38168) (term-regexp-arg "Next input matching (regexp): ")]) #@238 Search backwards through input history for match for current input. (Previous history elements are earlier commands.) With prefix argument N, search for Nth previous match. If N is negative, search forwards for the -Nth following match. (defalias 'term-previous-matching-input-from-input #[(arg) "\304>\204\305\306p!!`{\307\310\311\312 !P \"\207" [last-command term-matching-input-from-input-string term-input-ring-index arg (term-previous-matching-input-from-input term-next-matching-input-from-input) process-mark get-buffer-process nil term-previous-matching-input "^" regexp-quote] 4 (#$ . 38578) "p"]) #@243 Search forwards through input history for match for current input. (Following history elements are more recent commands.) With prefix argument N, search for Nth following match. If N is negative, search backwards for the -Nth previous match. (defalias 'term-next-matching-input-from-input #[(arg) "\301[!\207" [arg term-previous-matching-input-from-input] 2 (#$ . 39197) "p"]) #@675 Expand input command history references before point. Expansion is dependent on the value of `term-input-autoexpand'. This function depends on the buffer's idea of the input history, which may not match the command interpreter's idea, assuming it has one. Assumes history syntax is like typical Un*x shells'. However, since Emacs cannot know the interpreter's idea of input line numbers, assuming it has one, it cannot expand absolute input line number references. If the optional argument SILENT is non-nil, never complain even if history reference seems erroneous. See `term-magic-space' and `term-replace-by-expanded-history-before-point'. Returns t if successful. (defalias 'term-replace-by-expanded-history #[(&optional silent) "\205(\305\306 \"\205(\212\307 \210\310\n!)\205(\311 \312\313!\210\314\f!\210 \311 U)?\207" [term-input-autoexpand term-get-old-input term-prompt-regexp previous-modified-tick silent string-match "[!^]" beginning-of-line looking-at buffer-modified-tick message "Expanding history references..." term-replace-by-expanded-history-before-point] 3 (#$ . 39582) nil]) #@114 Expand directory stack reference before point. See `term-replace-by-expanded-history'. Returns t if successful. (defalias 'term-replace-by-expanded-history-before-point #[(silent) "\212\212\306\210`)`Z\307\306!\210`\310\212\306\210` Z)w\210`\212\306\210` Z)W\205\200\306h\311U\2047\312`\"\203>`Tb\210\202\313\314!\203O\315\225b\210\316\317!\210\202\313\320!\203\213\321\322\224\322\225{!S\211\323\f!X\203\324\325\326 !\327\224\327\225#\330\211#\210 \316\331 T\"\210\202\207\315\225b\210\316\332!\210)\202\313\333!\204\227\313\334!\203\254\324\325\326\315!\322\224\322\225#\330\211#\210\316\335!\210\202\313\336!\203.\322\224\322\225/\327\2240\327\22510\206\307 1\206\316/{2\337 3\340\216\313\341!*\203\342\342\202\343\3434\337 3\344\216\3454\3462!P\322\"*\2115\204\315\225b\2106\204)\316\347!\210\350 \210\202)5\324\325\351\f5\"\352\224\352\225#\330\211#\210\316\3315T\"\210.\202\313\353!\203y\322\224\322\225{\327\224\327\225{\306578\324\326\315!\330\211#\210`5\315\224b\210\35485\330#\204j6\204u\355\347!\210\202u\3247\330\211#\210\316\356!\210+\202\315\225b\210\202+\207" [start toend term-input-ring-index number term-input-ring mb1 nil term-bol "^!^" 92 term-within-quotes looking-at "![0-9]+\\($\\|[^-]\\)" 0 message "Absolute reference cannot be expanded" "!-\\([0-9]+\\)\\(:?[0-9^$*-]+\\)?" string-to-number 1 ring-length replace-match term-args term-previous-input-string 2 t "History item: %d" "Relative reference exceeds input history size" "!!?:?\\([0-9^$*-]+\\)" "!!" "History item: previous" "!\\??\\({\\(.+\\)}\\|\\(\\sw+\\)\\)\\(:?[0-9^$*-]+\\)?" match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) "!\\?" "" "^" ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) term-previous-matching-input-string-position regexp-quote "Not found" ding ring-ref 4 "\\^\\([^^]+\\)\\^?\\([^^]*\\)\\^?" search-forward error "History item: substituted" me1 mb2 me2 exp save-match-data-internal pref pos silent new old] 6 (#$ . 40697)]) #@143 Expand input history references before point and insert ARG spaces. A useful command to bind to SPC. See `term-replace-by-expanded-history'. (defalias 'term-magic-space #[(arg) "\301 \210\302!\207" [arg term-replace-by-expanded-history self-insert-command] 2 (#$ . 42793) "p"]) #@92 Return t if the number of quotes between BEG and END is odd. Quotes are single and double. (defalias 'term-within-quotes #[(beg end) "\304\305 #\304\306 #\307 \310\"\311U\206\307\n\310\"\311U*\207" [beg end countdq countsq term-how-many-region "\\(^\\|[^\\\\]\\)'" "\\(^\\|[^\\\\]\\)\"" mod 2 1] 5 (#$ . 43079)]) #@54 Return number of matches for REGEXP from BEG to END. (defalias 'term-how-many-region #[(regexp beg end) "\305\212\306 \307\216\nb\210\310 \f\311#\203T\202 +)\207" [count save-match-data-internal beg regexp end 0 match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) re-search-forward t] 4 (#$ . 43404)]) (defalias 'term-args #[(string begin end) "\306 \307\216 \204\310\n\311\312#\202k f\313=\203 T\202 {\314\315\f\"\203,\316\202D\314\317\f\"\2037\311\202D\f\320\230\203A\312\202D\321\f!\314\322\f\"\203P\312\202b\314\323\f\"\203a\321\f\311\225\312O!\202b \310\n #+*\207" [save-match-data-internal begin string end range nth match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) term-arguments 0 nil 58 string-match "^[*^]" 1 "^-" "$" string-to-number "[-*$]$" "-" mth] 4]) (defalias 'term-delim-arg #[(arg) "\204 C\207\306\307 G \nW\203W H \211>\2037 \nW\203L H=\203L T\211\202\" \nW\203L H>\204L T\211\2028 O\fB*\202\f+\207" [term-delimiter-argument-list arg len pos args start nil 0 char] 4]) #@358 Return from STRING the NTH to MTH arguments. NTH and/or MTH can be nil, which means the last argument. Returned arguments are separated by single spaces. We assume whitespace separates arguments, except within quotes. Also, a run of one or more of a single character in `term-delimiter-argument-list' is a separate argument. Argument 0 is the command name. (defalias 'term-arguments #[(string nth mth) "\306\307\310\211\307\211\211\203 X\203f\311\f#\203f\n\203=\f\310\224U\203=\310\225\2069\312\224\202\n\203Z\n\fO\203Q B\202V\313 ! \244 T\312\224\310\224\310\225\202\n\203\203\n\fO\203z B\202\313 ! \244 T\206\212 S\203\227 ZS\202\230\310\314\315 \233\237\233\316#. \207" [quotes str beg count pos args "[^ \n \"'`]+\\|\\(\"[^\"]*\"\\|'[^']*'\\|`[^`]*`\\)" nil 0 string-match 1 term-delim-arg mapconcat #[(a) "\207" [a] 1] " " argpart mth string nth m n] 7 (#$ . 44557)]) #@1937 Send input to process. After the process output mark, sends all text from the process mark to point as input to the process. Before the process output mark, calls value of variable term-get-old-input to retrieve old input, copies it to the process mark, and sends it. A terminal newline is also inserted into the buffer and sent to the process. The list of function names contained in the value of `term-input-filter-functions' is called on the input before sending it. The input is entered into the input history ring, if the value of variable term-input-filter returns non-nil when called on the input. Any history reference may be expanded depending on the value of the variable `term-input-autoexpand'. The list of function names contained in the value of `term-input-filter-functions' is called on the input before sending it. The input is entered into the input history ring, if the value of variable `term-input-filter' returns non-nil when called on the input. If variable `term-eol-on-send' is non-nil, then point is moved to the end of line before sending the input. The values of `term-get-old-input', `term-input-filter-functions', and `term-input-filter' are chosen according to the command interpreter running in the buffer. E.g., If the interpreter is the csh, term-get-old-input is the default: take the current line, discard any initial string matching regexp term-prompt-regexp. term-input-filter-functions monitors input for "cd", "pushd", and "popd" commands. When it sees one, it cd's the buffer. term-input-filter is the default: returns t if the input isn't all white space. If the term is Lucid Common Lisp, term-get-old-input snarfs the sexp ending at point. term-input-filter-functions does nothing. term-input-filter returns nil if the input matches input-filter-regexp, which matches (1) all whitespace (2) :a, :c, etc. Similarly for Soar, Scheme, etc. (defalias 'term-send-input #[nil "\306p!\211\204\307\310!\202\365\311!\312 !`\nY\211\203+\f\203%\313\210 `{\202- \314=\204;\202B\315\316!\210 `{\f\317=\204P\f\202d\315\316!\210 `{ `|\210\fc\210)\203v\212\311!b\210\320 )!\203\243\203\234\321!\203\234\322!\204\234\323\324\"\230\204\243\325\"\210\211 \203\275 @\f\326P!\210 A\211 \204\253)\313!\" \313\223\210#`\313\223\210 \203\352\327$!\203\335$ |\210$\n\313\223\210\311!`\313\223\210 b\210%\f\".)\207" [proc pmark pmark-val input-is-new term-eol-on-send term-get-old-input get-buffer-process error "Current buffer has no process" process-mark marker-position nil input term-replace-by-expanded-history t history term-current-row ring-p ring-empty-p ring-ref 0 ring-insert "\n" marker-buffer intxt term-input-autoexpand copy term-pager-count term-input-filter term-input-ignoredups term-input-ring term-input-filter-functions functions term-input-ring-index term-last-input-start term-last-input-end term-pending-delete-marker term-input-sender] 4 (#$ . 45510) nil]) #@118 Default for `term-get-old-input'. Take the current line, and discard any initial text matching `term-prompt-regexp'. (defalias 'term-get-old-input-default #[nil "\212\301 \210\302 \210`\303\210`{*\207" [beg beginning-of-line term-skip-prompt nil] 2 (#$ . 48555)]) #@112 Insert after prompt old input at point as new input to be edited. Calls `term-get-old-input' to get old input. (defalias 'term-copy-old-input #[nil " \303p! \204\304\305!\202\306 !b\210\nc*\207" [term-get-old-input process input get-buffer-process error "Current buffer has no process" process-mark] 3 (#$ . 48829) nil]) #@128 Skip past the text matching regexp `term-prompt-regexp'. If this takes us past the end of the current line, don't skip at all. (defalias 'term-skip-prompt #[nil "\212\302\210`)\303 !\205\304\225X\205\304\225b)\207" [eol term-prompt-regexp nil looking-at 0] 2 (#$ . 49164)]) #@43 Is point after the process output marker? (defalias 'term-after-pmark-p #[nil "\301\302\303p!!!\211`X)\207" [proc-pos marker-position process-mark get-buffer-process] 5 (#$ . 49451)]) #@144 Default function for sending to PROC input STRING. This just sends STRING plus a newline. To override this, set the hook `term-input-sender'. (defalias 'term-simple-send #[(proc string) "\302 \"\210\302\303\"\207" [proc string term-send-string "\n"] 3 (#$ . 49643)]) #@292 Goes to the beginning of line, then skips past the prompt, if any. If a prefix argument is given (\[universal-argument]), then no prompt skip -- go straight to column 0. The prompt skip is done by skipping text matching the regular expression `term-prompt-regexp', a buffer local variable. (defalias 'term-bol #[(arg) "\301 \210?\205\n\302 \207" [arg beginning-of-line term-skip-prompt] 1 (#$ . 49920) "P"]) #@597 Read a single line of text from user without echoing, and return it. Prompt with argument PROMPT, a string. Optional argument STARS causes input to be echoed with '*' characters on the prompt line. Input ends with RET, LFD, or ESC. DEL or C-h rubs out. C-u kills line. C-g aborts (if `inhibit-quit' is set because e.g. this function was called from a process filter and C-g is pressed, this function returns nil rather than a string). Note that the keystrokes comprising the text can still be recovered (temporarily) with \[view-lossage]. This may be a security bug for some applications. (defalias 'term-read-noecho #[(prompt &optional stars) "\306\307\211\310\311\204 \203 \312\313\314\fG\315\"#\210\202&\312\316\"\210\317 \211\320U\2038\310\211\211\202 \321U\204J \322U\204J \323U\203P\310\211\202 \324U\203[\306\202\n \325U\204p \326U\204p\f\327 !P\202\n\fG\307V\203\n\f\307\330O\202\n\203\223\311\211\312\331!\210\332\310!\210\202\230\312\306!\210\f-\207" [done cursor-in-echo-area echo-keystrokes c ans stars "" 0 t nil message "%s%s" make-string 42 "%s" read-char 7 13 10 27 21 8 127 char-to-string -1 "Quit" beep prompt quit-flag] 7 (#$ . 50338)]) #@257 Read a string without echoing. Then send it to the process running in the current buffer. A new-line is additionally sent. String is not saved on term input history list. Security bug: your string can still be temporarily recovered with \[view-lossage]. (defalias 'term-send-invisible #[(str &optional proc) ";\204\n\303\304\305\" \204\306p! \204\307\310!\207\n\311B\244\312 \"\210\312 \313\"\207" [str proc term-kill-echo-list term-read-noecho "Non-echoed text: " t get-buffer-process error "Current buffer has no process" nil term-send-string "\n"] 3 (#$ . 51551) "P"]) #@143 *Long inputs send to term processes are broken up into chunks of this size. If your process is choking on big inputs, try lowering the value. (defvar term-input-chunk-size 512 (#$ . -52143)) #@326 Send to PROC the contents of STR as input. This is equivalent to `process-send-string', except that long input strings are broken up into chunks of size `term-input-chunk-size'. Processes are given a chance to output between chunks. This can help prevent processes from hanging when you send them long inputs on some OS's. (defalias 'term-send-string #[(proc str) "G\211\n^\306\f\307 O\"\210 W\205, \n\\\310 \210\306\f ^O\"\210 )\202*\207" [str len term-input-chunk-size i proc next-i process-send-string 0 accept-process-output] 7 (#$ . 52341)]) #@187 Send to PROC the region delimited by START and END. This is a replacement for `process-send-region' that tries to keep your process from hanging on long inputs. See `term-send-string'. (defalias 'term-send-region #[(proc start end) "\303 \n{\"\207" [proc start end term-send-string] 4 (#$ . 52910)]) #@52 Kill all output from interpreter since last input. (defalias 'term-kill-output #[nil "\302\303p!!\304 \"\210b\210\305c\210`\306\223)\207" [pmark term-last-input-end process-mark get-buffer-process kill-region "*** output flushed ***\n" nil] 3 (#$ . 53218) nil]) #@127 Display start of this batch of interpreter output at top of window. Sets mark to the value of point when this command is run. (defalias 'term-show-output #[nil "b\210\301u\210\302 \210\303\304 `\"\210\305\207" [term-last-input-end -1 beginning-of-line set-window-start selected-window nil] 3 (#$ . 53491) nil]) #@31 Interrupt the current subjob. (defalias 'term-interrupt-subjob #[nil "\301\302\"\207" [term-ptyp interrupt-process nil] 3 (#$ . 53810) nil]) #@41 Send kill signal to the current subjob. (defalias 'term-kill-subjob #[nil "\301\302\"\207" [term-ptyp kill-process nil] 3 (#$ . 53958) nil]) #@41 Send quit signal to the current subjob. (defalias 'term-quit-subjob #[nil "\301\302\"\207" [term-ptyp quit-process nil] 3 (#$ . 54106) nil]) #@292 Stop the current subjob. WARNING: if there is no current subjob, you can end up suspending the top-level process running in the buffer. If you accidentally do this, use \[term-continue-subjob] to resume the process. (This is not a problem with most shells, since they ignore this signal.) (defalias 'term-stop-subjob #[nil "\301\302\"\207" [term-ptyp stop-process nil] 3 (#$ . 54255) nil]) #@111 Send CONT signal to process buffer's process group. Useful if you accidentally suspend the top-level process. (defalias 'term-continue-subjob #[nil "\301\302\"\207" [term-ptyp continue-process nil] 3 (#$ . 54655) nil]) #@63 Kill all text from last stuff output by interpreter to point. (defalias 'term-kill-input #[nil "\302\303p!!\304!` V\205\305`\"*\207" [pmark p-pos process-mark get-buffer-process marker-position kill-region] 3 (#$ . 54881) nil]) #@79 Delete ARG characters forward, or send an EOF to process if at end of buffer. (defalias 'term-delchar-or-maybe-eof #[(arg) "m\203\301 \207\302!\207" [arg process-send-eof delete-char] 2 (#$ . 55121) "p"]) #@46 Send an EOF to the current buffer's process. (defalias 'term-send-eof #[nil "\300 \207" [process-send-eof] 1 (#$ . 55335) nil]) #@227 Search backward through buffer for match for REGEXP. Matches are searched for on lines that match `term-prompt-regexp'. With prefix argument N, search for Nth previous match. If N is negative, find the next or Nth next match. (defalias 'term-backward-matching-input #[(regexp arg) "\305 Q\212 \306V\203\306\202\307\210\310\n\311\312 $\205`)\211\204,\313\314!\210\315 \2022\fb\210\316\311!*\207" [term-prompt-regexp regexp re arg pos ".*" 0 1 re-search-backward nil t message "Not found" ding term-bol] 6 (#$ . 55470) (term-regexp-arg "Backward input matching (regexp): ")]) #@235 Search forward through buffer for match for REGEXP. Matches are searched for on lines that match `term-prompt-regexp'. With prefix argument N, search for Nth following match. If N is negative, find the previous or Nth previous match. (defalias 'term-forward-matching-input #[(regexp arg) "\302 [\"\207" [regexp arg term-backward-matching-input] 3 (#$ . 56063) (term-regexp-arg "Forward input matching (regexp): ")]) #@73 Move to end of Nth next prompt in the buffer. See `term-prompt-regexp'. (defalias 'term-next-prompt #[(n) "\n\303V\203\f\304\202 \303\210\305\n!\210\306 )\207" [term-prompt-regexp paragraph-start n 0 1 forward-paragraph term-skip-prompt] 2 (#$ . 56486) "p"]) #@77 Move to end of Nth previous prompt in the buffer. See `term-prompt-regexp'. (defalias 'term-previous-prompt #[(n) "\301[!\207" [n term-next-prompt] 2 (#$ . 56756) "p"]) (defalias 'term-source-default #[(previous-dir/file source-modes) "\203 \n>\203\305!\306!B\207 \206\f\307B\207" [buffer-file-name major-mode source-modes previous-dir/file default-directory file-name-directory file-name-nondirectory nil] 3]) (defalias 'term-check-source #[(fname) "\303!\211\205$\304 !\205$\305\306\307\310 !\"!\205$p q\210\311 \210\nq))\207" [fname buff old-buffer get-file-buffer buffer-modified-p y-or-n-p format "Save buffer %s first? " buffer-name save-buffer] 6]) #@67 Return string around `point' that starts the current line or nil. (defalias 'term-extract-string #[nil "\212`\305 \210`\306\210`b\210\307\310 \311#\205`Tb\210\312\310\n\311#\205(`S \2054\f\2054 \f{.\207" [point bol eol start end beginning-of-line nil search-backward "\"" t search-forward] 4 (#$ . 57434)]) (defalias 'term-get-source #[(prompt prev-dir/file source-modes mustmatch-p) "\306 \"\307 \211\205\310\311\312\217\205\313 !?\211\203\"\314 !\202$\n@\f\203/\315 !\2021\nA\316\203C\317\320#\202E \211P$\321\322!!.C\207" [prev-dir/file source-modes def stringfile sfile-p defdir term-source-default term-extract-string nil (file-exists-p stringfile) ((error)) file-directory-p file-name-directory file-name-nondirectory read-file-name format "%s(default %s) " expand-file-name substitute-in-file-name deffile prompt mustmatch-p ans] 6]) (defalias 'term-proc-query #[(proc str) "\306!\307!\310 !\210 q\210\311 !\312\n!\313 \"\210\314!\210\315 \f\"?\205K\316\f!\317\f\n\"\210\320\321!\210\315\f\"\204E\322!\202J\317\f\"),\207" [proc proc-buf proc-mark proc-pt proc-win str process-buffer process-mark display-buffer get-buffer-window marker-position term-send-string accept-process-output pos-visible-in-window-p window-point set-window-point sit-for 0 push-mark opoint] 3]) (defalias 'term-horizontal-column #[nil "\300 \301 Z\207" [term-current-column term-start-line-column] 2]) (defalias 'term-vertical-motion '(macro . #[(count) "\301\302E\207" [count funcall term-vertical-motion] 3])) (defalias 'term-buffer-vertical-motion #[(count) "\304U\203\305 i \245_!\210\304\207\304V\203a\306i \245\\\306\210i \\\307\\ \245\310]\211\nX\203Bm\204B\n Z\306u\210\306\210\202!\n Y\203X\n\304V\203X\nZ \\\307\\\202_\305\n _!\210*\207\306[i \\\307\\ \245\310]\211\nX\203\207\311 \210o\204\207\n Z\307u\210\202f\n Y\203\235\n\304V\203\235\n\\\310 Z\\\202\250\305 \nZ\310Z _!\210*\207" [count term-width todo H 0 move-to-column nil -1 1 beginning-of-line] 4]) (defalias 'term-start-line-column #[nil "\206`\n\303!\210i b\210)\206\304\207" [term-start-line-column save-pos term-vertical-motion 0 nil] 2]) (defalias 'term-current-column #[nil "\206 i\211\206 \301\207" [term-current-column nil] 2]) (defalias 'term-move-columns #[(delta) "\303\301 \\]\304\212\304\210`)\305 \306\"\210`\nV\205!\307\n`\310\311$)\207" [delta term-current-column point-at-eol 0 nil move-to-column t put-text-property face default] 5]) (defalias 'term-insert-char #[(char count) "`\303 \n\"\210\304`\305\306$)\207" [old-point char count insert-char put-text-property face default] 5]) (defalias 'term-current-row #[nil "\206\214\212 d}\210\n\303![*\211\206\304\207" [term-current-row term-home-marker term-vertical-motion -9999 nil] 2]) (defalias 'term-adjust-current-row-cache #[(delta) "\205 \302 \\]\211\207" [term-current-row delta 0] 3]) (defalias 'term-terminal-pos #[nil "\212\305 \306\211 \307!\210\niZ \f! ,B\207" [y x save-col term-vertical-motion term-height term-current-column nil 0] 3]) (defalias 'term-handle-ansi-terminal-messages #[(message) "\306\307\"\203\304\310\224\310\225 \311\\H\312 \313\216 \314\\\306\315 \314\\#O*\316\317\320\321\211$ \322U\203< \202W \323U\203H \202W \324U\203T \202W\321\204\300\325\326 \230\203t\327 \230\203t\330!\202\221\327 \230\203\206\331\332R\202\221\331\333\332\260! \326 \230\203\253!\"#$%&\202\300\"!$#&%\316\211\"$\316&-\202\207" [message start end command-code save-match-data-internal argument string-match "AnSiT.+\n" 0 6 match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) 8 " ?\n" nil replace-match "" t 99 104 117 file-name-as-directory system-name user-real-login-name expand-file-name "/" ":" "@" ignore term-ansi-at-dir term-ansi-at-host term-ansi-at-user default-directory term-ansi-at-save-user ange-ftp-default-user term-ansi-at-save-pwd ange-ftp-default-password term-ansi-at-save-anon ange-ftp-generate-anonymous-password] 8]) (defalias 'term-emulate-terminal #[(proc str) "r\306!q\210\307\310\211\310\211\310\211@A\310\211BC\311D\312 E\310\211FGHGI\312 \313\314\315 \"JKr\316\216\317H!LHL=\204Q\311GLH)HGI\320M!\203kM\321!|\210M\310\211\223\210\322 p=\203}\323KN\324!\210\202\201\325KN\326\321!!@`\321!U\204\230\327 \321!b\210\214d\321!V\203\257\330 O=\204\257e\321!}\210P\203\273\331HP\"\210Q\332=\203\324RHPH\310RHGI\307Q IW\203\214H HQ\333W\203\331\334\335H #\211\204\365I V\203\337Q\336=\203\337\336\311\"\210\340\341 [!\210\307Q Z\342 \f\\SZ\211B\307X\204i\fBV\2039\fBZ\307B\f \\\202iT\204CU\203K\343\336!\307V\203_\344\336!\210\fS^\211 \\!V\202i\307 \310\211!V`Ai\310\211WXY\345H OZ\"c\210i\211!YZXm\204\237[\204\237`W\340X!\210W`|\210[\203\276`W\310\210iSV\203\272`iSZZ`|\210Wb\210+\310!\346A`\347\\$\210B\307=\203\331\340\350!\210\336Q S\202*\307\211Q\2030\n\351=\2030\341 S\f\352\f\353\"[\\\353\\^S\fV\203\340\f\341 Z!\210\f!\202*S\341 V\203!\340S\341 ZS!\210S\341 U\203*\340\350!\210\202*\n\354=\203BN\307!\210V!\202*\n\355=\203Z]\203R\356 \204*\337\336\311\"\210\202*\n\353=\203g\340\350!\210\202*\n\357=\203s\333Q\202*\n\307=\204*\n\360=\204*\n\361=\204*\n\362=\203\222\363\311!\210\202*\n\364=\203\313G\204\313\334\365H #\211^\203\272_H T^O\307\225!\210\202\307H \310OR\332QI)\202*\340\336!\210\366\336!\210\nc\210\202*Q\333=\203\302\n\367=\203\376\307R\350\211`a\350\211bc\307d\370Q\202*\n\371=\203\372 \210\337\336\311\"\210\307Q\202*\n\373=\203;\374 eW\204)\374 SeY\2030\337\350!\210\2025\337\350\311\"\210\307Q\202*\n\375=\203`\372 \210\374 \342 fghijk\\\257 l\307Q\202*\n\376=\203\251l\203\243\377l@lA@\"\210\333l8f\370l8g\332l8h\201wl8i\201xl8j\362l8k\353l8\\\307Q\202*\n\201y=\203\274\307Q\201z \210\202*\307Q\202*Q\370=\203*\n\201{Y\203\350\n\201|X\203\350R\355_\n\201{Z\\R\202*\n\201}=\203 \336dbcab`aR`\307R\202*\n\201~=\204*\201\n\"\210\307d\350\211cb\350\211a`\307Qm\203\205iS\246\307V\203BH \310OR\202h\201\200 !\203X\201\201H \310OPR\202eH S\310O\211R\307\354I\210db\210\332Q\201\202\201n!\210\201\203!n\201\204o\"\210I T\211\202\325)\374 pY\203\230\372 \210\321!`\310\223\210 \203\253 b\210 \310\211\223\210q\203\313\322E!p=\203\313\201\205q@qA\"\210\310q\324!\210EC\201\206C!\203\345\201\207C\310\311#C\202\317CF\201\207C\310\311#C\322C!\306!=\203~rs\201\210C!\210`@U\204Fs\311=\204Fs\201\211=\204FEC=\2035s\201\212=\204F \203Fs\201\213=\203eEC=\204etb\210\201\214\307!\210\321!b\210\201\215`C\"\204e\201\214\350!\210u\203}`\321!Y\203}\212db\210\201\214\350!\210))CF=\203\351v\307V\203\246\212\321\201\216p!!b\210v[y\210\201\217 \210e`|\210)@\310\211\223.\207" [proc i char funny count save-point process-buffer 0 nil t selected-window mapcar #[(frame) "\301!D\207" [frame frame-selected-window] 3] frame-list ((byte-code "\305\211\203/\n@\306 @!\203(\307 \211A@)!\203(\310 @ \211A@)\"\210\nA\211\204*\307\f!\203:\311\f!\210\305\207" [save-selected-window-alist elt #1=#:--cl-dolist-temp-- x save-selected-window-window nil frame-live-p window-live-p set-frame-selected-window select-window] 4)) term-handle-ansi-terminal-messages marker-buffer process-mark window-buffer vertical-motion term-check-size term-buffer-vertical-motion copy-marker point-marker current-local-map princ 4 2 string-match "[ \n ]" 1 term-down term-move-columns term-current-column term-horizontal-column term-handle-scroll term-adjust-current-row-cache decode-coding-string put-text-property face -1 9 mod 8 13 10 term-check-kill-echo-list 27 14 15 7 beep 26 " ?$" backward-delete-char 91 3 68 term-handle-deferred-scroll 77 term-current-row 55 56 term-goto save-marker old-point temp win buffer-undo-list selected last-win handled-ansi-message str str-length save-selected-window-alist save-selected-window-window newstr term-pending-delete-marker term-vertical-motion term-raw-map term-log-buffer term-terminal-state term-terminal-parameter term-width term-pager-count term-scroll-with-delete term-start-line-column pos columns old-column locale-coding-system term-insert-mode term-current-face term-kill-echo-list end term-command-hook term-terminal-previous-parameter term-terminal-previous-parameter-2 term-terminal-previous-parameter-3 term-terminal-previous-parameter-4 term-terminal-more-parameters term-scroll-start term-ansi-current-bg-color term-ansi-current-bold term-ansi-current-color term-ansi-current-invisible term-ansi-current-reverse term-ansi-current-underline term-saved-cursor term-pager-old-local-map term-pager-old-filter term-pager-filter term-height term-pending-frame term-scroll-to-bottom-on-output scroll term-home-marker term-scroll-show-maximum-output term-buffer-maximum-size 5 6 99 term-reset-terminal 48 57 59 63 term-handle-ansi-escape zerop " " make-local-variable process-filter set-process-filter term-display-line window-minibuffer-p next-window select-window all this others recenter pos-visible-in-window-p get-buffer-process beginning-of-line] 10]) (defalias 'term-handle-deferred-scroll #[nil "\304 Z\211\305Y\205\212\nb\210 T!\210\n`\306\223\210S\211))\207" [term-height count term-home-marker term-vertical-motion term-current-row 0 nil] 4]) (defalias 'term-reset-terminal #[nil "\306 \210\307\310\307 \311\211\n\311\211 \f\311 \307\311\211\307\211\207" [term-current-row term-current-column term-scroll-start term-height term-scroll-end term-insert-mode erase-buffer 0 1 nil term-current-face term-ansi-current-underline term-ansi-current-bold term-ansi-current-reverse term-ansi-current-color term-ansi-current-invisible term-ansi-face-already-done term-ansi-current-bg-color] 3]) (defalias 'term-handle-colors-array #[(parameter) "\306=\203 \307\202\236\310=\203\307\202\236\311=\203!\307\202\236\312=\203,\307\202\236\313=\2037\307\202\236\314=\203B\315\202\236\316=\203M\315\202\236\317Y\203`\320X\203`\321Z\202\236\322=\203k\323\202\236\324Y\203\325X\203\322Z!\202\236\326=\203\213\323!\202\236\315\211\"\315\211\323\315\307#\323!#\204V \203 \f\203\313 \323U\203\273\327$\330$F\202\306\327% \234\330% \234F\"\202V\327 \323U\203\330\331\332!\202\334% \234\330!\323U\203\352\333\332!\202\357%!\234F\" \203\375\334\335\"\"\"\n\203V\334\336\"\"\"\202V\f\2032!\323U\203 \327&\330&F\202-\330%!\234\327%!\234F\"\202V\330% \234\327%!\234F\" \203K\334\337\"\"\"\n\203V\334\340\"\"\"\315\211#\207" [parameter term-ansi-current-bold term-ansi-current-underline term-ansi-current-reverse term-ansi-current-invisible term-ansi-current-color 1 t 4 5 7 8 24 nil 27 30 37 29 39 0 40 47 49 :background :foreground face-foreground default face-background append (:weight bold) (:underline t) (:weight bold) (:underline t) term-ansi-current-bg-color term-current-face term-ansi-face-already-done term-default-fg-color ansi-term-color-vector term-default-bg-color] 6]) (defalias 'term-handle-ansi-escape #[(proc char) "\306=\203- \307X\203\310\n\307X\203\310\n V\203  \fV\203&\f\311\nS S\"\207\312=\203]\313 \210\314 \315 Z-W\203J- Z\202Y Y\203U [\202Y\310 ][\316\")\207\317=\203\211\314 \211.SU?\205\207\315 \\.V\203\202. Z\310Z\202\205\310 ]\316\")\207\320=\203\247\321\310 \322 \\\fY\203\243\f\322 Z\310Z\202\244 ]!\207\323=\203\264\321\310 ][!\207\324=\203\276\325 !\207\326=\203\310\327 !\207\330=\203\324\331\310 ]!\207\332=\203\340\333\310 ]!\207\334=\203\354\335\310 ]!\207\336=\203\370\337\310 ]!\207\340=\203  \341=\205x\316\211/\207\342=\203 \341=\205x\343\211/\207\344=\203S0\310U\203O1\307Y\2033\3451!\2102\307Y\203?\3452!\2103\307Y\203K\3453!\210\345\n!\210\345 !\207\346=\203j\313 \210\3474\350\351\314 T\352 T#\"\207\353=\203w\354\nS S\"\207\316\207" [char term-terminal-parameter term-terminal-previous-parameter term-height term-width tcr 72 0 1 term-goto 65 term-handle-deferred-scroll term-current-row term-down t 66 67 term-move-columns term-current-column 68 74 term-erase-in-display 75 term-erase-in-line 76 term-insert-lines 77 term-delete-lines 80 term-delete-chars 64 term-insert-spaces 104 4 108 nil 109 term-handle-colors-array 110 process-send-string format "[%s;%sR" term-horizontal-column 114 term-set-scroll-region term-scroll-start term-scroll-end term-insert-mode term-terminal-more-parameters term-terminal-previous-parameter-4 term-terminal-previous-parameter-3 term-terminal-previous-parameter-2 proc] 7]) #@196 Set scrolling region. TOP is the top-most line (inclusive) of the new scrolling region, while BOTTOM is the line following the new scrolling region (e.g. exclusive). The top-most line is line 0. (defalias 'term-set-scroll-region #[(top bottom) "\306W\204\f Y\203\306\202 \nX\204 V\203\" \202#  \2062\n\306U\2051\f U?\n\307\310 [!\210\311\306\211\"\207" [top term-height term-scroll-start bottom term-scroll-end term-saved-home-marker 0 term-move-columns term-current-column term-goto term-scroll-with-delete] 3 (#$ . 70355)]) (defalias 'term-command-hook #[(string) "\306\232\203\307\207\310H\311U\2031\312\313\314#\312\313 T#\314 O\315 T\nO! \fB\211,\207\310H\316U\203@\317\314\320O!\207\307\207" [string first-colon second-colon filename fileline term-pending-frame "" t 0 26 string-match ":" 1 string-to-number 47 cd nil] 4]) (defalias 'term-display-line #[(true-file line) "\302\303! \"\207" [true-file line term-display-buffer-line find-file-noselect] 3]) (defalias 'term-display-buffer-line #[(buffer line) "\306\307\"\310\212q\210\214~\210\311 !\210`\312 \204\313  `p\223\210)\neW\204/\ndV\2034~\210\nb\210)\314 \"*\207" [buffer window pos line overlay-arrow-string overlay-arrow-position display-buffer t nil goto-line "=>" make-marker set-window-point] 3]) (defalias 'term-goto-home #[nil "\304 \210b\210\305i\211\211\207" [term-home-marker term-current-row term-current-column term-start-line-column term-handle-deferred-scroll 0] 3]) (defalias 'term-goto #[(row col) "\306 \210\203 Y\203\n\307!\210  Z\202\310 \210\311 !\210\312 !\207" [term-current-row row term-vertical-motion term-start-line-column term-current-column col term-handle-deferred-scroll 0 term-goto-home term-down term-move-columns] 2]) (defalias 'term-process-pager #[nil "\204\266\306 \307\310\311 \312\313\314 \312\"#\210\311 \315\313\314 \315\"#\210\311 \316\313\314 \316\"#\210\311 \317\320#\210\311 \321\322#\210\311 \323\324#\210\311 \325\324#\210\311 \326\327#\210\311 \330\331#\210\311 \332\333#\210\311 \334\335#\210\311 \336\337#\210\311 \340\341#\210\311 \342\f#\210\311 \343 #\210\344\345!\311 \346\347#\210\311 \350\351#\210\311 \352\353#\210\311 \354\355#\210\311 \356\357#\210\311 \360\361#\210\311 \362\363#\210\311 \364\365#\210\311 \366\367#\210\311 \370\345 B#\210 +\371 @\372!\210\373\374!\210A<\375B\376\377FA\201C \207" [term-pager-break-map map i tmp term-terminal-menu term-signals-menu make-keymap 0 nil define-key "" lookup-key current-global-map "" "" " " term-pager-page " " term-pager-line "?" term-pager-help "h" "b" term-pager-back-page "" term-pager-back-line "q" term-pager-discard "D" term-pager-disable "<" term-pager-bob ">" term-pager-eob [menu-bar terminal] [menu-bar signals] make-sparse-keymap "More pages?" [help] ("Help" . term-pager-help) [disable] ("Disable paging" . term-fake-pager-disable) [discard] ("Discard remaining output" . term-pager-discard) [eob] ("Goto to end" . term-pager-eob) [bob] ("Goto to beginning" . term-pager-bob) [line] ("1 line forwards" . term-pager-line) [bline] ("1 line backwards" . term-pager-back-line) [back] ("1 page backwards" . term-pager-back-page) [page] ("1 page forwards" . term-pager-page) [menu-bar page] current-local-map use-local-map make-local-variable term-old-mode-line-format "-- **MORE** " " [Type ? for help] " "%-" term-pager-old-local-map mode-line-format mode-line-buffer-identification force-mode-line-update] 6]) (defalias 'term-pager-line #[(lines) "\304T! Z V\203\305u\210\n\306X\203\307 S!\202\"\310\n!*\207" [lines moved deficit term-height vertical-motion -1 0 recenter term-pager-continue] 2 nil "p"]) #@78 Proceed past the **MORE** break, allowing the next page of output to appear. (defalias 'term-pager-page #[(arg) "\302 _!\207" [arg term-height term-pager-line] 3 (#$ . 74040) "p"]) (defalias 'term-pager-bob #[nil "eb\210\301!U\203\302u\210\303S!\207" [term-height vertical-motion -1 recenter] 2 nil nil]) (defalias 'term-pager-eob #[nil "b\210\301\302!\210\303\304p!!b\207" [term-home-marker recenter 0 process-mark get-buffer-process] 3 nil nil]) (defalias 'term-pager-back-line #[(lines) "\302\303Z!\210o\204\304u\210\202\305 \210\302 !\210\304u\210\306 S!\207" [lines term-height vertical-motion 1 -1 beep recenter] 3 nil "p"]) (defalias 'term-pager-back-page #[(arg) "\302 _!\207" [arg term-height term-pager-back-line] 3 nil "p"]) (defalias 'term-pager-discard #[nil "\302\303\304\305\"\210\306 !\207" [term-terminal-parameter term-height "" interrupt-process nil t term-pager-continue] 3 nil nil]) (defalias 'term-pager-disable #[nil "\203 \302\303!\210\202 \303\304 \207" [term-pager-old-local-map term-pager-count term-pager-continue nil term-update-mode-line] 2 nil nil]) (defalias 'term-pager-enable #[nil "\204\301\302 \207" [term-pager-count 0 term-update-mode-line] 1 nil nil]) (defalias 'term-pager-toggle #[nil "\203\301 \207\302 \207" [term-pager-count term-pager-disable term-pager-enable] 1 nil nil]) (byte-code "\300\301\302\"\210\300\303\302\"\210\304\305\306\307#\210\304\310\306\311#\210\304\301\306\312#\210\304\303\306\313#\207" [defalias term-fake-pager-enable term-pager-toggle term-fake-pager-disable put term-char-mode menu-enable (term-in-line-mode) term-line-mode (term-in-char-mode) (not term-pager-count) term-pager-count] 4) #@75 Provide help on commands available in a terminal-emulator **MORE** break. (defalias 'term-pager-help #[nil "\300\301!\210\302\303!\210\304\305!\207" [message "Terminal-emulator pager break help..." sit-for 0 with-electric-help #[nil "\300\301\302!!\210\303\207" [princ substitute-command-keys "\\Terminal-emulator MORE break.\nType one of the following keys:\n\n\\[term-pager-page] Move forward one page.\n\\[term-pager-line] Move forward one line.\n\\[universal-argument] N \\[term-pager-page] Move N pages forward.\n\\[universal-argument] N \\[term-pager-line] Move N lines forward.\n\\[universal-argument] N \\[term-pager-back-line] Move N lines back.\n\\[universal-argument] N \\[term-pager-back-page] Move N pages back.\n\\[term-pager-bob] Move to the beginning of the buffer.\n\\[term-pager-eob] Move to the end of the buffer.\n\\[term-pager-discard] Kill pending output and kill process.\n\\[term-pager-disable] Disable PAGER handling.\n\n\\{term-pager-break-map}\nAny other key is passed through to the program\nrunning under the terminal emulator and disables pager processing until\nall pending output has been dealt with." nil] 3]] 2 (#$ . 75729) nil]) (defalias 'term-pager-continue #[(new-count) "\306p!\307 !\210\310\n\311 \210\f\312 \"\210 \313\"\210\314!)\207" [process term-pager-old-local-map term-old-mode-line-format mode-line-format new-count term-pager-count get-buffer-process use-local-map nil force-mode-line-update set-process-filter "" continue-process term-pager-old-filter] 3]) (defalias 'term-handle-scroll #[(down) "\306 \\\307W\203 \202\nZ\307W\203 \307W\204)\307V\203\300 \307V\203\300\310`!\311b\210\203\215\307W\203c\n!\210\311\210` !\210\311\210\f`|\210 b\210 Z!\210\202\200 !\210` !\210\f`|\210 b\210!\210\312 [!\210\311\313\314\315 !\"\210\202\267\247\203\247Z\211\307W\203\247\307\316 \210\202\267\312 [!\210 !\210`\311\223\210 b\210 \311\211\223\210*)\207" [down term-scroll-start term-scroll-end scroll-needed save-top save-point term-current-row 0 copy-marker nil term-adjust-current-row-cache term-insert-char 10 abs term-process-pager term-home-marker term-scroll-with-delete term-vertical-motion term-current-column term-pager-count] 4]) #@41 Move down DOWN screen lines vertically. (defalias 'term-down #[(down &optional check-for-scroll) "\306  \203\n\204 \203\307\f! \310U\203\f\310W\2046\311\f!\210`dU\203/\f\310W\2036\f\f!Z\f\310Y\203J\312\313\f\"\210\310\211\202s \310U\203m\212\312\313\f[\"\210)\212\314y\210`\f[y\210`|\210*\310i\205z\315!)\207" [start-column check-for-scroll term-scroll-with-delete term-pager-count down term-current-row term-horizontal-column term-handle-scroll 0 term-adjust-current-row-cache term-insert-char 10 nil term-move-columns term-vertical-motion term-current-column term-start-line-column p term-height] 4 (#$ . 78019)]) (defalias 'term-unwrap-line #[nil "n?\205\300\301!\207" [insert-before-markers 10] 2]) (defalias 'term-erase-in-line #[(kind) "\305U\203\306 ` \307!\210` |\210\310\311\n\"\210*\305=?\205K`\312\306 !\205-\312\313 !? \305!\210 `|\210\f\203>\311c\210\314c\210\315 `\316\317$\210 b*\207" [kind saved-point cols term-vertical-motion wrapped 1 term-horizontal-column 0 term-insert-char 32 zerop term-current-column 10 put-text-property face default] 5]) #@240 Erases (that is blanks out) part of the window. If KIND is 0, erase from (point) to (point-max); if KIND is 1, erase from home to point; else erase from home to point-max. Should only be called when point is at the start of a screen line. (defalias 'term-erase-in-display #[(kind) "\306 \210\307=\203`d|\210\310 \207\311 \312 \n\313=\203`\202 d\f |\210\310 \210\n\313=\2038\314\315\"\210\316\211 \317 \",\207" [term-terminal-parameter term-home-marker kind end-region start-region col term-handle-deferred-scroll 0 term-unwrap-line term-current-row term-horizontal-column 1 term-insert-char 10 nil term-goto row term-current-column] 6 (#$ . 79141)]) (defalias 'term-delete-chars #[(count) "` \303!\210\304 \210b\210\305\306 \n\\\307\"\210`|)\207" [save-point term-vertical-motion count 1 term-unwrap-line move-to-column term-current-column t] 3]) (defalias 'term-insert-spaces #[(count) "`\306\211 \307!\210n\203\310u\210`\212\306\210`)\311\312 \f Z\\\313\"\210`Y\2031\314`\315\316$\210 `V\203;` |\210\nb\210\317\320 \"\210\nb+\207" [pnt-at-eol save-eol save-point term-vertical-motion term-width count nil 1 -1 move-to-column term-start-line-column t put-text-property face default term-insert-char 32] 5]) (defalias 'term-delete-lines #[(lines) "` \306 \n\n\\ TV\203!\n\n\n\\ TZZ\n\307\n!\210 `|\210\307 T\nZ\nZ!\210\310\311\n\"\210\f \n b,\207" [term-current-column term-start-line-column save-current-row save-start-line-column save-current-column start term-current-row term-down term-insert-char 10 lines term-scroll-end] 4]) (defalias 'term-insert-lines #[(lines) "`\306 \307  \n\fW\203) \f\nZZ \310\f\nZ!\210` \202L\n \\TV\203A \n \\TZZ \310T\nZ Z!\210`\310 !\210 `|\210 b\210\f \n\311\312 \"\210 b-\207" [term-current-column term-start-line-column save-current-row save-start-line-column save-current-column start-deleted nil term-current-row term-down term-insert-char 10 start term-scroll-start lines term-scroll-end] 5]) #@49 Record raw inferior process output in a buffer. (defalias 'term-start-output-log #[(name) "\203\n\302\232\203\303\304\305!\207\306!\204'\212\307!q\210\310 \210\311p!\210\312 \210)\306!\304\313\314 !\"\207" [name term-log-buffer "" nil message "Output logging off." get-buffer get-buffer-create fundamental-mode buffer-disable-undo erase-buffer "Recording terminal emulator output into buffer \"%s\"" buffer-name] 4 (#$ . 81170) (list (if term-log-buffer nil (read-buffer "Record output in buffer: " (format "%s output-log" (buffer-name (current-buffer))) nil)))]) #@43 Discontinue raw inferior process logging. (defalias 'term-stop-output-log #[nil "\300\301!\207" [term-start-output-log nil] 2 (#$ . 81751) nil]) #@56 Put the end of the buffer at the bottom of the window. (defalias 'term-show-maximum-output #[nil "db\210\300\301!\207" [recenter -1] 2 (#$ . 81902) nil]) #@83 This hook is run when term is loaded in. This is a good place to put keybindings. (defvar term-load-hook nil (#$ . 82062)) (run-hooks 'term-load-hook) #@114 *If non-nil, automatically list possibilities on partial completion. This mirrors the optional behavior of tcsh. (defvar term-completion-autolist nil (#$ . -82220)) #@265 *If non-nil, add a `/' to completed directories, ` ' to file names. If a cons pair, it should be of the form (DIRSUFFIX . FILESUFFIX) where DIRSUFFIX and FILESUFFIX are strings added on unambiguous or exact completion. This mirrors the optional behavior of tcsh. (defvar term-completion-addsuffix t (#$ . -82392)) #@186 *If non-nil, use shortest completion if characters cannot be added. This mirrors the optional behavior of tcsh. A non-nil value is useful if `term-completion-autolist' is non-nil too. (defvar term-completion-recexact nil (#$ . -82714)) #@180 *List of suffixes to be disregarded during file completion. This mirrors the optional behavior of bash and tcsh. Note that this applies to `term-dynamic-complete-filename' only. (defvar term-completion-fignore nil (#$ . -82958)) #@169 Prefix prepended to absolute file names taken from process input. This is used by term's and shell's completion functions, and by shell's directory tracking functions. (defvar term-file-name-prefix "" (#$ . 83195)) (defalias 'term-directory #[(directory) "\302\303!\203 P\202!\207" [directory term-file-name-prefix expand-file-name file-name-absolute-p] 3]) #@192 Return the word of WORD-CHARS at point, or nil if none is found. Word constituents are considered to be those in WORD-CHARS, which is like the inside of a "[...]" (see `skip-chars-forward'). (defalias 'term-word #[(word-chars) "\212`\304\305Q\306\305Q\307 \310\311#\203\312u\210l\206\313 !?\205/\314\n\315P \"\210\316\224\316\225{,\207" [word-chars non-word word limit "[" "]" "[^" re-search-backward nil move 1 looking-at re-search-forward "+" 0] 5 (#$ . 83567)]) #@113 Return the filename at point, or nil if none is found. Environment variables are substituted. See `term-word'. (defalias 'term-match-partial-filename #[nil "\301\302!\211\205 \303!)\207" [filename term-word "~/A-Za-z0-9+@:_.$#,={}-" substitute-in-file-name] 3 (#$ . 84049)]) #@210 Dynamically perform completion at point. Calls the functions in `term-dynamic-complete-functions' to perform completion until a function returns non-nil, at which point completion is assumed to have occurred. (defalias 'term-dynamic-complete #[nil "\211\205 @ ?\205 A\211\204\302)\207" [term-dynamic-complete-functions functions nil] 2 (#$ . 84335) nil]) #@691 Dynamically complete the filename at point. Completes if after a filename. See `term-match-partial-filename' and `term-dynamic-complete-as-filename'. This function is similar to `term-replace-by-expanded-filename', except that it won't change parts of the filename already entered in the buffer; it just adds completion characters to the end of the filename. A completions listing may be shown in a help buffer if completion is ambiguous. Completion is dependent on the value of `term-completion-addsuffix', `term-completion-recexact' and `term-completion-fignore', and the timing of completions listing is dependent on the value of `term-completion-autolist'. Returns t if successful. (defalias 'term-dynamic-complete-filename #[nil "\300 \205\301 \302 =\204\303\304!\210\305 \207" [term-match-partial-filename selected-window minibuffer-window message "Completing file name..." term-dynamic-complete-as-filename] 2 (#$ . 84706) nil]) #@110 Dynamically complete at point as a filename. See `term-dynamic-complete-filename'. Returns t if successful. (defalias 'term-dynamic-complete-as-filename #[nil "\306 \307\f\204\310\202\f:\204\311\202\f@\f\204\"\310\202-\f:\204+\312\202-\fA\313 \2065\310\314!\315! \203O\316!\202Q!\"\317 \"\"#\320 \321 =$#\204r\322\323\"\210\306\202\"#\307=\203\214\f\203\200\312c\210$\204\"\322\324!\210\202\"#\310\230\203\231\325 \210\202\"\326\"!#P%\327#! G\306Oc\210\317#\"\"9\203\322\330%!\203\302 \202\304c\210$\204!\322\331!\210\202!&\203\f\203 #\230\203\332%!\203\330%!\203\365 \202\367c\210$\204!\322\333!\210\202!'\204 #\230\203\325 \210\202!$\204!\322\334!\210) . \207" [completion-ignore-case term-completion-fignore completion-ignored-extensions success term-completion-addsuffix dirsuffix nil t "" "/" " " term-match-partial-filename file-name-directory file-name-nondirectory term-directory file-name-completion selected-window minibuffer-window message "No completions of %s" "Sole completion" term-dynamic-list-filename-completions file-name-as-directory directory-file-name file-directory-p "Completed" file-exists-p "Completed shortest" "Partially completed" filesuffix filename pathdir pathnondir default-directory directory completion mini-flag file term-completion-recexact term-completion-autolist] 3 (#$ . 85657)]) #@475 Dynamically expand and complete the filename at point. Replace the filename with an expanded, canonicalized and completed replacement. "Expanded" means environment variables (e.g., $HOME) and `~'s are replaced with the corresponding directories. "Canonicalized" means `..' and `.' are removed, and the filename is made absolute instead of relative. For expansion see `expand-file-name' and `substitute-in-file-name'. For completion see `term-dynamic-complete-filename'. (defalias 'term-replace-by-expanded-filename #[nil "\300\301\302 !\303\211#\210\304 \207" [replace-match expand-file-name term-match-partial-filename t term-dynamic-complete-filename] 4 (#$ . 87087) nil]) #@590 Dynamically complete STUB from CANDIDATES list. This function inserts completion characters at point by completing STUB from the strings in CANDIDATES. A completions listing may be shown in a help buffer if completion is ambiguous. Returns nil if no completion was inserted. Returns `sole' if completed with the only completion match. Returns `shortest' if completed with the shortest of the completion matches. Returns `partial' if completed as far as possible with the completion matches. Returns `listed' if a completion listing was shown. See also `term-dynamic-complete-filename'. (defalias 'term-dynamic-simple-complete #[(stub candidates) "\306\307\310 \"\311\n \"\211\204\312\313\n\"\210\306\202\214 G\314U\203G @\211\n\230\2030\312\315!\210\202;\f\nG\306Oc\210\312\316!\210 \203B\317c\210)\320\202\214\321\n \"\211\nG\306Oc\210\203s \203s\n\f\230\203s\f \235\203s\317c\210\312\322!\210\323\202\213\204~\n\f\230\203\206\324 !\210\325\202\213\312\326!\210\327)+\207" [completion-ignore-case candidates stub completions completion term-completion-addsuffix nil mapcar #[(x) "C\207" [x] 1] all-completions message "No completions of %s" 1 "Sole completion" "Completed" " " sole try-completion "Completed shortest" shortest term-dynamic-list-completions listed "Partially completed" partial term-completion-recexact term-completion-autolist] 4 (#$ . 87773)]) #@68 List in help buffer possible completions of the filename at point. (defalias 'term-dynamic-list-filename-completions #[nil "\306\307 \206\310\311 !\312 !\n\203\313\n!\202\f\314 \"\211\203.\315!\2022\316\317 \".\207" [completion-ignore-case filename pathdir pathnondir default-directory directory nil term-match-partial-filename "" file-name-directory file-name-nondirectory term-directory file-name-all-completions term-dynamic-list-completions message "No completions of %s" completions] 4 (#$ . 89171) nil]) #@77 List in help buffer sorted COMPLETIONS. Typing SPC flushes the help buffer. (defalias 'term-dynamic-list-completions #[(completions) "\306 \307\220\310\311 \312\"!\221\210\313\314!\210\315\211\212\316\307!q\210\317\315!\211\320H\211:\205O\321\n\211:\2036\322\f8\202<\323 `\324\320F)\320 8)!\316\307!=\205O\325 !\326=)\203]\326\n!\210\327!\202o\n\330=\203i\327!\202o\331 !\211+\207" [conf completions first key event position current-window-configuration "*Completions*" display-completion-list sort string-lessp message "Hit space to flush" nil get-buffer read-key-sequence 0 window-buffer 1 selected-window (0 . 0) key-binding mouse-choose-completion set-window-configuration 32 listify-key-sequence unread-command-events] 6 (#$ . 89706)]) #@295 Make a term process NAME in a buffer, running PROGRAM. The name of the buffer is NAME. If there is already a running process in that buffer, it is not restarted. Optional third arg STARTFILE is the name of a file to send the contents of to the process. Any more args are arguments to PROGRAM. (defalias 'term-ansi-make-term #[(name program &optional startfile &rest switches) "\305!\306 !\204\212 q\210\307 \210)\310 \n \f%\210 )\207" [name buffer program startfile switches get-buffer-create term-check-proc term-mode term-exec] 6 (#$ . 90473)]) (byte-code "\301B\302\301!\204\303\301\304\"\210\305B\302\305!\204\303\305\304\"\210\306B\302\306!\204-\303\306\304\"\210\304\207" [current-load-list term-ansi-buffer-name default-boundp set-default nil term-ansi-default-program term-ansi-buffer-base-name] 3) #@44 Start a terminal-emulator in a new buffer. (defalias 'ansi-term #[(program &optional new-buffer-name) "\203\202 \203 \304=\203\305\n!\202 \202\306\307 \307Q\310 !\311 \n\"\211q\210\312 \210\313 \210\314\315!\210\316 !\207" [new-buffer-name term-ansi-buffer-base-name program term-ansi-buffer-name t file-name-nondirectory "ansi-term" "*" generate-new-buffer-name term-ansi-make-term term-mode term-char-mode term-set-escape-char 24 switch-to-buffer] 4 (#$ . 91303) (list (read-from-minibuffer "Run program: " (or explicit-shell-file-name (getenv "ESHELL") (getenv "SHELL") "/bin/sh")))]) (provide 'term)