;ELC ;;; compiled by rms@mole.gnu.ai.mit.edu on Sat Aug 27 15:07:34 1994 ;;; from file /home/fsf/rms/e19/lisp/comint.el ;;; emacs version 19.25.94.1. ;;; 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"))) (error "`/home/fsf/rms/e19/lisp/comint.el' was compiled for Emacs 19")) (require (quote ring)) (defvar comint-prompt-regexp "^" "\ 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-delimiter-argument-list nil "\ 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-input-autoexpand nil "\ *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-ignoredups nil "\ *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-ring-file-name nil "\ *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-scroll-to-bottom-on-input nil "\ *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-output nil "\ *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-show-maximum-output nil "\ *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-input-ring-size 32 "\ Size of input history ring.") (defvar comint-process-echoes nil "\ *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-password-prompt-regexp "\\(^[Pp]assword\\|pass phrase\\):\\s *\\'" "\ *Regexp matching prompts for passwords in the inferior process. This is used by `comint-watch-for-password-prompt'.") (defvar comint-get-old-input (quote comint-get-old-input-default) "\ 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-dynamic-complete-functions (quote (comint-replace-by-expanded-history comint-dynamic-complete-filename)) "\ 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-input-filter #[(str) "\n\"?" [string-match "\\`\\s *\\'" str] 3] "\ 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-functions nil "\ 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-output-filter-functions (quote (comint-postoutput-scroll-to-bottom)) "\ 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-input-sender (quote comint-simple-send) "\ 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-eol-on-send t "\ *Non-nil means go to the end of the line before sending input. See `comint-send-input'.") (defvar comint-mode-hook nil "\ Called upon entry into comint-mode This is run before the process is cranked up.") (defvar comint-exec-hook nil "\ 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.") (byte-code "!‡" [boundp comint-mode-map nil] 2) (defvar comint-ptyp t "\ Non-nil if communications via pty; false if by pipe. Buffer local. This is to work around a bug in Emacs process signalling.") (byte-code "!‡" [boundp comint-input-ring nil] 2) (defvar comint-input-ring-index nil "\ Index of last matched history element.") (defvar comint-matching-input-from-input-string "" "\ Input previously used to match input history.") (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) (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 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 run-hooks comint-mode-hook] 4 "\ 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'." nil]) (byte-code " #######################!B#####!B###@A#BC#DE#FG#HI#JK#LM#NO#PQ#RS#TU#VW#XY#Z[#\\]#^__!B#`a#bc#de#fg#hi#jk#lmn\"n" [comint-mode-map make-sparse-keymap define-key "p" comint-previous-input "n" comint-next-input "r" comint-previous-matching-input "s" comint-next-matching-input [-8126350] comint-previous-matching-input-from-input [-8126349] 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) (defalias 'comint-check-proc #[(buffer) " ! \n!>)" [get-buffer-process buffer proc process-status (run stop)] 3 "\ Return t if there is a living process associated w/buffer BUFFER. Living means the status is `run' or `stop'. BUFFER can be either a buffer or the name of one."]) (defalias 'make-comint #[(name program &optional startfile &rest switches) "\nQ! ! q ) \n % )" [get-buffer-create "*" name buffer comint-check-proc comint-mode comint-exec program startfile switches] 6 "\ Make a comint 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 'comint-run #[(program) " !\n \"!\nQ!!)" [file-name-nondirectory program name switch-to-buffer make-comint run-hooks intern-soft "comint-" "-hook"] 5 "\ 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'." "sRun program: "]) (defalias 'comint-exec #[(buffer name command startfile switches) "q!\n!) $\n\"!\f db\n!`ΓQ!db!`d{`d|\n\"!*" [buffer get-buffer-process proc delete-process comint-exec-1 name command 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 "\ 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 (quote comint-exec-1) #[(name buffer command switches) "!  \"E \"E  \f %)" [boundp system-uses-terminfo "EMACS=t" "TERM=unknown" format "COLUMNS=%d" frame-width "TERM=emacs" "TERMCAP=emacs:co#%d:tc=unknown" process-environment apply start-process name buffer command switches] 6]) (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 "\ 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-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 "\ 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-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 "\ List in help buffer the buffer's input history." nil]) (byte-code "\"\"\"" [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] 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] comint-search-start #[(arg) "\nVĂ\\!\"\nY Ç!S" [comint-input-ring-index mod arg 0 1 -1 ring-length comint-input-ring] 4]] 3) (defalias 'comint-previous-input-string #[(arg) " \n\f\n\\ !\"\f\"" [ring-ref comint-input-ring comint-input-ring-index mod arg ring-length] 6 "\ Return the string ARG places along the input ring. Moves relative to `comint-input-ring-index'."]) (defalias 'comint-previous-input #[(arg) "\n\"" [comint-previous-matching-input "." arg] 3 "\ Cycle backwards through input history." "*p"]) (defalias 'comint-next-input #[(arg) " [!" [comint-previous-input arg] 2 "\ Cycle forwards through input history." "*p"]) (defalias 'comint-previous-matching-input-string #[(regexp arg) " \n\" \")" [comint-previous-matching-input-string-position regexp arg pos ring-ref comint-input-ring] 4 "\ Return the string matching REGEXP ARG places along the input ring. Moves relative to `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 "\ 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 #[(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 "\ 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." (comint-regexp-arg "Previous input matching (regexp): ")]) (defalias 'comint-next-matching-input #[(regexp arg) " \n[\"" [comint-previous-matching-input regexp arg] 3 "\ 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." (comint-regexp-arg "Next input matching (regexp): ")]) (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 "\ 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." "p"]) (defalias 'comint-next-matching-input-from-input #[(arg) " [!" [comint-previous-matching-input-from-input arg] 2 "\ 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." "p"]) (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 "\ 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." nil]) (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 "\ Expand directory stack reference before point. See `comint-replace-by-expanded-history'. Returns t if successful."]) (defalias 'comint-magic-space #[(arg) " \n!" [comint-replace-by-expanded-history self-insert-command arg] 2 "\ Expand input history references before point and insert ARG spaces. A useful command to bind to SPC. See `comint-replace-by-expanded-history'." "p"]) (defalias 'comint-within-quotes #[(beg end) "\n #\n #\"U \"U*" [comint-how-many-region "\\(^\\|[^\\\\]\\)'" beg end "\\(^\\|[^\\\\]\\)\"" countdq countsq mod 2 1] 5 "\ Return t if the number of quotes between BEG and END is odd. Quotes are single and double."]) (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 "\ Return number of matches for REGEXP from BEG to END."]) (byte-code "\"\"" [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] 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]] 3) (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 (lambda (a) a) " "] 8 "\ 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-send-input #[nil "p!! !` !Y(\" `{7 \n b\nc\n) \f=E L! `{ \f=Z n! `{\n `| c\n)| `|c!!!\"\"@ P!A) ȓ `ȓ !`ȓ!  \" \",)" [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 comint-input-filter-functions functions "\n" comint-input-ring-index comint-last-input-start comint-last-input-end comint-input-sender comint-output-filter ""] 4 "\ 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." nil]) (defalias (quote comint-output-filter) #[(process string) " !\n!pĉ\nq`ed G\n \f~ !b`\n`XG \\`WU \\` X`  \\ ! !`Ux ` GZ\"!`U Zē\nē !`ē + }b@ !A)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 comint-output-filter-functions functions] 5]) (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 "\ 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-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 "\ 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-show-maximum-output #[nil "db!" [recenter -1] 2 "\ Put the end of the buffer at the bottom of the window." nil]) (defalias 'comint-get-old-input-default #[nil "y `\n`{*" [0 comint-skip-prompt beg nil] 2 "\ Default for `comint-get-old-input'. Take the current line, and discard any initial text matching `comint-prompt-regexp'."]) (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 "\ Insert after prompt old input at point as new input to be edited. Calls `comint-get-old-input' to get old input." nil]) (defalias 'comint-skip-prompt #[nil "`) !ĕ Xĕb)" [nil eol looking-at comint-prompt-regexp 0] 2 "\ 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-after-pmark-p #[nil "p!!\n!`X)" [process-mark get-buffer-process pmark marker-position] 3 "\ Return t if point is after the process output marker."]) (defalias 'comint-simple-send #[(proc string) " \n\" \"" [comint-send-string proc string "\n"] 3 "\ 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-bol #[(arg) "y ?\n " [0 arg comint-skip-prompt] 1 "\ 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." "P"]) (defalias 'comint-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 "\ 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 '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 "\ 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]." "P"]) (defalias 'comint-watch-for-password-prompt #[(string) " \n\"\n!" [string-match comint-password-prompt-regexp string send-invisible nil] 3 "\ 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'."]) (defvar comint-input-chunk-size 512 "\ *Long inputs are sent to comint processes in chunks of this size. If your process is choking on big inputs, try lowering the value.") (defalias 'comint-send-string #[(proc str) "G\n^  O\" W3 \n\\ !  ^O\")*" [str len comint-input-chunk-size i process-send-string proc 0 next-i accept-process-output sit-for] 7 "\ 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 `comint-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 'comint-send-region #[(proc start end) " \n {\"" [comint-send-string proc start end] 4 "\ 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 `comint-send-string'."]) (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 "\ Kill all output from interpreter since last input. Does not delete the prompt." nil]) (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 "\ Display start of this batch of interpreter output at top of window. Sets mark to the value of point when this command is run." nil]) (defalias 'comint-interrupt-subjob #[nil "\n\"" [interrupt-process nil comint-ptyp] 3 "\ Interrupt the current subjob." nil]) (defalias 'comint-kill-subjob #[nil "\n\"" [kill-process nil comint-ptyp] 3 "\ Send kill signal to the current subjob." nil]) (defalias 'comint-quit-subjob #[nil "\n\"" [quit-process nil comint-ptyp] 3 "\ Send quit signal to the current subjob." nil]) (defalias 'comint-stop-subjob #[nil "\n\"" [stop-process nil comint-ptyp] 3 "\ 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.)" nil]) (defalias 'comint-continue-subjob #[nil "\n\"" [continue-process nil comint-ptyp] 3 "\ Send CONT signal to process buffer's process group. Useful if you accidentally suspend the top-level process." nil]) (defalias 'comint-kill-input #[nil "p!!`\n!V\n`\")" [process-mark get-buffer-process pmark marker-position kill-region] 3 "\ Kill all text from last stuff output by interpreter to point." nil]) (defalias 'comint-delchar-or-maybe-eof #[(arg) "m \n!" [process-send-eof delete-char arg] 2 "\ Delete ARG characters forward, or (if at eob) send an EOF to subprocess." "p"]) (defalias 'comint-send-eof #[nil " " [process-send-eof] 1 "\ Send an EOF to the current buffer's process." nil]) (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 "\ 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." (comint-regexp-arg "Backward input matching (regexp): ")]) (defalias 'comint-forward-matching-input #[(regexp arg) " \n[\"" [comint-backward-matching-input regexp arg] 3 "\ 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." (comint-regexp-arg "Forward input matching (regexp): ")]) (defalias 'comint-next-prompt #[(n) "\nV\fĂ \n! )" [comint-prompt-regexp paragraph-start n 0 1 forward-paragraph comint-skip-prompt] 2 "\ Move to end of Nth next prompt in the buffer. See `comint-prompt-regexp'." "p"]) (defalias 'comint-previous-prompt #[(n) " [!" [comint-next-prompt n] 2 "\ Move to end of Nth previous prompt in the buffer. See `comint-prompt-regexp'." "p"]) (byte-code "\"\"" [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] 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]] 3) (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 "\ Return string around POINT that starts the current line, or nil."]) (byte-code "\"\"" [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] 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]] 3) (defvar comint-completion-autolist nil "\ *If non-nil, automatically list possiblities on partial completion. This mirrors the optional behavior of tcsh.") (defvar comint-completion-addsuffix t "\ *If non-nil, add a `/' to completed directories, ` ' to file names. This mirrors the optional behavior of tcsh.") (defvar comint-completion-recexact nil "\ *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-fignore nil "\ *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-file-name-prefix "" "\ 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.") (defalias (quote comint-directory) #[(directory) "\n! \nP\n!" [expand-file-name file-name-absolute-p directory comint-file-name-prefix] 3]) (defalias 'comint-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 "\ 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-match-partial-filename #[nil "! \n!)" [comint-word "~/A-Za-z0-9+@:_.$#,={}-" filename substitute-in-file-name] 3 "\ Return the filename at point, or nil if non is found. Environment variables are substituted. See `comint-word'."]) (defalias 'comint-dynamic-complete #[nil " @ ? A)" [comint-dynamic-complete-functions functions nil] 2 "\ 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." nil]) (defalias 'comint-dynamic-complete-filename #[nil "  =! " [comint-match-partial-filename selected-window minibuffer-window message "Completing file name..." comint-dynamic-complete-as-filename] 2 "\ 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." nil]) (defalias 'comint-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 comint-completion-fignore completion-ignored-extensions t success comint-match-partial-filename "" filename file-name-directory pathdir file-name-nondirectory pathnondir comint-directory default-directory directory file-name-completion completion selected-window minibuffer-window mini-flag message "No completions of %s" comint-completion-addsuffix " " "Sole completion" comint-dynamic-list-filename-completions file-name-as-directory file directory-file-name file-directory-p "/" "Completed" comint-completion-recexact file-exists-p "Completed shortest" comint-completion-autolist "Partially completed"] 3 "\ Dynamically complete at point as a filename. See `comint-dynamic-complete-filename'. Returns t if successful."]) (defalias 'comint-replace-by-expanded-filename #[nil " !É# " [replace-match expand-file-name comint-match-partial-filename t comint-dynamic-complete-filename] 4 "\ 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'." nil]) (defalias 'comint-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" comint-completion-addsuffix " " sole try-completion comint-completion-recexact "Completed shortest" shortest comint-completion-autolist comint-dynamic-list-completions listed "Partially completed" partial] 4 "\ 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-list-filename-completions #[nil " \f!\f!!!\n  \" 6 !:\f\"." [nil completion-ignore-case comint-match-partial-filename "" filename file-name-directory pathdir file-name-nondirectory pathnondir comint-directory default-directory directory file-name-all-completions completions comint-dynamic-list-completions message "No completions of %s"] 4 "\ List in help buffer possible completions of the filename at point." nil]) (defalias 'comint-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 "\ List in help buffer sorted COMPLETIONS. Typing SPC flushes the help buffer."]) (provide (quote comint))