;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Tue May 3 21:46:01 1994 ;;; from file /gd/gnu/emacs/19.0/lisp/cmuscheme.el ;;; emacs version 19.22.92.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"))) (error "`/gd/gnu/emacs/19.0/lisp/cmuscheme.el' was compiled for Emacs 19")) (byte-code "ÀÁ!ˆÀÂ!‡" [require scheme comint] 2) (defvar inferior-scheme-mode-hook nil "\ *Hook for customising inferior-scheme mode.") (byte-code "ÀÁ!„ „,Ã\f!Å ÆÇ#ˆÅ ÈÉ#ˆÅ ÊË#ˆÅ ÌÍ#ˆÎ !ˆÅÆÇ#ˆÅÈÉ#ˆÅÐÇ#ˆÅÑÒ#ˆÅÓÔ#ˆÅÕÖ#ˆÅ×Ø#ˆÅÙÚ#ˆÅÛÜ#ˆÅÊË#ˆÅÌÍ#‡" [boundp inferior-scheme-mode-map nil copy-keymap comint-mode-map define-key "˜" scheme-send-definition "" scheme-send-last-sexp "\f" 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) (defalias 'inferior-scheme-mode #[nil "À ˆÁà ˆÄÆÈ Ê !ˆÌ ÎÐÑ!‡" [comint-mode "^[^>\n]*>+ *" 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 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.") (defalias 'scheme-input-filter #[(str) "À \n\"?‡" [string-match inferior-scheme-filter-regexp str] 3 "\ Don't save anything matching inferior-scheme-filter-regexp"]) (defalias 'scheme-get-old-input #[nil "Š`Á ˆ`{*‡" [end backward-sexp] 2 "\ Snarf the sexp ending at point"]) (defalias (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") (defalias 'scheme #[(&rest foo) "ÀÁ!ˆÂ ‡" [message "Use run-scheme" ding] 2 "\ Use run-scheme" nil]) (defalias 'run-scheme #[(cmd) "ÀÁ!„ !ÅÆÇ\f@È\fA%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))]) (defalias '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"]) (defalias '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]) (defalias '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.") (defalias 'scheme-compile-region #[(start end) "ÀÁ  ÂÄ {\"\"\"ˆÀÁ Ç\"‡" [comint-send-string scheme-proc format scheme-compile-exp-command "(begin %s)" start end "\n"] 8 "\ Compile the current region in the inferior Scheme process. (A BEGIN is wrapped around the region: (BEGIN ))" "r"]) (defalias '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]) (defalias '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"]) (defalias '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"]) (defalias '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]) (defalias '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]) (defalias '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.") (defalias '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)]) (defalias '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 yourself 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.") (defalias 'scheme-proc #[nil "À Â=ƒ p‚\f !‰†ÅÆ!)‡" [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)