;;; compiled by eric@geech.gnu.ai.mit.edu on Mon Mar 22 13:26:51 1993
;;; from file /gd/gnu/emacs/19.0/lisp/cmuscheme.el
;;; emacs version 19.0.506.
;;; bytecomp version FSF 2.08
;;; optimization is on.

(byte-code "ÀÁ!ˆÀÂ!‡" [require scheme comint] 2)
(defvar inferior-scheme-mode-hook nil "\
*Hook for customising inferior-scheme mode.")
(byte-code "ÀÁ!„ Â	„, Ã!Å	ÆÇ#ˆÅ	ÈÉ#ˆÅ	ÊË#ˆÅ	ÌÍ#ˆÎ	!ˆÅÆÇ#ˆÅÈÉ#ˆÅÐÇ#ˆÅÑÒ#ˆÅÓÔ#ˆÅÕÖ#ˆÅ×Ø#ˆÅÙÚ#ˆÅÛÜ#ˆÅÊË#ˆÅÌÍ#‡" [boundp inferior-scheme-mode-map nil full-copy-sparse-keymap comint-mode-map define-key "˜" scheme-send-definition "" scheme-send-last-sexp "" scheme-load-file "" scheme-compile-file scheme-mode-commands scheme-mode-map "" "å" scheme-send-definition-and-go "" scheme-send-region "ò" scheme-send-region-and-go "ã" scheme-compile-definition "" scheme-compile-definition-and-go "" switch-to-scheme] 4)
(fset 'inferior-scheme-mode #[nil "À ˆÁÃ ˆÄÆÈ	Ê!ˆÌÎÐÒÓ!‡" [comint-mode "^[^>]*>+ *" comint-prompt-regexp scheme-mode-variables inferior-scheme-mode major-mode "Inferior Scheme" mode-name (": %s") mode-line-process use-local-map inferior-scheme-mode-map scheme-input-filter comint-input-filter ignore comint-input-sentinel scheme-get-old-input comint-get-old-input run-hooks inferior-scheme-mode-hook] 2 "\
Major mode for interacting with an inferior Scheme process.

The following commands are available:
\\{inferior-scheme-mode-map}

A Scheme process can be fired up with M-x run-scheme.

Customisation: Entry to this mode runs the hooks on comint-mode-hook and
inferior-scheme-mode-hook (in that order).

You can send text to the inferior Scheme process from other buffers containing
Scheme source.  
    switch-to-scheme switches the current buffer to the Scheme process buffer.
    scheme-send-definition sends the current definition to the Scheme process.
    scheme-compile-definition compiles the current definition.
    scheme-send-region sends the current region to the Scheme process.
    scheme-compile-region compiles the current region.

    scheme-send-definition-and-go, scheme-compile-definition-and-go,
        scheme-send-region-and-go, and scheme-compile-region-and-go
        switch to the Scheme process buffer after sending their text.
For information on running multiple processes in multiple buffers, see
documentation for variable scheme-buffer.

Commands:
Return after the end of the process' output sends the text from the 
    end of process to point.
Return before the end of the process' output copies the sexp ending at point
    to the end of the process' output, and sends it.
Delete converts tabs to spaces as it moves back.
Tab indents for Scheme; with argument, shifts rest
    of expression rigidly with the current line.
C-M-q does Tab on each line starting within following expression.
Paragraphs are separated only by blank lines.  Semicolons start comments.
If you accidentally suspend your process, use \\[comint-continue-subjob]
to continue it." nil])
(defvar inferior-scheme-filter-regexp "\\`\\s *\\S ?\\S ?\\s *\\'" "\
*Input matching this regexp are not saved on the history list.
Defaults to a regexp ignoring all inputs of 0, 1, or 2 letters.")
(fset 'scheme-input-filter #[(str) "À	\n\"?‡" [string-match inferior-scheme-filter-regexp str] 3 "\
Don't save anything matching inferior-scheme-filter-regexp"])
(fset 'scheme-get-old-input #[nil "Š`Á ˆÂ`\"*‡" [end backward-sexp buffer-substring] 3 "\
Snarf the sexp ending at point"])
(fset (quote scheme-args-to-list) #[(string) "ÀÁ\n\"‰„ \nC‚: ÄU„% \nÄOÅ\nÆ\\\nGO!B‚: ÀÇ\n\"‰??…9 Å\n\nGO!))‡" [string-match "[ 	]" string where 0 scheme-args-to-list 1 "[^ 	]" pos] 6])
(defvar scheme-program-name "scheme" "\
*Program invoked by the run-scheme command")
(fset 'scheme #[(&rest foo) "ÀÁ!ˆÂ ‡" [message "Use run-scheme" ding] 2 "\
Use run-scheme" nil])
(fset 'run-scheme #[(cmd) "ÀÁ!„ Â!ÅÆÇ@ÈA%qˆÉ ˆ)Á\nËÁ!‡" [comint-check-proc "*scheme*" scheme-args-to-list cmd cmdlist apply make-comint "scheme" nil inferior-scheme-mode scheme-buffer switch-to-buffer] 6 "\
Run an inferior Scheme process, input and output via buffer *scheme*.
If there is a process already running in *scheme*, just switch to that buffer.
With argument, allows you to edit the command line (default is value
of scheme-program-name).  Runs the hooks from inferior-scheme-mode-hook
(after the comint-mode-hook is run).
(Type \\[describe-mode] in the process buffer for a list of commands.)" (list (if current-prefix-arg (read-string "Run Scheme: " scheme-program-name) scheme-program-name))])
(fset 'scheme-send-region #[(start end) "ÀÁ \n#ˆÄÁ Å\"‡" [comint-send-region scheme-proc start end comint-send-string "\n"] 4 "\
Send the current region to the inferior Scheme process." "r"])
(fset 'scheme-send-definition #[nil "ŠÀ ˆ`Â ˆÃ`	\"*‡" [end-of-defun end beginning-of-defun scheme-send-region] 3 "\
Send the current definition to the inferior Scheme process." nil])
(fset 'scheme-send-last-sexp #[nil "ÀŠÁ ˆ`)`\"‡" [scheme-send-region backward-sexp] 3 "\
Send the previous sexp to the inferior Scheme process." nil])
(defvar scheme-compile-exp-command "(compile '%s)" "\
*Template for issuing commands to compile arbitrary Scheme expressions.")
(fset 'scheme-compile-region #[(start end) "ÀÁ ÂÂÄÅ\"\"\"\"ˆÀÁ È\"‡" [comint-send-string scheme-proc format scheme-compile-exp-command "(begin %s)" buffer-substring start end "\n"] 9 "\
Compile the current region in the inferior Scheme process.
(A BEGIN is wrapped around the region: (BEGIN <region>))" "r"])
(fset 'scheme-compile-definition #[nil "ŠÀ ˆ`Â ˆÃ`	\"*‡" [end-of-defun end beginning-of-defun scheme-compile-region] 3 "\
Compile the current definition in the inferior Scheme process." nil])
(fset 'switch-to-scheme #[(eob-p) "À	!ƒ Â	!ˆ‚ ÃÄ!ˆ… Æ ˆdb‡" [get-buffer scheme-buffer pop-to-buffer error "No current process buffer. See variable scheme-buffer." eob-p push-mark] 2 "\
Switch to the scheme process buffer.
With argument, positions cursor at end of buffer." "P"])
(fset 'scheme-send-region-and-go #[(start end) "À	\n\"ˆÃÄ!‡" [scheme-send-region start end switch-to-scheme t] 3 "\
Send the current region to the inferior Scheme process.
Then switch to the process buffer." "r"])
(fset 'scheme-send-definition-and-go #[nil "À ˆÁÂ!‡" [scheme-send-definition switch-to-scheme t] 2 "\
Send the current definition to the inferior Scheme. 
Then switch to the process buffer." nil])
(fset 'scheme-compile-definition-and-go #[nil "À ˆÁÂ!‡" [scheme-compile-definition switch-to-scheme t] 2 "\
Compile the current definition in the inferior Scheme. 
Then switch to the process buffer." nil])
(fset 'scheme-compile-region-and-go #[(start end) "À	\n\"ˆÃÄ!‡" [scheme-compile-region start end switch-to-scheme t] 3 "\
Compile the current region in the inferior Scheme. 
Then switch to the process buffer." "r"])
(defvar scheme-source-modes (quote (scheme-mode)) "\
*Used to determine if a buffer contains Scheme source code.
If it's loaded into a buffer that is in one of these major modes, it's
considered a scheme source file by scheme-load-file and scheme-compile-file.
Used by these commands to determine defaults.")
(defvar scheme-prev-l/c-dir/file nil "\
Caches the last (directory . file) pair.
Caches the last pair used in the last scheme-load-file or
scheme-compile-file command. Used for determining the default in the 
next one.")
(fset 'scheme-load-file #[(file-name) "À	!ˆÂ	!Ã	!BÅÆ Ç	ÈQ\"‡" [comint-check-source file-name file-name-directory file-name-nondirectory scheme-prev-l/c-dir/file comint-send-string scheme-proc "(load \"" "\")\n"] 5 "\
Load a Scheme file into the inferior Scheme process." (comint-get-source "Load Scheme file: " scheme-prev-l/c-dir/file scheme-source-modes t)])
(fset 'scheme-compile-file #[(file-name) "À	!ˆÂ	!Ã	!BÅÆ Ç	ÈQ\"‡" [comint-check-source file-name file-name-directory file-name-nondirectory scheme-prev-l/c-dir/file comint-send-string scheme-proc "(compile-file \"" "\")\n"] 5 "\
Compile a Scheme file in the inferior Scheme process." (comint-get-source "Compile Scheme file: " scheme-prev-l/c-dir/file scheme-source-modes nil)])
(defvar scheme-buffer nil "\
*The current scheme process buffer.

MULTIPLE PROCESS SUPPORT
===========================================================================
Cmuscheme.el supports, in a fairly simple fashion, running multiple Scheme
processes. To run multiple Scheme processes, you start the first up with
\\[run-scheme]. It will be in a buffer named *scheme*. Rename this buffer
with \\[rename-buffer]. You may now start up a new process with another
\\[run-scheme]. It will be in a new buffer, named *scheme*. You can
switch between the different process buffers with \\[switch-to-buffer].

Commands that send text from source buffers to Scheme processes --
like scheme-send-definition or scheme-compile-region -- have to choose a
process to send to, when you have more than one Scheme process around. This
is determined by the global variable scheme-buffer. Suppose you
have three inferior Schemes running:
    Buffer	Process
    foo		scheme
    bar		scheme<2>
    *scheme*    scheme<3>
If you do a \\[scheme-send-definition-and-go] command on some Scheme source
code, what process do you send it to?

- If you're in a process buffer (foo, bar, or *scheme*), 
  you send it to that process.
- If you're in some other buffer (e.g., a source file), you
  send it to the process attached to buffer scheme-buffer.
This process selection is performed by function scheme-proc.

Whenever \\[run-scheme] fires up a new process, it resets scheme-buffer
to be the new process's buffer. If you only run one process, this will
do the right thing. If you run multiple processes, you can change
scheme-buffer to another process buffer with \\[set-variable].

More sophisticated approaches are, of course, possible. If you find youself
needing to switch back and forth between multiple processes frequently,
you may wish to consider ilisp.el, a larger, more sophisticated package
for running inferior Lisp and Scheme processes. The approach taken here is
for a minimal, simple implementation. Feel free to extend it.")
(fset 'scheme-proc #[nil "À	Â=ƒ p‚ !‰† ÅÆ!)‡" [get-buffer-process major-mode inferior-scheme-mode scheme-buffer proc error "No current process. See variable scheme-buffer"] 4 "\
Returns the current scheme process. See variable scheme-buffer."])
(defvar cmuscheme-load-hook nil "\
This hook is run when cmuscheme is loaded in.
This is a good place to put keybindings.")
(byte-code "ÀÁ!ˆÂÃ!‡" [run-hooks cmuscheme-load-hook provide cmuscheme] 2)
