;ELC ;;; compiled by kwzh@churchy.gnu.ai.mit.edu on Tue Jun 13 19:22:46 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/comint.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 "`comint.el' was compiled for Emacs 19.29 or later")) (require (quote ring)) #@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 comint-prompt-regexp "^" (#$ . 502)) #@382 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 `comint-arguments'. Defaults to the empty list. For shells, a good value is (?\| ?& ?< ?> ?\( ?\) ?;). This is a good thing to set in mode hooks. (defvar comint-delimiter-argument-list nil (#$ . 924)) #@398 *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 `comint-magic-space' and `comint-dynamic-complete'. This variable is buffer-local. (defvar comint-input-autoexpand nil (#$ . -1367)) #@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 comint-input-ignoredups nil (#$ . -1821)) #@199 *If non-nil, name of the file to read/write input history. See also `comint-read-input-ring' and `comint-write-input-ring'. This variable is buffer-local, and is a good thing to set in mode hooks. (defvar comint-input-ring-file-name nil (#$ . -2020)) #@282 *Controls whether input to interpreter 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. The default is nil. See `comint-preinput-scroll-to-bottom'. This variable is buffer-local. (defvar comint-scroll-to-bottom-on-input nil (#$ . -2279)) #@405 *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 `comint-scroll-show-maximum-output' and function `comint-postoutput-scroll-to-bottom'. This variable is buffer-local. (defvar comint-scroll-to-bottom-on-output nil (#$ . -2626)) #@262 *Controls how interpreter output causes window to scroll. If non-nil, then show the maximum output when the window is scrolled. See variable `comint-scroll-to-bottom-on-output' and function `comint-postoutput-scroll-to-bottom'. This variable is buffer-local. (defvar comint-scroll-show-maximum-output nil (#$ . -3097)) #@206 *The maximum size in lines for comint buffers. Comint buffers are truncated from the top to be no greater than this number, if the function `comint-truncate-buffer' is on `comint-output-filter-functions'. (defvar comint-buffer-maximum-size 1024 (#$ . -3425)) #@29 Size of input history ring. (defvar comint-input-ring-size 32 (#$ . 3690)) #@183 *If non-nil, assume that the subprocess echoes any input. If so, delete one copy of the input so that only one copy eventually appears in the buffer. This variable is buffer-local. (defvar comint-process-echoes nil (#$ . -3772)) #@117 *Regexp matching prompts for passwords in the inferior process. This is used by `comint-watch-for-password-prompt'. (defvar comint-password-prompt-regexp "\\(^[Pp]assword\\|pass phrase\\):\\s *\\'" (#$ . -4009)) #@318 Function that returns old text in comint 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 `comint-get-old-input-default', which grabs the current line, and strips off leading text matching `comint-prompt-regexp'. (defvar comint-get-old-input (quote comint-get-old-input-default) (#$ . 4228)) #@190 List of functions called to perform completion. Functions should return non-nil if completion was performed. See also `comint-dynamic-complete'. This is a good thing to set in mode hooks. (defvar comint-dynamic-complete-functions (quote (comint-replace-by-expanded-history comint-dynamic-complete-filename)) (#$ . 4631)) #@203 Predicate for filtering additions to input history. Takes one argument, the input. If non-nil, the input may be saved on the input history list. Default is to save anything that isn't all whitespace. (defvar comint-input-filter #[(str) "\n\"?" [string-match "\\`\\s *\\'" str] 3] (#$ . 4960)) #@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 comint-input-filter-functions nil (#$ . 5265)) #@234 Functions to call after output is inserted into the buffer. One possible function is `comint-postoutput-scroll-to-bottom'. These functions get one argument, a string containing the text just inserted. This variable is buffer-local. (defvar comint-output-filter-functions (quote (comint-postoutput-scroll-to-bottom)) (#$ . 5486)) #@312 Function to actually send to PROCESS the STRING submitted by user. Usually this is just `comint-simple-send', but if your mode needs to massage the input string, put a different function here. `comint-simple-send' just sends the string plus a newline. This is called from the user command `comint-send-input'. (defvar comint-input-sender (quote comint-simple-send) (#$ . 5823)) #@89 *Non-nil means go to the end of the line before sending input. See `comint-send-input'. (defvar comint-eol-on-send t (#$ . -6208)) #@82 Called upon entry into comint-mode This is run before the process is cranked up. (defvar comint-mode-hook nil (#$ . 6345)) #@330 Called each time a process is exec'd by `comint-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 comint mode buffer (e.g., `(process-kill-without-query)'). In contrast, the `comint-mode-hook' is only executed once when the buffer is created. (defvar comint-exec-hook nil (#$ . 6475)) (byte-code "! B‡" [boundp comint-mode-map nil current-load-list] 2) #@127 Non-nil if communications via pty; false if by pipe. Buffer local. This is to work around a bug in Emacs process signalling. (defvar comint-ptyp t (#$ . 6931)) (byte-code "! B B B B‡" [boundp comint-input-ring nil current-load-list comint-last-input-start comint-last-input-end comint-last-output-start] 2) #@40 Index of last matched history element. (defvar comint-input-ring-index nil (#$ . 7261)) #@47 Input previously used to match input history. (defvar comint-matching-input-from-input-string "" (#$ . 7355)) (byte-code "##########" [put comint-replace-by-expanded-history menu-enable comint-input-autoexpand comint-input-ring permanent-local t comint-input-ring-index comint-input-filter-functions comint-output-filter-functions comint-scroll-to-bottom-on-input comint-scroll-to-bottom-on-output comint-scroll-show-maximum-output comint-ptyp] 4) #@1687 Major mode for interacting with an inferior interpreter. Interpreter name is same as buffer name, sans the asterisks. Return at end of buffer sends line as input. Return not at end copies rest of line to end and sends it. Setting variable `comint-eol-on-send' means jump to the end of the line before submitting new input. This mode is customised to create major modes such as Inferior Lisp mode, Shell mode, etc. This can be done by setting the hooks `comint-input-filter-functions', `comint-input-filter', `comint-input-sender' and `comint-get-old-input' to appropriate functions, and the variable `comint-prompt-regexp' to the appropriate regular expression. An input history is maintained of size `comint-input-ring-size', and can be accessed with the commands \[comint-next-input], \[comint-previous-input], and \[comint-dynamic-list-input-ring]. Input ring history expansion can be achieved with the commands \[comint-replace-by-expanded-history] or \[comint-magic-space]. Input ring expansion is controlled by the variable `comint-input-autoexpand', and addition is controlled by the variable `comint-input-ignoredups'. Commands with no default key bindings include `send-invisible', `comint-dynamic-complete', `comint-dynamic-list-filename-completions', and `comint-magic-space'. Input to, and output from, the subprocess can cause the window to scroll to the end of the buffer. See variables `comint-output-filter-functions', `comint-scroll-to-bottom-on-input', and `comint-scroll-to-bottom-on-output'. If you accidentally suspend your process, use \[comint-continue-subjob] to continue it. \{comint-mode-map} Entry to this mode runs the hooks on `comint-mode-hook'. (defalias 'comint-mode #[nil " !! \ne̓!  e̓! !!!!!LR!!!ad!!!!!!!!!!!!!!!\"!!!!!!" [kill-all-local-variables comint-mode major-mode "Comint" mode-name (":%s") mode-line-process use-local-map comint-mode-map make-local-variable comint-last-input-start make-marker nil comint-last-input-end comint-last-output-start comint-prompt-regexp comint-input-ring-size comint-input-ring comint-input-ring-file-name boundp make-ring comint-input-ring-index comint-matching-input-from-input-string comint-input-autoexpand comint-input-ignoredups comint-delimiter-argument-list make-local-hook comint-dynamic-complete-functions comint-completion-fignore comint-get-old-input comint-input-filter-functions comint-input-filter comint-input-sender comint-eol-on-send comint-scroll-to-bottom-on-input comint-scroll-to-bottom-on-output comint-scroll-show-maximum-output pre-command-hook add-hook comint-preinput-scroll-to-bottom comint-output-filter-functions comint-ptyp comint-exec-hook comint-process-echoes comint-file-name-quote-list run-hooks comint-mode-hook] 4 (#$ . 7861) nil]) (byte-code " #########################!B#####!B##@A#BC#DE#FG#HI#JK#LM#NO#PQ#RS#TU#VW#XY#Z[#\\]#^_#`aa!B#bc#de#fg#hi#jk#lm#nop\"p" [comint-mode-map make-sparse-keymap define-key "p" comint-previous-input "n" comint-next-input [C-up] [C-down] "r" comint-previous-matching-input "s" comint-next-matching-input [-130023310] comint-previous-matching-input-from-input [-130023309] comint-next-matching-input-from-input "\f" comint-show-output " " comint-send-input "" comint-delchar-or-maybe-eof "" comint-bol "" comint-kill-input "" backward-kill-word "" comint-interrupt-subjob "" comint-stop-subjob "" comint-quit-subjob " " comint-copy-old-input "" comint-kill-output "" "" comint-show-maximum-output "\f" comint-dynamic-list-input-ring "" comint-next-prompt "" comint-previous-prompt "" comint-send-eof [menu-bar completion] "Complete" [menu-bar completion complete-expand] ("Expand File Name" . comint-replace-by-expanded-filename) [menu-bar completion complete-listing] ("File Completion Listing" . comint-dynamic-list-filename-completions) [menu-bar completion complete-file] ("Complete File Name" . comint-dynamic-complete-filename) [menu-bar completion complete] ("Complete Before Point" . comint-dynamic-complete) [menu-bar inout] "In/Out" [menu-bar inout kill-output] ("Kill Current Output Group" . comint-kill-output) [menu-bar inout next-prompt] ("Forward Output Group" . comint-next-prompt) [menu-bar inout previous-prompt] ("Backward Output Group" . comint-previous-prompt) [menu-bar inout show-maximum-output] ("Show Maximum Output" . comint-show-maximum-output) [menu-bar inout show-output] ("Show Current Output Group" . comint-show-output) [menu-bar inout kill-input] ("Kill Current Input" . comint-kill-input) [menu-bar inout copy-input] ("Copy Old Input" . comint-copy-old-input) [menu-bar inout forward-matching-history] ("Forward Matching Input..." . comint-forward-matching-input) [menu-bar inout backward-matching-history] ("Backward Matching Input..." . comint-backward-matching-input) [menu-bar inout next-matching-history] ("Next Matching Input..." . comint-next-matching-input) [menu-bar inout previous-matching-history] ("Previous Matching Input..." . comint-previous-matching-input) [menu-bar inout next-matching-history-from-input] ("Next Matching Current Input" . comint-next-matching-input-from-input) [menu-bar inout previous-matching-history-from-input] ("Previous Matching Current Input" . comint-previous-matching-input-from-input) [menu-bar inout next-history] ("Next Input" . comint-next-input) [menu-bar inout previous-history] ("Previous Input" . comint-previous-input) [menu-bar inout list-history] ("List Input History" . comint-dynamic-list-input-ring) [menu-bar inout expand-history] ("Expand History Before Point" . comint-replace-by-expanded-history) [menu-bar signals] "Signals" [menu-bar signals eof] ("EOF" . comint-send-eof) [menu-bar signals kill] ("KILL" . comint-kill-subjob) [menu-bar signals quit] ("QUIT" . comint-quit-subjob) [menu-bar signals cont] ("CONT" . comint-continue-subjob) [menu-bar signals stop] ("STOP" . comint-stop-subjob) [menu-bar signals break] ("BREAK" . comint-interrupt-subjob) append (completion inout signals) menu-bar-final-items] 6) #@170 Return t if there is a living process associated w/buffer BUFFER. Living means the status is `open', `run', or `stop'. BUFFER can be either a buffer or the name of one. (defalias 'comint-check-proc #[(buffer) " ! \n!>)" [get-buffer-process buffer proc process-status (open run stop)] 3 (#$ . 14348)]) #@559 Make a comint process NAME in a buffer, running PROGRAM. The name of the buffer is made by surrounding NAME with `*'s. PROGRAM should be either a string denoting an executable program to create via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP connection to be opened via `open-network-stream'. 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. If PROGRAM is a string, any more args are arguments to PROGRAM. (defalias 'make-comint #[(name program &optional startfile &rest switches) "!\n!Q!!0q ) \f %)" [fboundp start-process error "Multi-processing is not supported for this system" get-buffer-create "*" name buffer comint-check-proc comint-mode comint-exec program startfile switches] 6 (#$ . 14664)]) #@285 Run PROGRAM in a comint buffer and switch to it. The buffer name is made by surrounding the file name of PROGRAM with `*'s. The file name is used to make a symbol name, such as `comint-sh-hook', and any hooks on this symbol are run in the buffer. See `make-comint' and `comint-exec'. (defalias 'comint-run #[(program) " !\n \"!\nQ!!)" [file-name-nondirectory program name switch-to-buffer make-comint run-hooks intern-soft "comint-" "-hook"] 5 (#$ . 15563) "sRun program: "]) #@265 Start up a process in buffer BUFFER for comint 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 comint buffer. The hook `comint-exec-hook' is run after each exec. (defalias 'comint-exec #[(buffer name command startfile switches) "q!\n!)\f:\"\f@\fA$*\f$\n\"! \fdb\n!`ϓb!db!`d{`d|\n\"!*" [buffer get-buffer-process proc delete-process command open-network-stream name comint-exec-1 switches set-process-filter comint-output-filter make-local-variable comint-ptyp process-connection-type process-mark nil startfile sleep-for 1 insert-file-contents comint-send-string run-hooks comint-exec-hook] 6 (#$ . 16056)]) (defalias 'comint-exec-1 #[(name buffer command switches) "!  \"E \"E  !, -  %*" [boundp system-uses-terminfo "EMACS=t" "TERM=unknown" format "COLUMNS=%d" frame-width "TERM=emacs" "TERMCAP=emacs:co#%d:tc=unknown:" process-environment file-directory-p default-directory "/" apply start-process name buffer command switches] 6]) #@625 Sets the buffer's `comint-input-ring' from a history file. The name of the file is given by the variable `comint-input-ring-file-name'. The history ring is of size `comint-input-ring-size', regardless of file size. If `comint-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 `comint-input-ignoredups' and `comint-write-input-ring'. (defalias 'comint-read-input-ring #[(&optional silent) "\n\f‡!\f\"! !\f Ўq~ !db  W#֔֕{n\f!n\f\"u\f\") T B*\f‰," [comint-input-ring-file-name "" nil file-readable-p silent message "Cannot read history file %s" get-buffer-create " *temp*" 0 make-ring comint-input-ring-size ring count file history-buf ((kill-buffer history-buf)) erase-buffer insert-file-contents re-search-backward "^[ ]*\\([^#\n].*\\)[ ]*$" t 1 history comint-input-ignoredups ring-empty-p ring-ref ring-insert-at-beginning comint-input-ring comint-input-ring-index] 6 (#$ . 17207)]) #@355 Writes the buffer's `comint-input-ring' to a history file. The name of the file is given by the variable `comint-input-ring-file-name'. The original contents of the file are lost if `comint-input-ring' is not empty. If `comint-input-ring-file-name' is nil this function does nothing. Useful within process sentinels. See also `comint-read-input-ring'. (defalias 'comint-write-input-ring #[nil "\n\n!ć!!\"!\n\n \f !\nq VSS \"ұ: \f%!-" [comint-input-ring-file-name "" comint-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 (#$ . 18486)]) #@49 List in help buffer the buffer's input history. (defalias 'comint-dynamic-list-input-ring #[nil " !\f !! !S  \n \f\nY: \n\"\fB\f\nS\n\" \f! qy#X!I!! =s !yC-" [ring-p comint-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 (#$ . 19296) nil]) (defalias 'comint-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 'comint-search-arg #[(arg) " !  !!U# ʇ" [comint-after-pmark-p error "Not at command line" comint-input-ring ring-empty-p "Empty input ring" arg 0 nil comint-input-ring-index 1] 2]) (defalias 'comint-search-start #[(arg) "\nVĂ\\!\"\nY Ç!S" [comint-input-ring-index mod arg 0 1 -1 ring-length comint-input-ring] 4]) #@97 Return the string ARG places along the input ring. Moves relative to `comint-input-ring-index'. (defalias 'comint-previous-input-string #[(arg) " \n\f\n\\ !\"\f\"" [ring-ref comint-input-ring comint-input-ring-index mod arg ring-length] 6 (#$ . 20537)]) #@40 Cycle backwards through input history. (defalias 'comint-previous-input #[(arg) "\n\"" [comint-previous-matching-input "." arg] 3 (#$ . 20807) "*p"]) #@39 Cycle forwards through input history. (defalias 'comint-next-input #[(arg) " [!" [comint-previous-input arg] 2 (#$ . 20966) "*p"]) #@113 Return the string matching REGEXP ARG places along the input ring. Moves relative to `comint-input-ring-index'. (defalias 'comint-previous-matching-input-string #[(regexp arg) " \n\" \")" [comint-previous-matching-input-string-position regexp arg pos ring-ref comint-input-ring] 4 (#$ . 21106)]) #@122 Return the index matching REGEXP ARG places along the input ring. Moves relative to START, or `comint-input-ring-index'. (defalias 'comint-previous-matching-input-string-position #[(regexp arg &optional start) " !\f !! !V ɂ!  -! Z\"U \\\"W \"\" \\\"UVVST= \"\"-" [ring-p comint-input-ring ring-empty-p error "No history" ring-length len arg 0 1 -1 motion mod start comint-search-start n nil tried-each-ring-item prev string-match regexp ring-ref] 6 (#$ . 21418)]) #@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 'comint-previous-matching-input #[(regexp arg) " ! \"!*\f\fT\"p!!`| \f\"c)" [comint-search-arg arg comint-previous-matching-input-string-position regexp pos error "Not found" comint-input-ring-index message "History item: %d" process-mark get-buffer-process ring-ref comint-input-ring] 4 (#$ . 22018) (comint-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 'comint-next-matching-input #[(regexp arg) " \n[\"" [comint-previous-matching-input regexp arg] 3 (#$ . 22636) (comint-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 'comint-previous-matching-input-from-input #[(arg) ">p!!`{\f!P\n\"" [last-command (comint-previous-matching-input-from-input comint-next-matching-input-from-input) process-mark get-buffer-process comint-matching-input-from-input-string nil comint-input-ring-index comint-previous-matching-input "^" regexp-quote arg] 4 (#$ . 23047) "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 'comint-next-matching-input-from-input #[(arg) " [!" [comint-previous-matching-input-from-input arg] 2 (#$ . 23655) "p"]) #@681 Expand input command history references before point. Expansion is dependent on the value of `comint-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 `comint-magic-space' and `comint-replace-by-expanded-history-before-point'. Returns t if successful. (defalias 'comint-replace-by-expanded-history #[(&optional silent) ", \",y!), !\f! U)?" [comint-input-autoexpand string-match "[!^]" comint-get-old-input 0 looking-at comint-prompt-regexp buffer-modified-tick previous-modified-tick message "Expanding history references..." comint-replace-by-expanded-history-before-point silent] 3 (#$ . 24038) nil]) #@116 Expand directory stack reference before point. See `comint-replace-by-expanded-history'. Returns t if successful. (defalias 'comint-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 comint-bol start toend "^!^" comint-input-ring-index 92 comint-within-quotes looking-at "![0-9]+\\($\\|[^-]\\)" 0 message "Absolute reference cannot be expanded" "!-\\([0-9]+\\)\\(:?[0-9^$*-]+\\)?" string-to-number 1 number ring-length comint-input-ring replace-match comint-args comint-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)) comint-previous-matching-input-string-position regexp-quote pos silent "Not found" ding ring-ref 4 "\\^\\([^^]+\\)\\^?\\([^^]*\\)\\^?" new old search-forward error "History item: substituted"] 6 (#$ . 25105)]) #@145 Expand input history references before point and insert ARG spaces. A useful command to bind to SPC. See `comint-replace-by-expanded-history'. (defalias 'comint-magic-space #[(arg) " \n!" [comint-replace-by-expanded-history self-insert-command arg] 2 (#$ . 26544) "p"]) #@92 Return t if the number of quotes between BEG and END is odd. Quotes are single and double. (defalias 'comint-within-quotes #[(beg end) "\n #\n #\"U \"U*" [comint-how-many-region "\\(^\\|[^\\\\]\\)'" beg end "\\(^\\|[^\\\\]\\)\"" countdq countsq mod 2 1] 5 (#$ . 26825)]) #@54 Return number of matches for REGEXP from BEG to END. (defalias 'comint-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 (#$ . 27121)]) (defalias 'comint-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 comint-arguments string 0 nil 58 end range string-match "^[*^]" 1 "^-" "$" string-to-number nth "[-*$]$" "-" mth] 4]) (defalias 'comint-delim-arg #[(arg) " C G \fW\\ H >9 \fWN H=N T$ \fWN H>N T:  OB*+" [comint-delimiter-argument-list arg nil 0 len pos args start char] 4]) #@360 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 `comint-delimiter-argument-list' is a separate argument. Argument 0 is the command name. (defalias 'comint-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 comint-delim-arg nth m n mapconcat #[(a) "" [a] 1] " "] 8 (#$ . 27953)]) #@1887 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 `comint-get-old-input' to retrieve old input, copies it to the process mark, and sends it. If variable `comint-process-echoes' is nil, a terminal newline is also inserted into the buffer and sent to the process (if it is non-nil, all text from the process mark to point is deleted, since it is assumed the remote process will re-echo it). Any history reference may be expanded depending on the value of the variable `comint-input-autoexpand'. The list of function names contained in the value of `comint-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 `comint-input-filter' returns non-nil when called on the input. If variable `comint-eol-on-send' is non-nil, then point is moved to the end of line before sending the input. The values of `comint-get-old-input', `comint-input-filter-functions', and `comint-input-filter' are chosen according to the command interpreter running in the buffer. E.g., If the interpreter is the csh, comint-get-old-input is the default: take the current line, discard any initial string matching regexp comint-prompt-regexp. comint-input-filter-functions monitors input for "cd", "pushd", and "popd" commands. When it sees one, it cd's the buffer. comint-input-filter is the default: returns t if the input isn't all white space. If the comint is Lucid Common Lisp, comint-get-old-input snarfs the sexp ending at point. comint-input-filter-functions does nothing. comint-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 'comint-send-input #[nil "p!! !` !Y(\" `{7 \n b\nc\n) \f=E L! `{ \f=Z n! `{\n `| c\n)| `|c!!!\"\" P\" ȓ `ȓ !`ȓ!  \" \",)" [get-buffer-process proc error "Current buffer has no process" process-mark pmark marker-position comint-eol-on-send nil comint-get-old-input copy intxt comint-input-autoexpand input comint-replace-by-expanded-history t history comint-process-echoes 10 comint-input-filter comint-input-ignoredups ring-p comint-input-ring ring-empty-p ring-ref 0 ring-insert run-hook-with-args comint-input-filter-functions "\n" comint-input-ring-index comint-last-input-start comint-last-input-end comint-input-sender comint-output-filter ""] 5 (#$ . 28783) nil]) (defalias 'comint-output-filter #[(process string) " !\n!pĉ\nq`ed G\n \f~ !b`\n`XG \\`WU \\` X`  \\ ! !`Ux ` GZ\"!`U Zē\nē !`ē + }b \"q,)" [process-buffer process oprocbuf buffer-name nil oend obeg opoint obuf string ostart nchars buffer-read-only process-mark insert-before-markers window-start selected-window set-window-start comint-last-input-end marker-buffer comint-last-output-start force-mode-line-update run-hook-with-args comint-output-filter-functions] 5]) #@386 Go to the end of buffer in all windows showing it. Movement occurs if point in the selected window is not after the process mark, and `this-command' is an insertion command. Insertion commands recognised are `self-insert-command', `comint-magic-space', `yank', and `hilit-yank'. Depends on the value of `comint-scroll-to-bottom-on-input'. This function should be a pre-command hook. (defalias 'comint-preinput-scroll-to-bottom #[nil "7 >7 p !6`!W6=1db6#," [comint-scroll-to-bottom-on-input this-command (self-insert-command comint-magic-space yank hilit-yank) selected-window selected current get-buffer-process process scroll process-mark this walk-windows #[(window) " !\n= = = !db!" [window-buffer window current scroll t all select-window selected] 2] nil t] 4 (#$ . 32072)]) #@292 Go to the end of buffer in all windows showing it. Does not scroll if the current line is the last line in the buffer. Depends on the value of `comint-scroll-to-bottom-on-output' and `comint-scroll-show-maximum-output'. This function should be in the list `comint-output-filter-functions'. (defalias 'comint-postoutput-scroll-to-bottom #[(string) " p\n! ǎ\f#-" [selected-window selected current get-buffer-process process comint-scroll-to-bottom-on-output scroll ((set-buffer current)) walk-windows #[(window) " !\n=i !` !WO=J=J=0\n =J=>\n =J` !\fGZYO !b e` !Yedb!)\n!" [window-buffer window current select-window process-mark process scroll t all this selected others string comint-scroll-show-maximum-output recenter -1] 3] nil t] 4 (#$ . 32916)]) #@132 Truncate the buffer to `comint-buffer-maximum-size'. This function could be on `comint-output-filter-functions' or bound to a key. (defalias 'comint-truncate-buffer #[(&optional string) "db[yye`|)" [comint-buffer-maximum-size 0] 2 (#$ . 33744) nil]) #@141 Strip trailing `^M' characters from the current output group. This function could be on `comint-output-filter-functions' or bound to a key. (defalias 'comint-strip-ctrl-m #[(&optional string) "p!!t \fb\n##lj#*" [process-mark get-buffer-process pmark comint-last-input-end comint-last-output-start re-search-forward " +$" t replace-match ""] 4 (#$ . 34008) nil]) (defalias (quote shell-strip-ctrl-m) (quote comint-strip-ctrl-m)) #@56 Put the end of the buffer at the bottom of the window. (defalias 'comint-show-maximum-output #[nil "db!" [recenter -1] 2 (#$ . 34465) nil]) #@122 Default for `comint-get-old-input'. Take the current line, and discard any initial text matching `comint-prompt-regexp'. (defalias 'comint-get-old-input-default #[nil "y `\n`{*" [0 comint-skip-prompt beg nil] 2 (#$ . 34616)]) #@114 Insert after prompt old input at point as new input to be edited. Calls `comint-get-old-input' to get old input. (defalias 'comint-copy-old-input #[nil " p!\n!\n!b c*" [comint-get-old-input get-buffer-process process input error "Current buffer has no process" process-mark] 3 (#$ . 34859) nil]) #@130 Skip past the text matching regexp `comint-prompt-regexp'. If this takes us past the end of the current line, don't skip at all. (defalias 'comint-skip-prompt #[nil "`) !ĕ Xĕb)" [nil eol looking-at comint-prompt-regexp 0] 2 (#$ . 35177)]) #@55 Return t if point is after the process output marker. (defalias 'comint-after-pmark-p #[nil "p!!\n!`X)" [process-mark get-buffer-process pmark marker-position] 3 (#$ . 35437)]) #@145 Default function for sending to PROC input STRING. This just sends STRING plus a newline. To override this, set the hook `comint-input-sender'. (defalias 'comint-simple-send #[(proc string) " \n\" \"" [comint-send-string proc string "\n"] 3 (#$ . 35626)]) #@271 Goes to the beginning of line, then skips past the prompt, if any. If prefix argument is given (\[universal-argument]) the prompt is not skipped. The prompt skip is done by skipping text matching the regular expression `comint-prompt-regexp', a buffer local variable. (defalias 'comint-bol #[(arg) "y ?\n " [0 arg comint-skip-prompt] 1 (#$ . 35894) "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 'comint-read-noecho #[(prompt &optional stars) "É \f\n(  G\"#. \" UA‰UVUVU\\‰Ui UU !P  GV O É!!! ." ["" 0 t nil done message-log-max cursor-in-echo-area echo-keystrokes c ans stars message "%s%s" prompt make-string 42 "%s" read-char-exclusive 7 quit-flag 13 10 27 21 8 127 char-to-string -1 "Quit" beep] 7 (#$ . 36264)]) #@259 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 comint input history list. Security bug: your string can still be temporarily recovered with \[view-lossage]. (defalias 'send-invisible #[(str) "p!!# ; \"\" \")" [get-buffer-process proc error "Current buffer has no process" comint-send-string str comint-read-noecho "Non-echoed text: " t "\n"] 6 (#$ . 37332) "P"]) #@305 Prompt in the minibuffer for password and send without echoing. This function uses `send-invisible' to read and send a password to the buffer's process if STRING contains a password prompt defined by `comint-password-prompt-regexp'. This function could be in the list `comint-output-filter-functions'. (defalias 'comint-watch-for-password-prompt #[(string) " \n\"\n!" [string-match comint-password-prompt-regexp string send-invisible nil] 3 (#$ . 37828)]) (byte-code "\"\"" [defalias comint-send-string process-send-string comint-send-region process-send-region] 3) #@80 Kill all output from interpreter since last input. Does not delete the prompt. (defalias 'comint-kill-output #[nil "p! !by | `{P`|* \n\"*" [get-buffer-process nil replacement proc process-mark 0 point-marker pmark comint-last-input-end comint-skip-prompt "*** output flushed ***\n" comint-output-filter] 3 (#$ . 38416) 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 'comint-show-output #[nil " ` !\fdby `\" )" [push-mark pos marker-position comint-last-input-end -1 set-window-start selected-window comint-skip-prompt] 3 (#$ . 38776) nil]) #@31 Interrupt the current subjob. (defalias 'comint-interrupt-subjob #[nil "\n\"" [interrupt-process nil comint-ptyp] 3 (#$ . 39106) nil]) #@41 Send kill signal to the current subjob. (defalias 'comint-kill-subjob #[nil "\n\"" [kill-process nil comint-ptyp] 3 (#$ . 39250) nil]) #@41 Send quit signal to the current subjob. (defalias 'comint-quit-subjob #[nil "\n\"" [quit-process nil comint-ptyp] 3 (#$ . 39394) 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 \[comint-continue-subjob] to resume the process. (This is not a problem with most shells, since they ignore this signal.) (defalias 'comint-stop-subjob #[nil "\n\"" [stop-process nil comint-ptyp] 3 (#$ . 39539) nil]) #@111 Send CONT signal to process buffer's process group. Useful if you accidentally suspend the top-level process. (defalias 'comint-continue-subjob #[nil "\n\"" [continue-process nil comint-ptyp] 3 (#$ . 39935) nil]) #@63 Kill all text from last stuff output by interpreter to point. (defalias 'comint-kill-input #[nil "p!!`\n!V\n`\")" [process-mark get-buffer-process pmark marker-position kill-region] 3 (#$ . 40157) nil]) #@74 Delete ARG characters forward, or (if at eob) send an EOF to subprocess. (defalias 'comint-delchar-or-maybe-eof #[(arg) "m \n!" [process-send-eof delete-char arg] 2 (#$ . 40375) "p"]) #@46 Send an EOF to the current buffer's process. (defalias 'comint-send-eof #[nil " " [process-send-eof] 1 (#$ . 40572) nil]) #@229 Search backward through buffer for match for REGEXP. Matches are searched for on lines that match `comint-prompt-regexp'. With prefix argument N, search for Nth previous match. If N is negative, find the next or Nth next match. (defalias 'comint-backward-matching-input #[(regexp arg) "\nQ\fVł \f$`)\n-! 4\nb!*" [comint-prompt-regexp ".*" regexp re arg 0 1 re-search-backward nil t pos message "Not found" ding comint-bol] 6 (#$ . 40703) (comint-regexp-arg "Backward input matching (regexp): ")]) #@237 Search forward through buffer for match for REGEXP. Matches are searched for on lines that match `comint-prompt-regexp'. With prefix argument N, search for Nth following match. If N is negative, find the previous or Nth previous match. (defalias 'comint-forward-matching-input #[(regexp arg) " \n[\"" [comint-backward-matching-input regexp arg] 3 (#$ . 41242) (comint-regexp-arg "Forward input matching (regexp): ")]) #@75 Move to end of Nth next prompt in the buffer. See `comint-prompt-regexp'. (defalias 'comint-next-prompt #[(n) "\nV\fĂ \n! )" [comint-prompt-regexp paragraph-start n 0 1 forward-paragraph comint-skip-prompt] 2 (#$ . 41668) "p"]) #@79 Move to end of Nth previous prompt in the buffer. See `comint-prompt-regexp'. (defalias 'comint-previous-prompt #[(n) " [!" [comint-next-prompt n] 2 (#$ . 41916) "p"]) (defalias 'comint-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 'comint-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 Return string around POINT that starts the current line, or nil. (defalias 'comint-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 (#$ . 42536)]) (defalias 'comint-get-source #[(prompt prev-dir/file source-modes mustmatch-p) " \n\" ȏ !?\n# !% @\f\n2 !4 AF#H\fP$!!.C" [comint-source-default prev-dir/file source-modes def comint-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 'comint-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 comint-send-string str accept-process-output pos-visible-in-window-p window-point opoint set-window-point sit-for 0 push-mark] 3]) #@113 *If non-nil, automatically list possiblities on partial completion. This mirrors the optional behavior of tcsh. (defvar comint-completion-autolist nil (#$ . -43695)) #@264 *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 comint-completion-addsuffix t (#$ . -43868)) #@188 *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 `comint-completion-autolist' is non-nil too. (defvar comint-completion-recexact nil (#$ . -44191)) #@182 *List of suffixes to be disregarded during file completion. This mirrors the optional behavior of bash and tcsh. Note that this applies to `comint-dynamic-complete-filename' only. (defvar comint-completion-fignore nil (#$ . -44439)) #@171 Prefix prepended to absolute file names taken from process input. This is used by comint's and shell's completion functions, and by shell's directory tracking functions. (defvar comint-file-name-prefix "" (#$ . 44680)) #@102 List of characters to quote with `' when in a file name. This is a good thing to set in mode hooks. (defvar comint-file-name-quote-list nil (#$ . 44906)) (defalias 'comint-directory #[(directory) "\n! \nP\n!" [expand-file-name file-name-absolute-p directory comint-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 'comint-word #[(word-chars) " Q`\f#h=!o'\f!*u` W9` D!!+" ["[^\\\\" word-chars "]" here non-word-chars re-search-backward nil move 92 backward-char 1 looking-at store-match-data match-string 0] 4 (#$ . 45210)]) #@114 Return the filename at point, or nil if non is found. Environment variables are substituted. See `comint-word'. (defalias 'comint-match-partial-filename #[nil "! \n!!)" [comint-word "~/A-Za-z0-9+@:_.$#%,={}-" filename substitute-in-file-name comint-unquote-filename] 4 (#$ . 45662)]) #@108 Return FILENAME with magic characters quoted. Magic characters are those in `comint-file-name-quote-list'. (defalias 'comint-quote-filename #[(filename) " #\"  ʎ \"(Ή $ +" [comint-file-name-quote-list filename format "\\(^\\|[^\\]\\)\\([%s]\\)" mapconcat char-to-string "" regexp match-data match-data ((store-match-data match-data)) string-match replace-match "\\1\\\\\\2" nil] 6 (#$ . 45963)]) #@50 Return FILENAME with quoted characters unquoted. (defalias 'comint-unquote-filename #[(filename) " Ď \"ɉ $ *" [comint-file-name-quote-list filename match-data match-data ((store-match-data match-data)) string-match "\\\\\\(.\\)" replace-match "\\1" nil] 5 (#$ . 46394)]) #@212 Dynamically perform completion at point. Calls the functions in `comint-dynamic-complete-functions' to perform completion until a function returns non-nil, at which point completion is assumed to have occurred. (defalias 'comint-dynamic-complete #[nil "!" [run-hook-with-args-until-success comint-dynamic-complete-functions] 2 (#$ . 46694) nil]) #@705 Dynamically complete the filename at point. Completes if after a filename. See `comint-match-partial-filename' and `comint-dynamic-complete-as-filename'. This function is similar to `comint-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 `comint-completion-addsuffix', `comint-completion-recexact' and `comint-completion-fignore', and the timing of completions listing is dependent on the value of `comint-completion-autolist'. Returns t if successful. (defalias 'comint-dynamic-complete-filename #[nil "  !! " [comint-match-partial-filename window-minibuffer-p selected-window message "Completing file name..." comint-dynamic-complete-as-filename] 2 (#$ . 47050) nil]) #@112 Dynamically complete at point as a filename. See `comint-dynamic-complete-filename'. Returns t if successful. (defalias 'comint-dynamic-complete-as-filename #[nil "\n ! \n˂%\n:\"̂%\n@ \n0˂=\n::΂=\nA E!!_!a\"{\" -=c-!-˘ -!P !GO!c\"9 ! c,!,%\n ! ! c,!,(# ,,!) .\f" [nil completion-ignore-case comint-completion-fignore completion-ignored-extensions file-name-handler-alist window-minibuffer-p selected-window minibuffer-p t success comint-completion-addsuffix "" "/" dirsuffix " " filesuffix comint-match-partial-filename filename file-name-directory pathdir file-name-nondirectory pathnondir comint-directory default-directory directory file-name-completion completion message "No completions of %s" "Sole completion" comint-dynamic-list-filename-completions file-name-as-directory file comint-quote-filename directory-file-name file-directory-p "Completed" comint-completion-recexact file-exists-p "Completed shortest" comint-completion-autolist "Partially completed"] 5 (#$ . 47992)]) #@477 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 `comint-dynamic-complete-filename'. (defalias 'comint-replace-by-expanded-filename #[nil " !É# " [replace-match expand-file-name comint-match-partial-filename t comint-dynamic-complete-filename] 4 (#$ . 49208) nil]) #@592 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 `comint-dynamic-complete-filename'. (defalias 'comint-dynamic-simple-complete #[(stub candidates) "\n\nÂ\n:Ă\nA\"\n\" 3\n\" GUc @\nN![\nGOc! c)҂\n\"\nGOc\n\n c!ւ\n !ق!)," [nil completion-ignore-case comint-completion-addsuffix "" " " suffix mapcar #[(x) "C" [x] 1] candidates all-completions stub completions message "No completions of %s" 1 completion "Sole completion" "Completed" sole try-completion comint-completion-recexact "Completed shortest" shortest comint-completion-autolist comint-dynamic-list-completions listed "Partially completed" partial] 4 (#$ . 49878)]) #@68 List in help buffer possible completions of the filename at point. (defalias 'comint-dynamic-list-filename-completions #[nil " \n ! ! !!# \f \f\"8 \"?\"!." [nil completion-ignore-case file-name-handler-alist comint-match-partial-filename "" filename file-name-directory pathdir file-name-nondirectory pathnondir comint-directory default-directory directory file-name-all-completions completions message "No completions of %s" comint-dynamic-list-completions mapcar comint-quote-filename] 5 (#$ . 51143) nil]) #@77 List in help buffer sorted COMPLETIONS. Typing SPC flushes the help buffer. (defalias 'comint-dynamic-list-completions #[(completions) "  \"!!ɉ\n !q! H\n:T\nA@):T\nA@)@)!!=T !=)c\n! !w\n=p !w !+" [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 event window-buffer position key-binding mouse-choose-completion set-window-configuration 32 listify-key-sequence unread-command-events] 6 (#$ . 51702)]) (provide (quote comint))