?
Current Path : /usr/share/emacs/24.3/lisp/progmodes/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/progmodes/xscheme.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:09:32 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/progmodes/xscheme.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'scheme) #@55 Command used to start the most recent Scheme process. (defvar xscheme-process-command-line nil (#$ . 578)) #@64 Name of xscheme process that we're currently interacting with. (defvar xscheme-process-name "scheme" (#$ . 691)) #@63 Name of xscheme buffer that we're currently interacting with. (defvar xscheme-buffer-name "*scheme*" (#$ . 810)) #@44 Maximum length of Scheme expressions ring. (defvar xscheme-expressions-ring-max 30 (#$ . 929)) #@65 List of expressions recently transmitted to the Scheme process. (defvar xscheme-expressions-ring nil (#$ . 1030)) #@77 The tail of the Scheme expressions ring whose car is the last thing yanked. (defvar xscheme-expressions-ring-yank-pointer nil (#$ . 1150)) #@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 (#$ . 1296)) #@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 (#$ . 1470)) #@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 (#$ . 1738)) #@64 Procedure to send the string argument from the scheme process. (defvar xscheme-string-receiver nil (#$ . 1939)) #@60 Default global (shared) xscheme-runlight mode line format. (defconst default-xscheme-runlight '(": " xscheme-runlight-string) (#$ . 2057)) (defvar xscheme-runlight "") (defvar xscheme-runlight-string nil) #@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 (#$ . 2269)) #@109 This variable, if nil, prevents output from the scheme process from being inserted into the process-buffer. (defvar xscheme-allow-output-p t (#$ . 2544)) #@35 The current scheme prompt string. (defvar xscheme-prompt "" (#$ . 2704)) #@68 Accumulator for the string being received from the scheme process. (defvar xscheme-string-accumulator "" (#$ . 2783)) (defvar xscheme-mode-string nil) (byte-code "\300\301\302\"\210\303\304\305\"\210\306\307\310\311\312\313%\210\314\315\310\316\317\320\312\307&\210\314\321\310\322\317\323\312\307&\210\314\324\325\326\317\327\312\307&\210\314\330\331\332\317\333\312\307&\210\314\334\310\335\317\327\312\307&\210\314\336\310\337\317\340\312\307\341\342& \207" [set-default scheme-mode-line-process ("" xscheme-runlight) mapc 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) custom-declare-group xscheme nil "Major mode for editing Scheme and interacting with MIT's C-Scheme." :group lisp custom-declare-variable scheme-band-name "Band loaded by the `run-scheme' command." :type (choice (const nil) string) scheme-program-arguments "Arguments passed to the Scheme program by the `run-scheme' command." (choice (const nil) string) xscheme-allow-pipelined-evaluation t "If non-nil, an expression may be transmitted while another is evaluating.\nOtherwise, attempting to evaluate an expression before the previous expression\nhas finished evaluating will signal an error." boolean xscheme-startup-message "This is the Scheme process buffer.\nType \\[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" "String to insert into Scheme process buffer first time it is started.\nIs processed with `substitute-command-keys' first." string xscheme-signal-death-message "If non-nil, causes a message to be generated when the Scheme process dies." xscheme-start-hook "If non-nil, a procedure to call when the Scheme process is started.\nWhen called, the current buffer will be the Scheme process-buffer." hook :version "20.3"] 10) (defalias 'xscheme-evaluation-commands #[(keymap) "\301\302\303#\210\301\304\305#\210\306\305\307\304#\210\301\310\311#\210\301\312\303#\210\301\313\305#\210\301\314\315#\207" [keymap define-key "" xscheme-send-definition "" xscheme-send-previous-expression put :advertised-binding "o" xscheme-send-buffer "z" " " "" 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 (#$ . 5702) (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 (#$ . 6688) 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 (#$ . 7210) (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\302rq\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 (#$ . 7909) (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!\210rq\210\f)\211)\207" [buffer-name process-name xscheme-buffer-name xscheme-process-name xscheme-runlight verify-xscheme-buffer t make-local-variable] 3 (#$ . 8417) (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 (#$ . 8840) 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 r\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 `%s' does not exist" "Buffer `%s' is not a scheme interaction buffer" process-name] 4]) #@3291 Major mode for interacting with an inferior MIT Scheme process. Like scheme-mode except that: \[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 mode lines 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 mode line 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\310!\210\307\311!\210\307\312!\210\307\313!\210\307\303!\210\np\307\305!\210\314\f!\307\315!\210\316 \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 buffer-name xscheme-last-input-end make-marker get-buffer-process process-name process-filter process-sentinel xscheme-process-filter-initialize t xscheme-mode-line-initialize set-process-sentinel xscheme-process-sentinel set-process-filter xscheme-process-filter nil scheme-interaction-mode-initialize scheme-mode-variables run-mode-hooks scheme-mode-hook scheme-interaction-mode-hook process] 4 (#$ . 9713) "P"]) #@44 Take buffer out of scheme interaction mode (defalias 'exit-scheme-interaction-mode #[nil "\304\305!\204\n \306\307!\210\n \210\310p!\211\2052 \311!\312=\203% \313 @\"\210\314!\315=\2052 \316 A\"*\207" [xscheme-previous-process-state previous-state xscheme-previous-mode process derived-mode-p 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 (#$ . 13990) nil]) (defvar scheme-interaction-mode-commands-alist nil) (defvar scheme-interaction-mode-map 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 "\302\303\" \204 \304 \305 !\210\306 !\210\307 !\210\310 !\210\302\207" [scheme-interaction-mode-commands-alist scheme-interaction-mode-map 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 "r\300 q\210\301\302!?\205 \301\303!\203 \304 \202 \302\305!)\207" [xscheme-process-buffer derived-mode-p scheme-interaction-mode scheme-debugger-mode scheme-interaction-mode-initialize t] 2]) (byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias advertised-xscheme-send-previous-expression xscheme-send-previous-expression nil make-obsolete "23.2"] 4) #@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 "Invalid entry to scheme-debugger-mode"] 2 (#$ . 15867)]) (defvar scheme-debugger-mode-map nil) (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\211\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 "\204 \301 \302!\210\303!\210\304!\210\301\207" [scheme-debugger-mode-map 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-event xscheme-send-char] 2 (#$ . 16907) nil]) (defalias 'xscheme-enter-debugger-mode #[(_prompt-string) "r\300 q\210\301\302!?\205 \301\303!\204 \303\304!\210\305 )\207" [xscheme-process-buffer derived-mode-p scheme-debugger-mode scheme-interaction-mode t scheme-debugger-mode-initialize] 2]) (defalias 'xscheme-debugger-mode-p #[nil "\301 \211\205 rq\210\302\303!))\207" [buffer xscheme-process-buffer derived-mode-p 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 (#$ . 17482)]) (defalias 'xscheme-send-string-1 #[(strings) "\302\303\"\304 !\210\305\306!\205 \307 !)\207" [strings string apply concat xscheme-send-string-2 derived-mode-p 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 (#$ . 18539) nil]) (defalias 'xscheme-insert-expression #[(string) "\303\304 #\211\207" [string xscheme-expressions-ring-max xscheme-expressions-ring-yank-pointer add-to-history xscheme-expressions-ring] 4]) #@44 Rotate the yanking point in the kill ring. (defalias 'xscheme-rotate-yank-pointer #[(arg) "G\305 !\203 \306\307!\202* \n GZ\\ \246\211\310W\203$ \f \\\202% \f\233)\211)\207" [xscheme-expressions-ring length arg xscheme-expressions-ring-yank-pointer index zerop error "Scheme expression ring is empty" 0] 4 (#$ . 19151) "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\202 S!\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 (#$ . 19490) "*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 (#$ . 20063) "*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 (#$ . 20921) "*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 \203 b\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 (#$ . 21563) "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 (#$ . 21981) 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 (#$ . 22428) 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 (#$ . 22641) nil]) #@98 Send the current line to the Scheme process. Useful for working with debugging Scheme under adb. (defalias 'xscheme-send-current-line #[nil "\301 \302 {\303\210\304c\210\305!)\207" [line line-beginning-position line-end-position nil 10 xscheme-send-string-2] 2 (#$ . 22856) 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 (#$ . 23145) 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 (#$ . 23411) "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\"