;ELC ;;; compiled by kwzh@nutrimat.gnu.ai.mit.edu on Thu Jun 15 16:32:57 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/term.el ;;; emacs version 19.28.94.2. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.28.90"))) (error "`term.el' was compiled for Emacs 19.29 or later")) (byte-code "\nB!!" ["0.95" term-protocol-version current-load-list require ring ehelp] 2) #@29 Size of input history ring. (defvar term-input-ring-size 32 (#$ . 575)) (byte-code " B B B! B!! B!. B!;\n B!H B B!Y B!f B B B!{ B! B B! B! B B! B! B B! B B! B BƇ" [term-height current-load-list term-width term-home-marker boundp term-saved-home-marker nil term-start-line-column 0 term-current-column term-current-row term-insert-mode term-vertical-motion term-terminal-state term-kill-echo-list term-terminal-parameter term-terminal-previous-parameter term-current-face default term-scroll-start term-scroll-end term-pager-count term-saved-cursor term-command-hook term-log-buffer term-scroll-with-delete term-pending-delete-marker term-old-mode-map term-old-mode-line-format term-pager-old-local-map term-pager-old-filter] 2) #@75 *If non-nil, is file name to use for explicitly requested inferior shell. (defvar explicit-shell-file-name nil (#$ . -1473)) #@371 Regexp to recognise 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 "^" (#$ . 1605)) #@380 List of characters to recognise 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 (#$ . 2026)) #@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. (defvar term-input-autoexpand nil (#$ . -2466)) #@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. (defvar term-input-ignoredups nil (#$ . -2914)) #@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. (defvar term-input-ring-file-name nil (#$ . -3111)) #@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. (defvar term-scroll-to-bottom-on-output nil (#$ . -3364)) #@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. (defvar term-scroll-show-maximum-output nil (#$ . -3780)) (byte-code "! B‡" [boundp term-pending-frame nil current-load-list] 2) #@307 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 (quote term-get-old-input-default) (#$ . 4134)) #@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 (quote (term-replace-by-expanded-history term-dynamic-complete-filename)) (#$ . 4522)) #@188 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) "\n\"?" [string-match "\\`\\s *\\'" str] 3] (#$ . 4843)) #@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 (#$ . 5131)) #@289 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 (quote term-simple-send) (#$ . 5350)) #@87 *Non-nil means go to the end of the line before sending input. See `term-send-input'. (defvar term-eol-on-send t (#$ . -5708)) #@80 Called upon entry into term-mode This is run before the process is cranked up. (defvar term-mode-hook nil (#$ . 5841)) #@317 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, the term-mode-hook is only executed once when the buffer is created. (defvar term-exec-hook nil (#$ . 5967)) (byte-code "! B‡" [boundp term-mode-map nil current-load-list] 2) #@71 Keyboard map for sending characters directly to the inferior process. (defvar term-raw-map nil (#$ . 6405)) #@112 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 (#$ . 6520)) (byte-code "! B! B‡" [boundp term-raw-escape-map nil current-load-list term-pager-break-map] 2) #@124 True if communications via pty; false if by pipe. Buffer local. This is to work around a bug in emacs process signalling. (defvar term-ptyp t (#$ . 6795)) #@95 Last string searched for by term input history search, for defaulting. Buffer local variable. (defvar term-last-input-match "" (#$ . 6957)) (byte-code "! B B B‡" [boundp term-input-ring nil current-load-list term-last-input-start term-last-input-end] 2) #@40 Index of last matched history element. (defvar term-input-ring-index nil (#$ . 7231)) #@47 Input previously used to match input history. (defvar term-matching-input-from-input-string "" (#$ . 7323)) (byte-code "! B########" [boundp term-pager-filter t current-load-list 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-if-emacs19 '(macro . #[(&rest forms) "\n\"\n\fB" [string-match "^19" emacs-version progn forms] 3])) (defalias 'term-is-xemacs '(macro . #[nil "" [(string-match "Lucid" emacs-version)] 1])) (defalias 'term-if-xemacs '(macro . #[(&rest forms) "\n\"\n\fB" [string-match "Lucid" emacs-version progn forms] 3])) (defalias 'term-ifnot-xemacs '(macro . #[(&rest forms) "\n\"? \fB" [string-match "Lucid" emacs-version progn forms] 3])) (defalias 'term-in-char-mode '(macro . #[nil "" [(eq (current-local-map) term-raw-map)] 1])) (defalias 'term-in-line-mode '(macro . #[nil "" [(not (term-in-char-mode))] 1])) (defalias 'term-pager-enabled '(macro . #[nil "" [term-pager-count] 1])) (defalias 'term-handling-pager '(macro . #[nil "" [term-pager-old-local-map] 1])) (defalias 'term-using-alternate-sub-buffer '(macro . #[nil "" [term-saved-home-marker] 1])) (byte-code " B B" [term-signals-menu current-load-list term-terminal-menu] 2) #@1435 Major mode for interacting with an inferior interpreter. Interpreter name is same as buffer name, sans the asterisks. In line sub-mode, return at end of buffer sends line as input, while return not at end copies rest of line to end and sends it. In char sub-mode, each character (except `term-escape-char`) is set immediately. This mode is typically customised to create inferior-lisp-mode, shell-mode, etc.. 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. An input history is maintained of size `term-input-ring-size', and can be accessed 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. \{term-mode-map} Entry to this mode runs the hooks on term-mode-hook (defalias 'term-mode #[nil " !!!!!! S S\f!!! ! !!!!!!ek!!!z}!K!!!!!!!!\f'!!!!!!!!!!!!!!!!!!!!!! =!!?@A!#!B " [kill-all-local-variables term-mode major-mode "Term" mode-name use-local-map term-mode-map make-local-variable term-home-marker copy-marker 0 term-saved-home-marker term-height term-width 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 nil term-command-hook 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 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-pending-delete-marker term-current-face term-pending-frame run-hooks term-mode-hook term-update-mode-line] 2 (#$ . 8770) nil]) (byte-code " ##########################\"\")" [get-buffer-process buffer proc process-status (run stop)] 3 (#$ . 19518)]) #@326 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) "\nQ! ! q ) \n % )" [get-buffer-create "*" name buffer term-check-proc term-mode term-exec program startfile switches] 6 (#$ . 19800)]) #@44 Start a terminal-emulator in a new buffer. (defalias 'term #[(program) "\n\"q !" [make-term "terminal" program term-mode term-char-mode switch-to-buffer "*terminal*"] 3 (#$ . 20360) (list (read-from-minibuffer "Run program: " (or explicit-shell-file-name (getenv "ESHELL") (getenv "SHELL") "/bin/sh")))]) #@248 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) "q!\n!) $!\n db\n!`̓\n\"Q!db!`d{`d|\n\"!*" [buffer get-buffer-process proc delete-process term-exec-1 name command switches make-local-variable term-ptyp process-connection-type process-mark nil set-process-filter term-emulate-terminal startfile sleep-for 1 insert-file-contents term-send-string run-hooks term-exec-hook] 6 (#$ . 20683)]) (byte-code "! B" [boundp term-term-name "eterm" current-load-list] 2) #@31 termcap capabilties 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=\\n:te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h: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" (#$ . 21475)) (defalias 'term-exec-1 #[(name buffer command switches) "\n\"!\f\" \n \n%\f # \"\n\" \n#& )" [format "TERM=%s" term-term-name boundp system-uses-terminfo "TERMINFO=%s" data-directory term-termcap-format "TERMCAP=" term-height term-width "EMACS=%s (term:%s)" emacs-version term-protocol-version "LINES=%d" "COLUMNS=%d" process-environment apply start-process name buffer "/bin/sh" "-c" "stty -nl echo rows %d columns %d sane 2>/dev/null;if [ $1 = .. ]; then shift; fi; exec \"$@\"" ".." command switches] 10]) #@101 Test to see if ITEM is equal to an item in LIST. Option comparison function ELT= defaults to equal. (defalias 'term-mem #[(item list &optional elt=) "\f$ $ \f@\"\f\fA\f *" [elt= equal nil done list item] 4 (#$ . 22507)]) #@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) "\n\f‡!\f\"! !\f Ўq~ !db  W#֔֕{n\f!n\f\"u\f\") T B*\f‰," [term-input-ring-file-name "" nil file-readable-p silent message "Cannot read history file %s" get-buffer-create " *temp*" 0 make-ring term-input-ring-size ring count file history-buf ((kill-buffer history-buf)) erase-buffer insert-file-contents re-search-backward "^[ ]*\\([^#\n].*\\)[ ]*$" t 1 history term-input-ignoredups ring-empty-p ring-ref ring-insert-at-beginning term-input-ring term-input-ring-index] 6 (#$ . 22760)]) #@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 "\n\n!ć!!\"!\n\n \f !\nq VSS \"ұ: \f%!-" [term-input-ring-file-name "" term-input-ring ring-empty-p nil file-writable-p message "Cannot write history file %s" get-buffer-create " *Temp Input History*" history-buf ring file ring-length index erase-buffer 0 ring-ref 10 write-region buffer-string no-message kill-buffer] 6 (#$ . 24015)]) #@49 List in help buffer the buffer's input history. (defalias 'term-dynamic-list-input-ring #[nil " !\f !! !S  \n \f\nY: \n\"\fB\f\nS\n\" \f! qy#X!I!! =s !yC-" [ring-p term-input-ring ring-empty-p message "No history" nil " *Input History*" ring-length current-window-configuration conf index history-buffer history 0 ring-ref display-completion-list 3 search-backward "completion" move replace-match "history reference" sit-for "Hit space to flush" read-event ch 32 set-window-configuration unread-command-events] 6 (#$ . 24809) nil]) (defalias 'term-regexp-arg #[(prompt) "\n\f%ǘ A@ !+D" [nil minibuffer-history-sexp-flag last-command read-from-minibuffer prompt minibuffer-history-search-history regexp "" prefix-numeric-value current-prefix-arg] 7]) (defalias 'term-search-arg #[(arg) " !  !!U# ʇ" [term-after-pmark-p error "Not at command line" term-input-ring ring-empty-p "Empty input ring" arg 0 nil term-input-ring-index 1] 2]) (defalias 'term-search-start #[(arg) "\nVĂ\\!\"\nY Ç!S" [term-input-ring-index mod arg 0 1 -1 ring-length term-input-ring] 4]) #@95 Return the string ARG places along the input ring. Moves relative to `term-input-ring-index'. (defalias 'term-previous-input-string #[(arg) " \n\f\n\\ !\"\f\"" [ring-ref term-input-ring term-input-ring-index mod arg ring-length] 6 (#$ . 26030)]) #@40 Cycle backwards through input history. (defalias 'term-previous-input #[(arg) "\n\"" [term-previous-matching-input "." arg] 3 (#$ . 26292) "*p"]) #@39 Cycle forwards through input history. (defalias 'term-next-input #[(arg) " [!" [term-previous-input arg] 2 (#$ . 26447) "*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) " \n\" \")" [term-previous-matching-input-string-position regexp arg pos ring-ref term-input-ring] 4 (#$ . 26583)]) #@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) " !\f !! !V ɂ!  -! Z\"U \\\"W \"\" \\\"UVVST= \"\"-" [ring-p term-input-ring ring-empty-p error "No history" ring-length len arg 0 1 -1 motion mod start term-search-start n nil tried-each-ring-item prev string-match regexp ring-ref] 6 (#$ . 26887)]) #@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) " ! \"!*\f\fT\"p!!`| \f\"c)" [term-search-arg arg term-previous-matching-input-string-position regexp pos error "Not found" term-input-ring-index message "History item: %d" process-mark get-buffer-process ring-ref term-input-ring] 4 (#$ . 27479) (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) " \n[\"" [term-previous-matching-input regexp arg] 3 (#$ . 28085) (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) ">p!!`{\f!P\n\"" [last-command (term-previous-matching-input-from-input term-next-matching-input-from-input) process-mark get-buffer-process term-matching-input-from-input-string nil term-input-ring-index term-previous-matching-input "^" regexp-quote arg] 4 (#$ . 28490) "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) " [!" [term-previous-matching-input-from-input arg] 2 (#$ . 29086) "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) ", \",y!), !\f! U)?" [term-input-autoexpand string-match "[!^]" term-get-old-input 0 looking-at term-prompt-regexp buffer-modified-tick previous-modified-tick message "Expanding history references..." term-replace-by-expanded-history-before-point silent] 3 (#$ . 29465) 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) "`)`Z!`Ċ` Z)w`` Z)WhU7\n`\">`Tb!Oʕb!!ϔϕ{!S!X!֔֕#׉#T\"ʕb!)!!!ϔϕ#׉#!!6ϔϕ֔ ֕! !{\" $!*) *)\"!P\"*.ʕb/1! 1..\"#׉#.T\".!ϔϕ{֔֕{.56!׉#`.ʔb6.#r/}!}5׉#!+ʕb+" [nil term-bol start toend "^!^" term-input-ring-index 92 term-within-quotes looking-at "![0-9]+\\($\\|[^-]\\)" 0 message "Absolute reference cannot be expanded" "!-\\([0-9]+\\)\\(:?[0-9^$*-]+\\)?" string-to-number 1 number ring-length term-input-ring 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^$*-]+\\)?" mb1 me1 mb2 me2 exp match-data match-data ((store-match-data match-data)) "!\\?" "" "^" pref match-data ((store-match-data match-data)) term-previous-matching-input-string-position regexp-quote pos silent "Not found" ding ring-ref 4 "\\^\\([^^]+\\)\\^?\\([^^]*\\)\\^?" new old search-forward error "History item: substituted"] 6 (#$ . 30516)]) #@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) " \n!" [term-replace-by-expanded-history self-insert-command arg] 2 (#$ . 31937) "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) "\n #\n #\"U \"U*" [term-how-many-region "\\(^\\|[^\\\\]\\)'" beg end "\\(^\\|[^\\\\]\\)\"" countdq countsq mod 2 1] 5 (#$ . 32212)]) #@54 Return number of matches for REGEXP from BEG to END. (defalias 'term-how-many-region #[(regexp beg end) " Ď b# T + )" [0 count match-data match-data ((store-match-data match-data)) beg re-search-forward regexp end t] 4 (#$ . 32504)]) (defalias 'term-args #[(string begin end) " Ž  #w f= T  {\n\n\"/͂J\n\";ƂJ\nϘFǂJ\n!\n\"Xǂm\n\"k\nƕO!m #+*" [match-data match-data ((store-match-data match-data)) begin term-arguments string 0 nil 58 end range string-match "^[*^]" 1 "^-" "$" string-to-number nth "[-*$]$" "-" mth] 4]) (defalias 'term-delim-arg #[(arg) " C G \fW\\ H >9 \fWN H=N T$ \fWN H>N T:  OB*+" [term-delimiter-argument-list arg nil 0 len pos args start 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) "‰ \n \" X{\n #{H”UH• DΔm O `  Bf !  TΔ”• O  B !  TS  ZS #.\n" ["[^ \n \"'`]+\\|\\(\"[^\"]*\"\\|'[^']*'\\|`[^`]*`\\)" nil 0 quotes value str beg count pos args argpart mth string-match string 1 term-delim-arg nth m n mapconcat #[(a) "" [a] 1] " "] 8 (#$ . 33326)]) #@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 "p!! ! !`Y/ ) `{2 \f =@\fG! `{ =Ui! `{ `|c){ !b )!!!\"\"@P!A) ! ʓ\"`ʓ$!$ |$ʓ !`ʓ b% \".)" [get-buffer-process proc error "Current buffer has no process" process-mark pmark marker-position pmark-val input-is-new term-eol-on-send nil term-get-old-input intxt term-input-autoexpand input term-replace-by-expanded-history t history copy term-pager-count term-current-row term-input-filter term-input-ignoredups ring-p term-input-ring ring-empty-p ring-ref 0 ring-insert term-input-filter-functions functions "\n" term-input-ring-index term-last-input-start term-last-input-end marker-buffer term-pending-delete-marker term-input-sender] 4 (#$ . 34150) nil]) #@114 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 "y `\n`{*" [0 term-skip-prompt beg nil] 2 (#$ . 36953)]) #@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 " p!\n!\n!b c*" [term-get-old-input get-buffer-process process input error "Current buffer has no process" process-mark] 3 (#$ . 37184) nil]) #@127 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 "`) !ĕ Xĕb)" [nil eol looking-at term-prompt-regexp 0] 2 (#$ . 37496)]) #@43 Is point after the process output marker? (defalias 'term-after-pmark-p #[nil "p!!!`X)" [marker-position process-mark get-buffer-process proc-pos] 5 (#$ . 37749)]) #@141 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) " \n\" \"" [term-send-string proc string "\n"] 3 (#$ . 37926)]) #@291 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) "y ?\n " [0 arg term-skip-prompt] 1 (#$ . 38186) "P"]) #@598 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) "\f %\fG\"#*\f! U=‰URURUX‰Ue UU!P GV O É!!!-" ["" 0 t nil done cursor-in-echo-area echo-keystrokes c ans stars message "%s%s" prompt make-string 42 read-char 7 quit-flag 13 10 27 21 8 127 char-to-string -1 "Quit" beep] 7 (#$ . 38572)]) #@255 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) ";\n\"\fp!\f!B\f\"\f\"" [str term-read-noecho "Non-echoed text: " t proc get-buffer-process error "Current buffer has no process" term-kill-echo-list nil term-send-string "\n"] 3 (#$ . 39601) "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 (#$ . -40145)) #@323 Send PROCESS the contents of STRING 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\n^  O\" W/ \n\\  ^O\")*" [str len term-input-chunk-size i process-send-string proc 0 next-i accept-process-output] 7 (#$ . 40343)]) #@183 Sends 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) " \n {\"" [term-send-string proc start end] 4 (#$ . 40877)]) #@52 Kill all output from interpreter since last input. (defalias 'term-kill-output #[nil "p!!\f\n\"\nbc\n`Ɠ)" [process-mark get-buffer-process pmark kill-region term-last-input-end "*** output flushed ***\n" nil] 3 (#$ . 41175) 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 y `\"" [term-last-input-end backward-char 0 set-window-start selected-window nil] 3 (#$ . 41422) nil]) #@31 Interrupt the current subjob. (defalias 'term-interrupt-subjob #[nil "\n\"" [interrupt-process nil term-ptyp] 3 (#$ . 41706) nil]) #@41 Send kill signal to the current subjob. (defalias 'term-kill-subjob #[nil "\n\"" [kill-process nil term-ptyp] 3 (#$ . 41846) nil]) #@41 Send quit signal to the current subjob. (defalias 'term-quit-subjob #[nil "\n\"" [quit-process nil term-ptyp] 3 (#$ . 41986) nil]) #@290 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 "\n\"" [stop-process nil term-ptyp] 3 (#$ . 42127) 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 "\n\"" [continue-process nil term-ptyp] 3 (#$ . 42517) nil]) #@63 Kill all text from last stuff output by interpreter to point. (defalias 'term-kill-input #[nil "p!!\n!`\fV\n`\"*" [process-mark get-buffer-process pmark marker-position p-pos kill-region] 3 (#$ . 42735) 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 \n!" [process-send-eof delete-char arg] 2 (#$ . 42960) "p"]) #@46 Send an EOF to the current buffer's process. (defalias 'term-send-eof #[nil " " [process-send-eof] 1 (#$ . 43160) 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) "\nQ\fVł \f$`)\n-! 4\nb!*" [term-prompt-regexp ".*" regexp re arg 0 1 re-search-backward nil t pos message "Not found" ding term-bol] 6 (#$ . 43289) (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) " \n[\"" [term-backward-matching-input regexp arg] 3 (#$ . 43818) (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) "\nV\fĂ \n! )" [term-prompt-regexp paragraph-start n 0 1 forward-paragraph term-skip-prompt] 2 (#$ . 44236) "p"]) #@77 Move to end of Nth previous prompt in the buffer. See `term-prompt-regexp'. (defalias 'term-previous-prompt #[(n) " [!" [term-next-prompt n] 2 (#$ . 44476) "p"]) (defalias 'term-source-default #[(previous-dir/file source-modes) " \n>!!B B" [buffer-file-name major-mode source-modes file-name-directory file-name-nondirectory previous-dir/file default-directory nil] 3]) (defalias 'term-check-source #[(fname) " !&\n!&\n!\"!&p\nq q))" [get-file-buffer fname buff buffer-modified-p y-or-n-p format "Save buffer %s first? " buffer-name old-buffer save-buffer] 6]) #@66 Returns string around POINT that starts the current line or nil. (defalias 'term-extract-string #[nil "`y``b\n#`Tb\f#)`S\n:\n:\n{." [point 0 bol nil eol search-backward "\"" t start search-forward end] 4 (#$ . 45086)]) (defalias 'term-get-source #[(prompt prev-dir/file source-modes mustmatch-p) " \n\" ȏ !?\n# !% @\f\n2 !4 AF#H\fP$!!.C" [term-source-default prev-dir/file source-modes def term-extract-string stringfile nil (file-exists-p stringfile) ((error)) file-directory-p sfile-p file-name-directory defdir file-name-nondirectory deffile read-file-name format "%s(default %s) " prompt mustmatch-p ans expand-file-name substitute-in-file-name] 6]) (defalias 'term-proc-query #[(proc str) " ! !\n!\nq\n!\f!  \" ! \"?T ! \f\"! \"M!S \")," [process-buffer proc proc-buf process-mark proc-mark display-buffer get-buffer-window marker-position proc-pt proc-win term-send-string str accept-process-output pos-visible-in-window-p window-point opoint set-window-point sit-for 0 push-mark] 3]) (defalias 'term-horizontal-column #[nil " Z" [term-current-column term-start-line-column] 2]) (defalias 'term-vertical-motion '(macro . #[(count) "\nE" [funcall term-vertical-motion count] 3])) (defalias 'buffer-vertical-motion #[(count) "U i _!Vfi \\i \\\\ ] XEmE Zu\" Y] V] Z\\\\d _!*[i \\\\ ] Xyo Z l Y V Z\\\\ ZZ _!*" [count 0 move-to-column term-width nil todo H -1 1 backward-char] 4]) (defalias 'term-start-line-column #[nil "`\n!i b)ć" [term-start-line-column save-pos term-vertical-motion 0 nil] 2]) (defalias 'term-current-column #[nil " i " [term-current-column nil] 2]) (defalias 'term-move-columns #[(delta) " \\\"" [term-current-column delta move-to-column t] 3]) (defalias 'term-insert-char #[(char count) "`\n \"`$)" [old-point insert-char char count put-text-property face default] 5]) (defalias 'term-current-row #[nil " d}\n![*ć" [term-current-row term-home-marker term-vertical-motion -9999 nil] 2]) (defalias 'term-adjust-current-row-cache #[(delta) "  \\" [term-current-row delta] 2]) (defalias 'term-terminal-pos #[nil "  !\fiZ ! \n,B" [term-current-column nil y x save-col term-vertical-motion 0 term-height] 3]) (defalias 'term-emulate-terminal #[(proc str) "p \n  GЎ!q!@!|É p=SK!WK!!`!Ur !bd!V =e!}\"!=#P#G!\nW\nH!W\n# \nV!=!! \nZ \\*Z\nXC\nV\nZ\n\\C+,\"!V8!*^\n\\/0C\n/0` `dUc1V!! `|j \\/\n Oc `5$\n=!! S!\f= \"[\\\\\"W\f\"/\f=\nT\nW\nH=`dU+>,c!0/\n!/\f=,>  @A\"\f=9!\fB=G!\f=\fC=\fD=\fE=pFA!\fG=H\n#IJ\nTISO!I\nO#!)!K!\fc!=T\fL=M!MN!#NO!\fP=Q @A\"!\fR=S!!\fT=0Q U BV!\fW=NVHXV@VA\"!!!O=\fYY|\fZX|#_\fYZ\\#\f[=#N#\f\\=]\f\"!^i*V\nO#\nU_\nOP#\nSO#Idb!M`!a!`bc\"\nT)U dYQ !`Ó*bÉeK !p=Kfe@eA\"e!  g ÁA#  !!=hij !`UiA=ik=  =il=im=  =nbo!!bp` \"o!q`!Ydbo!))  =OÉ. " [previous-buffer 0 i nil char funny count save-point save-marker old-point temp win selected-window selected str str-length ((byte-code "q\n!" [previous-buffer select-window selected] 2)) process-buffer proc marker-buffer term-pending-delete-marker process-mark window-buffer vertical-motion term-vertical-motion term-check-size buffer-vertical-motion copy-marker point-marker current-local-map term-raw-map term-log-buffer princ term-terminal-state 4 term-terminal-parameter 2 string-match "[ \n ]" 1 term-move-columns term-horizontal-column term-width term-pager-count term-scroll-with-delete term-handle-scroll term-adjust-current-row-cache term-current-column term-start-line-column term-insert-mode term-insert-spaces put-text-property face term-current-face -1 9 mod 8 move-to-column term-insert-char 13 10 term-kill-echo-list term-check-kill-echo-list term-down t 27 14 15 7 beep 26 "\n" end term-command-hook backward-delete-char 91 make-local-variable term-terminal-previous-parameter 3 68 term-handle-deferred-scroll 77 term-insert-lines 55 term-current-row term-saved-cursor 56 term-goto 48 57 59 63 term-handle-ansi-escape term-pager-old-local-map " " term-pager-old-filter process-filter set-process-filter term-pager-filter term-height term-pending-frame term-display-line next-window term-scroll-to-bottom-on-output scroll select-window all this others term-home-marker recenter pos-visible-in-window-p term-scroll-show-maximum-output] 6]) (defalias 'term-handle-deferred-scroll #[nil " ZV\fb \n!\f`Ɠ S))" [term-current-row term-height count 0 term-home-marker term-vertical-motion nil] 4]) (defalias 'term-handle-ansi-escape #[(proc char) "=1\nX X V \nV* S\nS\"=B \n][\"=O\n]\"=[\n]!=h\n][!=r\n!=|\n!=\n]!=\n]!=\n]!=\n]!=\n=̉\n=2!=\n=\n=2!=\n='\n='\n= ''=% - T T#\"=1 S\n\"̇" [char 72 term-terminal-parameter 0 1 term-terminal-previous-parameter term-height term-width term-goto 65 term-handle-deferred-scroll term-down t 66 67 term-move-columns 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 term-insert-mode 47 term-switch-to-alternate-sub-buffer 108 nil 109 7 highlight term-current-face term-underline-face bold default 110 process-send-string proc format "[%s;%sR" term-current-row term-horizontal-column 114 term-scroll-region] 6]) #@194 Set scrolling region. TOP is the top-most line (inclusive) of the new scrolling region, while BOTTOM is the line folling the new scrolling region (e.g. exclusive). The top-most line is line 0. (defalias 'term-scroll-region #[(top bottom) "W\f\nY\f X\f\nV\"\n#\f3 U2 \nU?" [top 0 term-height term-scroll-start bottom term-scroll-end term-saved-home-marker term-scroll-with-delete] 2 (#$ . 51529)]) (defalias 'term-switch-to-alternate-sub-buffer #[(set) " \n?=_  4dbh=#\"  ! `ΓTU@U?  \nΓ\nΉ b \"*" [term-handle-deferred-scroll set term-saved-home-marker term-current-row term-horizontal-column col row 10 term-insert-char 1 t term-scroll-with-delete copy-marker term-home-marker nil term-scroll-start 0 term-scroll-end term-height term-current-column term-goto] 3]) (defalias 'term-command-hook #[(string) "HU4#T#OTO!\n\nB ,HUCO!χ" [string 0 26 string-match ":" 1 first-colon second-colon filename string-to-int fileline term-pending-frame 47 cd nil t] 4]) (defalias 'term-display-line #[(true-file line) "\n! \"" [term-display-buffer-line find-file-noselect true-file line] 3]) (defalias 'term-display-buffer-line #[(buffer line) " \" q~!` \n! \n\n`p) eW4 dV9~ b) \n\"*" [display-buffer buffer t window nil pos goto-line line "=>" overlay-arrow-string overlay-arrow-position make-marker set-window-point] 3]) (defalias 'term-goto-home #[nil " bi" [term-handle-deferred-scroll term-home-marker 0 term-current-row term-current-column term-start-line-column] 3]) (defalias 'term-goto #[(row col) " \n Y ! \n Z \n!\n!" [term-handle-deferred-scroll term-current-row row term-vertical-motion 0 term-start-line-column term-current-column term-goto-home term-down term-move-columns col] 2]) (defalias 'term-process-pager #[nil " \n \"#\n \"#\n \"#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n!#\n##!#########\nB#\n+ :!!>=@ABF>C " [term-pager-break-map make-keymap map 0 i nil tmp 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] term-terminal-menu [menu-bar signals] term-signals-menu make-sparse-keymap "More pages?" [help] ("Help" . term-pager-help) [disable] ("Diable 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 term-pager-old-local-map use-local-map make-local-variable term-old-mode-line-format mode-line-format "-- **MORE** " mode-line-buffer-identification " [Type ? for help] " "%-" force-mode-line-update] 6]) (defalias 'term-pager-line #[(lines) " T! \nZ\n V X S!# !*" [vertical-motion lines moved deficit backward-char 0 recenter term-height term-pager-continue] 2 nil "p"]) #@77 Proceed past the **MORE** break, allowing the next page of output to appear (defalias 'term-pager-page #[(arg) " \n_!" [term-pager-line arg term-height] 3 (#$ . 54978) "p"]) (defalias 'term-pager-bob #[nil "eb ! U S!" [vertical-motion term-height backward-char recenter] 2 nil nil]) (defalias 'term-pager-eob #[nil "b!p!!b" [term-home-marker recenter 0 process-mark get-buffer-process] 3 nil nil]) (defalias 'term-pager-back-line #[(lines) "\nZ!o  ! S!" [vertical-motion 1 lines backward-char beep term-height recenter] 3 nil "p"]) (defalias 'term-pager-back-page #[(arg) " \n_!" [term-pager-back-line arg term-height] 3 nil "p"]) (defalias 'term-pager-discard #[nil "\"!" ["" term-terminal-parameter interrupt-process nil t term-pager-continue term-height] 3 nil nil]) (defalias 'term-pager-disable #[nil " !  " [term-pager-old-local-map term-pager-continue nil term-pager-count term-update-mode-line] 2 nil nil]) (defalias 'term-pager-enable #[nil " " [term-pager-count 0 term-update-mode-line] 1 nil nil]) (defalias 'term-pager-toggle #[nil " " [term-pager-count term-pager-disable term-pager-enable] 1 nil nil]) (byte-code "\"\"####" [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) #@74 Provide help on commands available in a terminal-emulator **MORE** break (defalias 'term-pager-help #[nil "!!!" [message "Terminal-emulator pager break help..." sit-for 0 with-electric-help #[nil "!!Ç" [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 (#$ . 56437) nil]) (defalias 'term-pager-continue #[(new-count) "p! !    \" \" !)" [get-buffer-process process use-local-map term-pager-old-local-map nil term-old-mode-line-format mode-line-format force-mode-line-update new-count term-pager-count set-process-filter term-pager-old-filter "" continue-process] 3]) (defalias 'term-handle-scroll #[(down) " \\\\ ZV`! \nb L\f !`\f\f!`| b\f !\f[!\f\"vf ZWf v\f[!\f\f!\n`Ǔ b lj*) " [term-current-row down 1 term-scroll-end scroll-needed 0 copy-marker nil save-top save-point term-home-marker term-scroll-with-delete term-vertical-motion term-scroll-start term-adjust-current-row-cache term-current-column term-insert-char 10 term-pager-count term-process-pager] 4]) #@41 Move down DOWN screen lines vertically. (defalias 'term-down #[(down &optional check-for-scroll) " \n \f!!`dU*!ZV@\"\f F\fi M !)" [term-horizontal-column start-column check-for-scroll term-scroll-with-delete term-pager-count term-handle-scroll down term-adjust-current-row-cache term-vertical-motion 0 term-insert-char 10 term-current-column term-start-line-column nil term-move-columns] 3 (#$ . 58379)]) (defalias 'term-unwrap-line #[nil "n?!" [insert-before-markers 10] 2]) (defalias 'term-erase-in-line #[(kind) "V ` !` |\f\"*=?M` U- U?\n ! `|\n@cc `$ b*" [kind 1 term-horizontal-column saved-point cols term-vertical-motion 0 term-insert-char 10 term-current-column wrapped 32 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) " =`d| =!`\"d \n \f\n | =@\f\"\f \"," [term-handle-deferred-scroll term-terminal-parameter 0 term-unwrap-line term-current-row term-horizontal-column term-home-marker kind 1 end-region start-region col row term-insert-char 10 nil term-current-column term-goto] 5 (#$ . 59204)]) (defalias 'term-delete-chars #[(count) "` ! b \\\"`|)" [save-point term-vertical-motion 1 term-unwrap-line move-to-column term-current-column count t] 3]) (defalias 'term-insert-spaces #[(count) "` !n `  Z\\\" `V'` |\nb \"\nb*" [nil save-eol save-point term-vertical-motion 1 backward-char move-to-column term-start-line-column term-width count t term-insert-char 32] 4]) (defalias 'term-delete-lines #[(lines) "` !`| ZZ!\" \f b," [term-current-column term-start-line-column term-current-row save-current-row save-start-line-column save-current-column start term-down lines term-scroll-end term-insert-char 10] 4]) (defalias 'term-insert-lines #[(lines) "` \n \n\fZ Z!` !`|b \f \"b-" [nil term-current-column term-start-line-column term-current-row save-current-row save-start-line-column save-current-column start-deleted start term-down term-scroll-end lines term-insert-char 10] 5]) #@49 Record raw inferior process output in a buffer. (defalias 'term-set-output-log #[(name) "\n!!'!q p! )! !\"" [name "" nil term-log-buffer 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 (#$ . 60816) (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-photo #[nil "!" [term-set-output-log nil] 2 (#$ . 61323) nil]) #@56 Put the end of the buffer at the bottom of the window. (defalias 'term-show-maximum-output #[nil "db!" [recenter -1] 2 (#$ . 61458) nil]) #@83 This hook is run when term is loaded in. This is a good place to put keybindings. (defvar term-load-hook nil (#$ . 61606)) (run-hooks (quote term-load-hook)) #@113 *If non-nil, automatically list possiblities on partial completion. This mirrors the optional behavior of tcsh. (defvar term-completion-autolist nil (#$ . -61771)) #@113 *If non-nil, add a `/' to completed directories, ` ' to file names. This mirrors the optional behavior of tcsh. (defvar term-completion-addsuffix t (#$ . -61942)) #@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 (#$ . -62112)) #@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 (#$ . -62356)) #@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 "" (#$ . 62593)) (defalias 'term-directory #[(directory) "\n! \nP\n!" [expand-file-name file-name-absolute-p directory term-file-name-prefix] 3]) #@191 Return the word of WORD-CHARS at point, or nil if non 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) "` Q Q\f#ul \f!?1 P\"ΔΕ{," ["[" word-chars "]" "[^" non-word word limit re-search-backward nil move 1 looking-at re-search-forward "+" 0] 5 (#$ . 62953)]) #@112 Return the filename at point, or nil if non is found. Environment variables are substituted. See `term-word'. (defalias 'term-match-partial-filename #[nil "! \n!)" [term-word "~/A-Za-z0-9+@:_.$#,={}-" filename substitute-in-file-name] 3 (#$ . 63371)]) #@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 " @ ? A)" [term-dynamic-complete-functions functions nil] 2 (#$ . 63639) 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 "  =! " [term-match-partial-filename selected-window minibuffer-window message "Completing file name..." term-dynamic-complete-as-filename] 2 (#$ . 63989) 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 "\n \f!\n!\f\n&\n!(\f\" =I\"=dXc!ǘq !P!\fGOc\"9!߂c!!\f!!߂c!$\f !) . " [nil completion-ignore-case term-completion-fignore completion-ignored-extensions t success term-match-partial-filename "" filename file-name-directory pathdir file-name-nondirectory pathnondir term-directory default-directory directory file-name-completion completion selected-window minibuffer-window mini-flag message "No completions of %s" term-completion-addsuffix " " "Sole completion" term-dynamic-list-filename-completions file-name-as-directory file directory-file-name file-directory-p "/" "Completed" term-completion-recexact file-exists-p "Completed shortest" term-completion-autolist "Partially completed"] 3 (#$ . 64910)]) #@475 Dynamically expand and complete the filename at point. Replace the filename with an expanded, canonicalised and completed replacement. "Expanded" means environment variables (e.g., $HOME) and `~'s are replaced with the corresponding directories. "Canonicalised" 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 " !É# " [replace-match expand-file-name term-match-partial-filename t term-dynamic-complete-filename] 4 (#$ . 65988) 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) "\f\"\f\"\"GUQ@ 7!D GOc!Lc)Ђ\f\" GOc  c!Ԃ !ׂ!)+" [nil completion-ignore-case mapcar #[(x) "C" [x] 1] candidates all-completions stub completions message "No completions of %s" 1 completion "Sole completion" "Completed" term-completion-addsuffix " " sole try-completion term-completion-recexact "Completed shortest" shortest term-completion-autolist term-dynamic-list-completions listed "Partially completed" partial] 4 (#$ . 66650)]) #@68 List in help buffer possible completions of the filename at point. (defalias 'term-dynamic-list-filename-completions #[nil " \f!\f!!!\n  \" 6 !:\f\"." [nil completion-ignore-case term-match-partial-filename "" filename file-name-directory pathdir file-name-nondirectory pathnondir term-directory default-directory directory file-name-all-completions completions term-dynamic-list-completions message "No completions of %s"] 4 (#$ . 67865) nil]) #@77 List in help buffer sorted COMPLETIONS. Typing SPC flushes the help buffer. (defalias 'term-dynamic-list-completions #[(completions) "  \"!!ɉ\n !q! H\n:H\nA@)@)!!=H !=)W\n! !k\n=d !k !+" [current-window-configuration conf "*Completions*" display-completion-list sort completions string-lessp message "Hit space to flush" nil first key get-buffer read-key-sequence 0 window-buffer event position key-binding mouse-choose-completion set-window-configuration 32 listify-key-sequence unread-command-events] 6 (#$ . 68358)]) (provide (quote term))