;ELC ;;; Compiled by cph@zurich.ai.mit.edu on Tue Sep 3 11:12:20 2002 ;;; from file /scheme/etc/xscheme.el ;;; in Emacs version 20.7.2 ;;; with bytecomp version 2.56 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`xscheme.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\304\305!\210\306\307\310\311\312%\210\313\314 \"\204\n\315W\203$\316\317\320\321 \322\307&\210\310\207" [:group emacs-version emacs-major-version :type require scheme custom-declare-group xscheme nil "Major mode for editing Scheme and interacting with MIT's C-Scheme." lisp string-match "XEmacs\\|Lucid" 21 custom-declare-variable scheme-program-name "scheme" "*Program invoked by the `run-scheme' command." string] 8) #@43 *Band loaded by the `run-scheme' command. (custom-declare-variable 'scheme-band-name 'nil '(#$ . -1028) :type '(choice (const nil) string) :group 'xscheme) #@70 *Arguments passed to the Scheme program by the `run-scheme' command. (custom-declare-variable 'scheme-program-arguments 'nil '(#$ . -1190) :type '(choice (const nil) string) :group 'xscheme) #@200 If non-nil, an expression may be transmitted while another is evaluating. Otherwise, attempting to evaluate an expression before the previous expression has finished evaluating will signal an error. (custom-declare-variable 'xscheme-allow-pipelined-evaluation 't '(#$ . 1388) :type 'boolean :group 'xscheme) #@122 String to insert into Scheme process buffer first time it is started. Is processed with `substitute-command-keys' first. (custom-declare-variable 'xscheme-startup-message '"This is the Scheme process buffer.\nType \\[advertised-xscheme-send-previous-expression] to evaluate the expression before point.\nType \\[xscheme-send-control-g-interrupt] to abort evaluation.\nType \\[describe-mode] for more information.\n\n" '(#$ . 1703) :type 'string :group 'xscheme) #@76 If non-nil, causes a message to be generated when the Scheme process dies. (custom-declare-variable 'xscheme-signal-death-message 'nil '(#$ . 2171) :type 'boolean :group 'xscheme) #@136 If non-nil, a procedure to call when the Scheme process is started. When called, the current buffer will be the Scheme process-buffer. (custom-declare-variable 'xscheme-start-hook 'nil '(#$ . 2358) :type 'hook :group 'xscheme) (defalias 'xscheme-evaluation-commands #[(keymap) "\301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\303#\210\301\311\312#\210\301\313\314#\207" [keymap define-key "" xscheme-send-definition "" advertised-xscheme-send-previous-expression "o" xscheme-send-buffer "z" " " xscheme-send-previous-expression "" xscheme-send-region] 4]) (defalias 'xscheme-interrupt-commands #[(keymap) "\301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\313#\207" [keymap define-key "" xscheme-select-process-buffer "" xscheme-send-breakpoint-interrupt "" xscheme-send-control-g-interrupt "" xscheme-send-control-u-interrupt "" xscheme-send-control-x-interrupt] 4]) (byte-code "\301!\210\302!\207" [scheme-mode-map xscheme-evaluation-commands xscheme-interrupt-commands] 2) #@118 Run MIT Scheme in an inferior process. Output goes to the buffer `*scheme*'. With argument, asks for a command line. (defalias 'run-scheme #[(command-line) "\303 \n#\207" [command-line xscheme-process-name xscheme-buffer-name xscheme-start] 4 (#$ . 3412) (list (xscheme-read-command-line current-prefix-arg))]) (defalias 'xscheme-start #[(command-line process-name buffer-name) "\304\303\"\210\305\306 \n#!\210\307\303!\210\211\207" [command-line process-name buffer-name xscheme-process-command-line set-default switch-to-buffer xscheme-start-process make-local-variable] 5]) (defalias 'xscheme-read-command-line #[(arg) "\206\303 \n\203\304\305 \"\202 )\207" [xscheme-process-command-line default arg xscheme-default-command-line read-string "Run Scheme: "] 3]) (defalias 'xscheme-default-command-line #[nil "\303 \203\f\304 P\202 \305\n\203\306\nP\202\305R\207" [scheme-program-name scheme-program-arguments scheme-band-name " -emacs" " " "" " -band "] 5]) #@27 Reset the Scheme process. (defalias 'reset-scheme #[nil "\304!\211\203\305 !\306=\203\307\310!\2050\311\312!\210 \203'\313 \314\"\210\315 !\210\316\n #\210\311\317!)\207" [xscheme-process-name process xscheme-process-command-line xscheme-buffer-name get-process process-status run yes-or-no-p "The Scheme process is running, are you SURE you want to reset it? " message "Resetting Scheme process..." kill-process t delete-process xscheme-start-process "Resetting Scheme process...done"] 5 (#$ . 4398) nil]) #@58 Choose a scheme interaction buffer, or create a new one. (defalias 'start-scheme #[(buffer-name &optional globally) "\304!\305 !\211\203\306 !\202=\307 !\203(\310\311\300 !\312\307 !\313\260!\203:\314\315\316!\211#\210 \205=\317!\202=\320\321!*\207" [buffer-name buffer process globally get-buffer-create get-buffer-process switch-to-buffer buffer-file-name yes-or-no-p "Buffer " " contains file " "; start scheme in it? " xscheme-start xscheme-read-command-line t global-set-scheme-interaction-buffer message "start-scheme aborted"] 7 (#$ . 4920) (list (read-buffer "Scheme interaction buffer: " xscheme-buffer-name nil) current-prefix-arg)]) (fset 'select-scheme 'start-scheme) #@44 Set the default scheme interaction buffer. (defalias 'global-set-scheme-interaction-buffer #[(buffer-name) "\304\305\"\306\307\"\210\306\310 \"\210\306\302\212q\210\n)\"\210\306\311\312 !\313=\203' \202(\314\")\207" [buffer-name process-name xscheme-runlight-string default-xscheme-runlight verify-xscheme-buffer nil set-default xscheme-buffer-name xscheme-process-name xscheme-runlight process-status run ""] 4 (#$ . 5619) (list (read-buffer "Scheme interaction buffer: " xscheme-buffer-name t))]) #@59 Set the scheme interaction buffer for the current buffer. (defalias 'local-set-scheme-interaction-buffer #[(buffer-name) "\305\306\"\307\302!\210\307\303!\210 \307\304!\210\212q\210\f)\211)\207" [buffer-name process-name xscheme-buffer-name xscheme-process-name xscheme-runlight verify-xscheme-buffer t make-local-variable] 3 (#$ . 6130) (list (read-buffer "Scheme interaction buffer: " xscheme-buffer-name t))]) #@68 Make the current buffer use the default scheme interaction buffer. (defalias 'local-clear-scheme-interaction-buffer #[nil "\300 \203 \301\302!\210\303\304!\210\303\305!\210\303\306!\207" [xscheme-process-buffer-current-p error "Cannot change the interaction buffer of an interaction buffer" kill-local-variable xscheme-buffer-name xscheme-process-name xscheme-runlight] 2 (#$ . 6556) nil]) (defalias 'verify-xscheme-buffer #[(buffer-name localp) "\203 \304 \203 \305\306!\210\307 !\211\205\310\n!\n\204$\305\311 \"\202A \204/\305\312 \"\202A\212\nq\210\304 \204=\305\312 \"\210)\313 !*\207" [localp buffer-name buffer process xscheme-process-buffer-current-p error "Cannot change the interaction buffer of an interaction buffer" get-buffer get-buffer-process "Buffer does not exist" "Buffer is not a scheme interaction buffer" process-name] 4]) #@3300 Major mode for interacting with an inferior MIT Scheme process. Like scheme-mode except that: \[advertised-xscheme-send-previous-expression] sends the expression before point to the Scheme process as input \[xscheme-yank-pop] yanks an expression previously sent to Scheme \[xscheme-yank-push] yanks an expression more recently sent to Scheme All output from the Scheme process is written in the Scheme process buffer, which is initially named "*scheme*". The result of evaluating a Scheme expression is also printed in the process buffer, preceded by the string ";Value: " to highlight it. If the process buffer is not visible at that time, the value will also be displayed in the minibuffer. If an error occurs, the process buffer will automatically pop up to show you the error message. While the Scheme process is running, the modelines of all buffers in scheme-mode are modified to show the state of the process. The possible states and their meanings are: input waiting for input run evaluating gc garbage collecting The process buffer's modeline contains additional information where the buffer's name is normally displayed: the command interpreter level and type. Scheme maintains a stack of command interpreters. Every time an error or breakpoint occurs, the current command interpreter is pushed on the command interpreter stack, and a new command interpreter is started. One example of why this is done is so that an error that occurs while you are debugging another error will not destroy the state of the initial error, allowing you to return to it after the second error has been fixed. The command interpreter level indicates how many interpreters are in the command interpreter stack. It is initially set to one, and it is incremented every time that stack is pushed, and decremented every time it is popped. The following commands are useful for manipulating the command interpreter stack: \[xscheme-send-breakpoint-interrupt] pushes the stack once \[xscheme-send-control-u-interrupt] pops the stack once \[xscheme-send-control-g-interrupt] pops everything off \[xscheme-send-control-x-interrupt] aborts evaluation, doesn't affect stack Some possible command interpreter types and their meanings are: [Evaluator] read-eval-print loop for evaluating expressions [Debugger] single character commands for debugging errors [Where] single character commands for examining environments Starting with release 6.2 of Scheme, the latter two types of command interpreters will change the major mode of the Scheme process buffer to scheme-debugger-mode , in which the evaluation commands are disabled, and the keys which normally self insert instead send themselves to the Scheme process. The command character ? will list the available commands. For older releases of Scheme, the major mode will be be scheme-interaction-mode , and the command characters must be sent as if they were expressions. Commands: Delete converts tabs to spaces as it moves back. Blank lines separate paragraphs. Semicolons start comments. \{scheme-interaction-mode-map} Entry to this mode calls the value of scheme-interaction-mode-hook with no args, if that value is non-nil. Likewise with the value of scheme-mode-hook. scheme-interaction-mode-hook is called after scheme-mode-hook. (defalias 'scheme-interaction-mode #[(&optional preserve) "\204h \306 \210\307\303!\210\307\305!\210\307\310!\210\307\311!\210\307\312!\210\307\313!\210\307\314!\210\np\315\f!\316 \f\317\f!\211 \203b\320 !\321 !\322 !B \323\324!\210\325 !\210\326 \327\"\210\330 \331\"\210\202g\332\211B +\333 \210\334 \210\335\336\337\"\207" [preserve major-mode previous-mode xscheme-previous-mode buffer xscheme-buffer-name kill-all-local-variables make-local-variable xscheme-process-name xscheme-previous-process-state xscheme-runlight-string xscheme-runlight xscheme-last-input-end buffer-name make-marker get-buffer-process process-name process-filter process-sentinel xscheme-process-filter-initialize t xscheme-modeline-initialize set-process-sentinel xscheme-process-sentinel set-process-filter xscheme-process-filter nil scheme-interaction-mode-initialize scheme-mode-variables run-hooks scheme-mode-hook scheme-interaction-mode-hook process] 4 (#$ . 7422) "P"]) #@44 Take buffer out of scheme interaction mode (defalias 'exit-scheme-interaction-mode #[nil "\305=\204\n\306\307!\210  \210\310p!\211\2052\311\f!\312=\203%\313\f\n@\"\210\314\f!\315=\2052\316\f\nA\"*\207" [major-mode xscheme-previous-process-state previous-state xscheme-previous-mode process scheme-interaction-mode error "Buffer not in scheme interaction mode" get-buffer-process process-filter xscheme-process-filter set-process-filter process-sentinel xscheme-process-sentinel set-process-sentinel] 4 (#$ . 11703) nil]) (defalias 'scheme-interaction-mode-initialize #[nil "\303!\210\304\305\211\207" [scheme-interaction-mode-map major-mode mode-name use-local-map scheme-interaction-mode "Scheme Interaction"] 2]) (defalias 'scheme-interaction-mode-commands #[(keymap) "\211\205\303\n @@ @A@#\210 A\211\204\304)\207" [scheme-interaction-mode-commands-alist entries keymap define-key nil] 5]) (byte-code "\303\300!\204\304\300 B\305\306\"\303\302!\204\304\302 B\n\2044\307 \310\n!\210\311\n!\210\312\n!\210\313\n!\210\304\207" [scheme-interaction-mode-commands-alist current-load-list scheme-interaction-mode-map boundp nil append ((" " xscheme-send-current-line) ("" xscheme-delete-output) ("" xscheme-send-proceed) ("" xscheme-yank) ("p" xscheme-yank-pop) ("n" xscheme-yank-push)) make-keymap scheme-mode-commands xscheme-interrupt-commands xscheme-evaluation-commands scheme-interaction-mode-commands] 3) (defalias 'xscheme-enter-interaction-mode #[nil "\212\301 q\210\302=?\205\303=\203\304 \202\302\305!)\207" [major-mode xscheme-process-buffer scheme-interaction-mode scheme-debugger-mode scheme-interaction-mode-initialize t] 2]) (fset 'advertised-xscheme-send-previous-expression 'xscheme-send-previous-expression) #@316 Major mode for executing the Scheme debugger. Like scheme-mode except that the evaluation commands are disabled, and characters that would normally be self inserting are sent to the Scheme process instead. Typing ? will show you which characters perform useful functions. Commands: \{scheme-debugger-mode-map} (defalias 'scheme-debugger-mode #[nil "\300\301!\207" [error "Illegal entry to scheme-debugger-mode"] 2 (#$ . 13480)]) (defalias 'scheme-debugger-mode-initialize #[nil "\303!\210\304\305\211\207" [scheme-debugger-mode-map major-mode mode-name use-local-map scheme-debugger-mode "Scheme Debugger"] 2]) (defalias 'scheme-debugger-mode-commands #[(keymap) "\302\302\303W\205\304 \305!\306#\210T\211\202)\207" [char keymap 32 127 define-key char-to-string scheme-debugger-self-insert] 5]) (byte-code "\302\300!\204\303\300 B\204\304 \305!\210\306!\210\307!\210\303\207" [scheme-debugger-mode-map current-load-list boundp nil make-keymap scheme-mode-commands xscheme-interrupt-commands scheme-debugger-mode-commands] 2) #@48 Transmit this character to the Scheme process. (defalias 'scheme-debugger-self-insert #[nil "\301!\207" [last-command-char xscheme-send-char] 2 (#$ . 14538) nil]) (defalias 'xscheme-enter-debugger-mode #[(prompt-string) "\212\301 q\210\302=?\205\303=\204\303\304!\210\305 )\207" [major-mode xscheme-process-buffer scheme-debugger-mode scheme-interaction-mode t scheme-debugger-mode-initialize] 2]) (defalias 'xscheme-debugger-mode-p #[nil "\302 \211\205\212q\210 )\303=)\207" [buffer major-mode xscheme-process-buffer scheme-debugger-mode] 3]) #@108 Send the string arguments to the Scheme process. The strings are concatenated and terminated by a newline. (defalias 'xscheme-send-string #[(&rest strings) "\303 \204\304\305!\205-\306 \210\307 \210\310!\207\311 \203\312\313!\207 \204*\n\203*\312\314!\207\310!\207" [strings xscheme-allow-pipelined-evaluation xscheme-running-p xscheme-process-running-p yes-or-no-p "The Scheme process has died. Reset it? " reset-scheme xscheme-wait-for-process xscheme-send-string-1 xscheme-debugger-mode-p error "No sends allowed in debugger mode" "No sends allowed while Scheme running"] 2 (#$ . 15100)]) (defalias 'xscheme-send-string-1 #[(strings) "\303\304\"\305 !\210\n\306=\205\307 !)\207" [strings string major-mode apply concat xscheme-send-string-2 scheme-interaction-mode xscheme-insert-expression] 3]) (defalias 'xscheme-send-string-2 #[(string) "\303!\304 \n\305P\"\210\306 \205\307 !`\310\223)\207" [xscheme-process-name process string get-process process-send-string "\n" xscheme-process-buffer-current-p process-mark nil] 4]) #@64 Select the Scheme process buffer and move to its output point. (defalias 'xscheme-select-process-buffer #[nil "\304!\206 \305\306!\307 !\206\305\310!\311\n!\211\203#\312 !\210\202'\313\n!\210\314 !b+\207" [xscheme-process-name process buffer window get-process error "No scheme process" process-buffer "No process buffer" get-buffer-window select-window switch-to-buffer process-mark] 3 (#$ . 16151) nil]) (defalias 'xscheme-insert-expression #[(string) " B\211G\nV\203\nS \233\304\241\210 \211\207" [string xscheme-expressions-ring xscheme-expressions-ring-max xscheme-expressions-ring-yank-pointer nil] 3]) #@44 Rotate the yanking point in the kill ring. (defalias 'xscheme-rotate-yank-pointer #[(arg) "G\211\305U\203\306\307!\202*\n GZ\\ \246\211\305W\203$\f \\\202%\f\233)\211)\207" [xscheme-expressions-ring length arg xscheme-expressions-ring-yank-pointer index 0 error "Scheme expression ring is empty"] 4 (#$ . 16780) "p"]) #@252 Insert the most recent expression at point. With just C-U as argument, same but put point in front (and mark at end). With argument n, reinsert the nth most recently sent expression. See also the commands \[xscheme-yank-pop] and \[xscheme-yank-push]. (defalias 'xscheme-yank #[(&optional arg) "\302<\203\n\303\202\304=\203\305\202S!\210\306`!\210 @c\210:\205'\307 \207" [arg xscheme-expressions-ring-yank-pointer xscheme-rotate-yank-pointer 0 - -1 push-mark exchange-point-and-mark] 3 (#$ . 17116) "*P"]) (fset 'xscheme-yank-previous-send 'xscheme-yank) #@524 Insert or replace a just-yanked expression with an older expression. If the previous command was not a yank, it yanks. Otherwise, the region contains a stretch of reinserted expression. yank-pop deletes that text and inserts in its place a different expression. With no argument, the next older expression is inserted. With argument n, the n'th older expression is inserted. If n is negative, this is a more recent expression. The sequence of expressions wraps around, so that after the oldest one comes the newest one. (defalias 'xscheme-yank-pop #[(arg) "\305 \305=\204\305 \210\nS\n\306U?\2052`\307 W`\307 |\210\310\n!\210\311`!\210\f@c\210 \2051\312 )\207" [this-command last-command arg before xscheme-expressions-ring-yank-pointer xscheme-yank 0 mark xscheme-rotate-yank-pointer set-mark exchange-point-and-mark] 2 (#$ . 17689) "*p"]) #@541 Insert or replace a just-yanked expression with a more recent expression. If the previous command was not a yank, it yanks. Otherwise, the region contains a stretch of reinserted expression. yank-pop deletes that text and inserts in its place a different expression. With no argument, the next more recent expression is inserted. With argument n, the n'th more recent expression is inserted. If n is negative, a less recent expression is used. The sequence of expressions wraps around, so that after the oldest one comes the newest one. (defalias 'xscheme-yank-push #[(arg) "\301[!\207" [arg xscheme-yank-pop] 2 (#$ . 18547) "*p"]) #@92 Send the current region to the Scheme process. The region is sent terminated by a newline. (defalias 'xscheme-send-region #[(start end) "\304 \203b\210n\204\305\306!\210\307\310 !!`\311\223\210\n`\311\223\210\312 {!\207" [end xscheme-process-name xscheme-last-input-end start xscheme-process-buffer-current-p insert-before-markers 10 process-mark get-process nil xscheme-send-string] 3 (#$ . 19189) "r"]) #@186 Send the current definition to the Scheme process. If the current line begins with a non-whitespace character, parse an expression from the beginning of the line and send that instead. (defalias 'xscheme-send-definition #[nil "\302\211\212\303 \210`\304\305\302\306#\203`\202\307\310!\210)\311 \"*\207" [end start nil end-of-defun re-search-backward "^\\s(" t error "Can't find definition" xscheme-send-region] 4 (#$ . 19607) nil]) #@68 Send the expression to the right of `point' to the Scheme process. (defalias 'xscheme-send-next-expression #[nil "`\301\212\302 \210`)\")\207" [start xscheme-send-region forward-sexp] 3 (#$ . 20054) nil]) #@67 Send the expression to the left of `point' to the Scheme process. (defalias 'xscheme-send-previous-expression #[nil "`\301\212\302 \210`)\")\207" [end xscheme-send-region backward-sexp] 3 (#$ . 20267) nil]) #@98 Send the current line to the Scheme process. Useful for working with debugging Scheme under adb. (defalias 'xscheme-send-current-line #[nil "\212\302y\210`\303\210`{*\303\210\304c\210\305 !)\207" [start line 0 nil 10 xscheme-send-string-2] 2 (#$ . 20482) nil]) #@48 Send the current buffer to the Scheme process. (defalias 'xscheme-send-buffer #[nil "\300 \203 \301\302!\210\303ed\"\207" [xscheme-process-buffer-current-p error "Not allowed to send this buffer's contents to Scheme" xscheme-send-region] 3 (#$ . 20754) nil]) #@59 Prompt for a character and send it to the Scheme process. (defalias 'xscheme-send-char #[(char) "\302\303 !\"\207" [xscheme-process-name char process-send-string char-to-string] 4 (#$ . 21020) "cCharacter to send: "]) #@54 Delete all output from interpreter since last input. (defalias 'xscheme-delete-output #[nil "\302p!\212\303!b\210\304\305 \306#\210\307y\210\310 !`W\205\" `|\210\311\312!*\207" [proc xscheme-last-input-end get-buffer-process process-mark re-search-backward "^;\\(Unspecified return value$\\|Value\\( [0-9]+\\)?: \\|\\(Abort\\|Up\\|Quit\\)!$\\)" t 0 marker-position insert-before-markers "*** output flushed ***\n"] 4 (#$ . 21245) nil]) #@49 Cause the Scheme process to enter a breakpoint. (defalias 'xscheme-send-breakpoint-interrupt #[nil "\300\301\302\"\207" [xscheme-send-interrupt 98 nil] 3 (#$ . 21690) nil]) #@56 Cause the Scheme process to proceed from a breakpoint. (defalias 'xscheme-send-proceed #[nil "\301\302\"\207" [xscheme-process-name process-send-string "(proceed)\n"] 3 (#$ . 21869) nil]) #@96 Cause the Scheme processor to halt and flush input. Control returns to the top level rep loop. (defalias 'xscheme-send-control-g-interrupt #[nil "\306 \204\f\307\n!\2021\212 q\210\f)\203\310\311!\2021\212 q\210\306)\310 !\210\307\n!\210\312\313!\210\314\315!)\207" [inhibit-quit xscheme-control-g-synchronization-p xscheme-process-name xscheme-buffer-name xscheme-control-g-disabled-p xscheme-control-g-message-string t interrupt-process message "Relax..." sleep-for 0.1 xscheme-send-char 0] 2 (#$ . 22064) nil]) (byte-code "\302\300 B\300\207" [xscheme-control-g-message-string current-load-list "Sending C-G interrupt to Scheme..."] 2) #@67 Cause the Scheme process to halt, returning to previous rep loop. (defalias 'xscheme-send-control-u-interrupt #[nil "\300\301\302\"\207" [xscheme-send-interrupt 117 t] 3 (#$ . 22717) nil]) #@66 Cause the Scheme process to halt, returning to current rep loop. (defalias 'xscheme-send-control-x-interrupt #[nil "\300\301\302\"\207" [xscheme-send-interrupt 120 t] 3 (#$ . 22912) nil]) #@49 Send a ^A type interrupt to the Scheme process. (defalias 'xscheme-send-interrupt #[(char mark-p) "\304!\210\305\306!\210\307 !\210\n\205 \205\307\310!\207" [xscheme-process-name char mark-p xscheme-control-g-synchronization-p quit-process sleep-for 0.1 xscheme-send-char 0] 2 (#$ . 23106) "cInterrupt character to send: "]) #@55 Command used to start the most recent Scheme process. (defvar xscheme-process-command-line nil (#$ . 23442)) #@64 Name of xscheme process that we're currently interacting with. (defvar xscheme-process-name "scheme" (#$ . 23557)) #@63 Name of xscheme buffer that we're currently interacting with. (defvar xscheme-buffer-name "*scheme*" (#$ . 23678)) #@45 *Maximum length of Scheme expressions ring. (defvar xscheme-expressions-ring-max 30 (#$ . -23799)) #@65 List of expressions recently transmitted to the Scheme process. (defvar xscheme-expressions-ring nil (#$ . 23904)) #@77 The tail of the Scheme expressions ring whose car is the last thing yanked. (defvar xscheme-expressions-ring-yank-pointer nil (#$ . 24025)) (byte-code "\301B\301\207" [current-load-list xscheme-last-input-end] 2) #@213 State of scheme process escape reader state machine: idle waiting for an escape sequence reading-type received an altmode but nothing else reading-string reading prompt string (defvar xscheme-process-filter-state 'idle (#$ . 24247)) #@125 This variable, if nil, indicates that the scheme process is waiting for input. Otherwise, it is busy evaluating something. (defvar xscheme-running-p nil (#$ . 24523)) #@201 If non-nil, insert markers in the scheme input stream to indicate when control-g interrupts were signaled. Do not allow more control-g's to be signaled until the scheme process acknowledges receipt. (defconst xscheme-control-g-synchronization-p t (#$ . 24698)) #@142 This variable, if non-nil, indicates that a control-g is being processed by the scheme process, so additional control-g's are to be ignored. (defvar xscheme-control-g-disabled-p nil (#$ . 24967)) #@109 This variable, if nil, prevents output from the scheme process from being inserted into the process-buffer. (defvar xscheme-allow-output-p t (#$ . 25170)) #@35 The current scheme prompt string. (defvar xscheme-prompt "" (#$ . 25331)) #@68 Accumulator for the string being received from the scheme process. (defvar xscheme-string-accumulator "" (#$ . 25411)) #@64 Procedure to send the string argument from the scheme process. (defvar xscheme-string-receiver nil (#$ . 25536)) #@59 Default global (shared) xscheme-runlight modeline format. (defconst default-xscheme-runlight '(": " xscheme-runlight-string) (#$ . 25655)) (byte-code "\304\300!\204\305\300 B\304\302!\204\306\302 B\304\303!\204 \306\303 B\307\310\311\"\210\312\313\314\"\207" [xscheme-runlight current-load-list xscheme-runlight-string xscheme-mode-string boundp "" nil set-default scheme-mode-line-process ("" xscheme-runlight) mapcar make-variable-buffer-local (xscheme-expressions-ring xscheme-expressions-ring-yank-pointer xscheme-process-filter-state xscheme-running-p xscheme-control-g-disabled-p xscheme-allow-output-p xscheme-prompt xscheme-string-accumulator xscheme-mode-string scheme-mode-line-process)] 3) (defalias 'xscheme-start-process #[(command-line the-process the-buffer) "\306!\307 !\212 q\210\n\203\"\310\n!\311>\203\"\312\n!d\313\223\210\202\213\n\203*\314\n!\210db\210\315\313!\210 o\203=\316\317 !!\210\313 \320\321 \322!!BB\")\323\n! \232\204Y\323\n!\324 !\232\204f\324 !\"\325\326\f\"#\210\312\n!d\313\223\210\327\330!\210\331\"!\210\332\n\333\"\210\334\n\335\"\210\336\337!\210* )\207" [the-buffer buffer process the-process xscheme-process-name xscheme-startup-message get-buffer-create get-buffer-process process-status (run stop) process-mark nil delete-process scheme-interaction-mode insert-before-markers substitute-command-keys apply start-process xscheme-parse-command-line process-name buffer-name message "Starting process %s in buffer %s" xscheme-process-filter-initialize t xscheme-modeline-initialize set-process-sentinel xscheme-process-sentinel set-process-filter xscheme-process-filter run-hooks xscheme-start-hook process-connection-type command-line xscheme-buffer-name] 6]) (defalias 'xscheme-parse-command-line #[(string) "\304!\305\306\n\203=\307\310\n#\211\204!\n\306O B\306\2028 \nU\203/\307\311\n#\2028\n O B T)\202 \237*\207" [string result start index substitute-in-file-name 0 nil string-match "[ ]" "[^ ]"] 5]) (defalias 'xscheme-wait-for-process #[nil "\301\302!\210\205\301\303!\210\202\207" [xscheme-running-p sleep-for 2 1] 2]) #@59 True iff there is a Scheme process whose status is `run'. (defalias 'xscheme-process-running-p #[nil "\302!\211\205 \303 !\304=)\207" [xscheme-process-name process get-process process-status run] 3 (#$ . 27788)]) (defalias 'xscheme-process-buffer #[nil "\302!\211\205 \303 !)\207" [xscheme-process-name process get-process process-buffer] 3]) (defalias 'xscheme-process-buffer-window #[nil "\301 \211\205\n\302!)\207" [buffer xscheme-process-buffer get-buffer-window] 3]) #@59 True iff the current buffer is the Scheme process buffer. (defalias 'xscheme-process-buffer-current-p #[nil "\300 p=\207" [xscheme-process-buffer] 2 (#$ . 28275)]) (defalias 'xscheme-process-sentinel #[(proc reason) "\306!\307 !\212 q\210\310 \311=!\210 \311=\204)\312\313\n\314\315!\232\203)\316\317\312\"\210 \320>?\205;\205;\321 \210\322\323!+\207" [proc buffer name reason scheme-mode-line-process xscheme-mode-string process-buffer buffer-name xscheme-process-filter-initialize run "" "no process" default-value xscheme-buffer-name set-default xscheme-runlight (run stop) beep message "The Scheme process has died! Do M-x reset-scheme to restart it" xscheme-signal-death-message] 3]) (defalias 'xscheme-process-filter-initialize #[(running-p) "\306 \307\310\311 \203+\312p!\313\314!\210\315\316!\232\203*\317\320\"\210)=\204:\311\232\203A\321\316\321\322F\323\233 \203M\322\202N\324\240\207" [xscheme-process-filter-state running-p xscheme-running-p xscheme-control-g-disabled-p xscheme-allow-output-p xscheme-prompt idle nil t "" buffer-name (": " xscheme-runlight-string) xscheme-modeline-initialize default-value xscheme-buffer-name set-default xscheme-runlight ": " "?" 3 "no process" name scheme-mode-line-process default-xscheme-runlight] 4]) (defalias 'xscheme-process-filter #[(proc string) "\306\n\205\324\306\212\307 !q\210\f\310=\203>\311\312\n\"\211\2031\313\n\314 O!\210\n T\306O\315\202:\n\306\313!\210))\202\307\f\315=\203\nG\314U\203P\306\202\307\n\314H\n\316\306O\317\"\211\203s\3208A@!\210\202{\313\321\"\210\310*\202\307\f\322=\203\303\311\312\n\"\211\203\267\n\314 OP\n T\306O\310<\203\256@\202\263!\210)\202\277\nP\306)\202\307\323\324!\210) \203 !\210\202*\207" [string call-noexcursion xscheme-filter-input proc xscheme-process-filter-state start nil process-buffer idle string-match "" xscheme-process-filter-output 0 reading-type 1 assoc 2 27 reading-string error "Scheme process filter -- bad state" char xscheme-process-filter-alist entry xscheme-string-accumulator xscheme-string-receiver] 5]) (defalias 'xscheme-process-filter-output #[(&rest args) "\205_\306\307 \"\212\310 \210`\311\312\n\"\203G\313\224\313\225\314\n\313 O!\210\n H\315U\203:n\2043\314\316!\210\314\315!\210\202=\317 \210\n T\320O*\202\314\n!\210\205^\321!`\232\205^ \320\223+\207" [xscheme-allow-output-p args string old-point end start apply concat xscheme-goto-output-point string-match "\\(\\|\f\\)" 0 insert-before-markers 12 10 beep nil marker-position xscheme-last-input-end] 4]) (defalias 'xscheme-guarantee-newlines #[(n) "\205;\212\303 \210\304 \204%n\203%\nSo\203\305\211\202 \306 \210\202\n)\303 \210\n\307V\205:\310\311!\210\nS\211\202*)\207" [xscheme-allow-output-p stop n xscheme-goto-output-point nil t backward-char 0 insert-before-markers 10] 3]) (defalias 'xscheme-goto-output-point #[nil "\302!\303 !q\210\304 !b)\207" [xscheme-process-name process get-process process-buffer process-mark] 2]) (defalias 'xscheme-modeline-initialize #[(name) "\304 \305\306!\232\203\307\300\304\"\210\304 \310P\302D\211\207" [xscheme-runlight-string name xscheme-mode-string mode-line-buffer-identification "" default-value xscheme-buffer-name set-default ": "] 3]) (defalias 'xscheme-set-runlight #[(runlight) "\303p!\304\305!\232\203\306\301\"\210\307\n\233\240\210\310\311!\207" [runlight xscheme-runlight-string xscheme-runlight buffer-name default-value xscheme-buffer-name set-default 3 force-mode-line-update t] 3]) #@673 Table used to decide how to handle process filter commands. Value is a list of entries, each entry is a list of three items. The first item is the character that the process filter dispatches on. The second item is the action to be taken, a function. The third item is the handler for the entry, a function. When the process filter sees a command whose character matches a particular entry, it calls the handler with two arguments: the action and the string containing the rest of the process filter's input stream. It is the responsibility of the handler to invoke the action with the appropriate arguments, and to reenter the process filter with the remaining input. (defvar xscheme-process-filter-alist '((65 xscheme-eval xscheme-process-filter:string-action-noexcursion) (68 xscheme-enter-debugger-mode xscheme-process-filter:string-action) (69 xscheme-eval xscheme-process-filter:string-action) (80 xscheme-set-prompt-variable xscheme-process-filter:string-action) (82 xscheme-enter-interaction-mode xscheme-process-filter:simple-action) (98 xscheme-start-gc xscheme-process-filter:simple-action) (99 xscheme-unsolicited-read-char xscheme-process-filter:simple-action) (101 xscheme-finish-gc xscheme-process-filter:simple-action) (102 xscheme-exit-input-wait xscheme-process-filter:simple-action) (103 xscheme-enable-control-g xscheme-process-filter:simple-action) (105 xscheme-prompt-for-expression xscheme-process-filter:string-action) (109 xscheme-message xscheme-process-filter:string-action) (110 xscheme-prompt-for-confirmation xscheme-process-filter:string-action) (111 xscheme-output-goto xscheme-process-filter:simple-action) (112 xscheme-set-prompt xscheme-process-filter:string-action) (115 xscheme-enter-input-wait xscheme-process-filter:simple-action) (118 xscheme-write-value xscheme-process-filter:string-action) (119 xscheme-cd xscheme-process-filter:string-action) (122 xscheme-display-process-buffer xscheme-process-filter:simple-action)) (#$ . 31877)) (defalias 'xscheme-process-filter:simple-action #[(action) "\302 \207" [xscheme-process-filter-state action idle] 1]) (defalias 'xscheme-process-filter:string-action #[(action) "\304\305\211\207" [action xscheme-string-receiver xscheme-string-accumulator xscheme-process-filter-state "" reading-string] 2]) (defalias 'xscheme-process-filter:string-action-noexcursion #[(action) "\301\302B!\207" [action xscheme-process-filter:string-action nil] 3]) #@61 The character displayed when the Scheme process is running. (defconst xscheme-runlight:running "run" (#$ . 34318)) #@71 The character displayed when the Scheme process is waiting for input. (defconst xscheme-runlight:input "input" (#$ . 34439)) #@72 The character displayed when the Scheme process is garbage collecting. (defconst xscheme-runlight:gc "gc" (#$ . 34570)) (defalias 'xscheme-start-gc #[nil "\301!\207" [xscheme-runlight:gc xscheme-set-runlight] 2]) (defalias 'xscheme-finish-gc #[nil "\303\203 \202\n\n!\207" [xscheme-running-p xscheme-runlight:running xscheme-runlight:input xscheme-set-runlight] 2]) (defalias 'xscheme-enter-input-wait #[nil "\303!\210\304\304\211\207" [xscheme-runlight:input xscheme-control-g-disabled-p xscheme-running-p xscheme-set-runlight nil] 2]) (defalias 'xscheme-exit-input-wait #[nil "\302!\210\303\211\207" [xscheme-runlight:running xscheme-running-p xscheme-set-runlight t] 2]) (defalias 'xscheme-enable-control-g #[nil "\302\303 \230\205\f\304\302!\207" [xscheme-control-g-disabled-p xscheme-control-g-message-string nil current-message message] 2]) (defalias 'xscheme-display-process-buffer #[nil "\301 \206 \302\303 !\304\213)\207" [window xscheme-process-buffer-window display-buffer xscheme-process-buffer ((byte-code "\301!\210\302 \210\303 \205\304 \207" [window select-window xscheme-goto-output-point xscheme-debugger-mode-p xscheme-enter-interaction-mode] 2))] 2]) (defalias 'xscheme-unsolicited-read-char #[nil "\300\207" [nil] 1]) (defalias 'xscheme-eval #[(string) "\301\302!@!\207" [string eval read-from-string] 3]) (defalias 'xscheme-message #[(string) "G\301U?\205\302\303\304\"\"\207" [string 0 xscheme-write-message-1 format ";%s"] 5]) (defalias 'xscheme-write-value #[(string) "G\301U\203\f\302\303\304\"\207\302\305\306\"\"\207" [string 0 xscheme-write-message-1 "(no value)" ";Unspecified return value" format ";Value: %s"] 5]) (defalias 'xscheme-write-message-1 #[(message-string output-string) "\305!\306\307 !!\211\203\310\311 !\n\"\204\312\313 \"\210*\314\315!\210\316\f!\207" [xscheme-process-name process window message-string output-string get-process get-buffer-window process-buffer pos-visible-in-window-p process-mark message "%s" xscheme-guarantee-newlines 1 xscheme-process-filter-output] 4]) (defalias 'xscheme-set-prompt-variable #[(string) "\211\207" [string xscheme-prompt] 2]) (defalias 'xscheme-set-prompt #[(string) "\303\304!\210\305!\306\307!\207" [string xscheme-prompt xscheme-mode-string xscheme-guarantee-newlines 2 xscheme-coerce-prompt force-mode-line-update t] 2]) (defalias 'xscheme-output-goto #[nil "\300 \210\301\302!\207" [xscheme-goto-output-point xscheme-guarantee-newlines 2] 2]) (defalias 'xscheme-coerce-prompt #[(string) "\302\303\"\203\304\225\305 \306O!\210\304 SO)\207\207" [string end string-match "^[0-9]+ \\[[^]]+\\] " 0 xscheme-process-filter-output nil] 4]) (defalias 'xscheme-cd #[(directory-string) "\212\301 q\210\302!)\207" [directory-string xscheme-process-buffer cd] 2]) (defalias 'xscheme-prompt-for-confirmation #[(prompt-string) "\301\302!\203 \303\202\f\304!\207" [prompt-string xscheme-send-char y-or-n-p 121 110] 3]) (defalias 'xscheme-prompt-for-expression #[(prompt-string) "\302\303\304 #!\207" [prompt-string xscheme-prompt-for-expression-map xscheme-send-string-2 read-from-minibuffer nil] 5]) (byte-code "\303\300!\204\304\300 B\204\305\n!\306\307\310#\210\304\207" [xscheme-prompt-for-expression-map current-load-list minibuffer-local-map boundp nil copy-keymap substitute-key-definition exit-minibuffer xscheme-prompt-for-expression-exit] 4) (defalias 'xscheme-prompt-for-expression-exit #[nil "\300ed\"\301=\203\f\302 \207\303\304!\207" [xscheme-region-expression-p one exit-minibuffer error "input must be a single, complete expression"] 3 nil nil]) (defalias 'xscheme-region-expression-p #[(start end) "\212\305 \306\216\307 !\210\310\n \"\211@\311U\205/\312\f8\205/\310\n\312\f8\"\312\f8\203-\313\202.\314),\207" [old-syntax-table scheme-mode-syntax-table start end state syntax-table ((set-syntax-table old-syntax-table)) set-syntax-table parse-partial-sexp 0 2 many one] 5]) (provide 'xscheme)