;ELC ;;; Compiled ;;; in Emacs version 27.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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310\311\312&\210\313\314\315\316\317\320\307\304&\207" [require comint lisp-mode custom-declare-group inferior-lisp nil "Run an outside Lisp in an Emacs buffer." :group lisp :version "22.1" custom-declare-variable inferior-lisp-filter-regexp "\\`\\s *\\(:\\(\\w\\|\\s_\\)\\)?\\s *\\'" "What not to save on inferior Lisp's input history.\nInput matching this regexp is not saved on the input history in Inferior Lisp\nmode. Default is whitespace followed by 0 or 1 single-letter colon-keyword\n(as in :a, :c, etc.)" :type regexp] 8) (defvar inferior-lisp-mode-map (byte-code "\303!\304 \n\"\210\305 \306\307#\210\305 \310\311#\210\305 \312\313#\210\305 \314\315#\210\305 \316\317#\210\305 \320\321#\210\305 \322\323#\210 )\207" [comint-mode-map map lisp-mode-shared-map copy-keymap set-keymap-parent define-key "" lisp-eval-last-sexp "\f" lisp-load-file " " lisp-compile-file "" lisp-show-arglist "" lisp-describe-sym "" lisp-show-function-documentation "" lisp-show-variable-documentation] 4)) #@20 Inferior Lisp Menu (defvar inferior-lisp-menu nil (#$ . 1478)) (byte-code "\302\303\304\305$\210\306 \307\310#\210\306 \311\312#\210\306 \313\310#\210\306 \314\315#\210\306 \316\317#\210\306 \320\321#\210\306 \322\323#\210\306 \324\325#\210\306 \326\327#\210\306 \330\331#\210\306 \332\333#\210\306 \334\335#\210\306 \336\337#\210\306 \340\341#\207" [inferior-lisp-mode-map lisp-mode-map easy-menu-do-define inferior-lisp-menu "Inferior Lisp Menu" ("Inf-Lisp" ["Eval Last Sexp" lisp-eval-last-sexp t] "--" ["Load File..." lisp-load-file t] ["Compile File..." lisp-compile-file t] "--" ["Show Arglist..." lisp-show-arglist t] ["Describe Symbol..." lisp-describe-sym t] ["Show Documentation for Function..." lisp-show-function-documentation t] ["Show Documentation for Variable..." lisp-show-variable-documentation t]) define-key "\230" lisp-eval-defun "" lisp-eval-last-sexp "" "" lisp-eval-region "" lisp-eval-form-and-next "" lisp-eval-paragraph "" lisp-compile-defun "" switch-to-lisp "\f" lisp-load-file " " lisp-compile-file "" lisp-show-arglist "" lisp-describe-sym "" lisp-show-function-documentation "" lisp-show-variable-documentation] 5) (defalias 'inferior-lisp-install-letter-bindings #[nil "\302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\302\315\316#\210\302\317\320#\210\302\321\322#\210\302\323\324#\210\302\325\326#\210\302 \313\314#\210\302 \315\316#\210\302 \317\320#\210\302 \321\322#\210\302 \323\324#\210\302 \325\326#\207" [lisp-mode-map inferior-lisp-mode-map define-key "e" lisp-eval-defun-and-go "r" lisp-eval-region-and-go "c" lisp-compile-defun-and-go "z" switch-to-lisp "l" lisp-load-file "k" lisp-compile-file "a" lisp-show-arglist "d" lisp-describe-sym "f" lisp-show-function-documentation "v" lisp-show-variable-documentation] 4]) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\307&\210\300\313\314\315\304\316\306\307&\207" [custom-declare-variable inferior-lisp-program "lisp" "Program name for invoking an inferior Lisp in Inferior Lisp mode." :type string :group inferior-lisp inferior-lisp-load-command "(load \"%s\")\n" "Format-string for building a Lisp expression to load a file.\nThis format string should use `%s' to substitute a file name\nand should result in a Lisp expression that will command the inferior Lisp\nto load that file. The default works acceptably on most Lisps.\nThe string \"(progn (load \\\"%s\\\" :verbose nil :print t) (values))\\n\"\nproduces cosmetically superior output for this application,\nbut it works only in Common Lisp." inferior-lisp-prompt "^[^> \n]*>+:? *" "Regexp to recognize prompts in the Inferior Lisp mode.\nDefaults to \"^[^> \\n]*>+:? *\", which works pretty good for Lucid, kcl,\nand franz. This variable is used to initialize `comint-prompt-regexp' in the\nInferior Lisp buffer.\n\nThis variable is only used if the variable\n`comint-use-prompt-regexp' is non-nil.\n\nMore precise choices:\nLucid Common Lisp: \"^\\\\(>\\\\|\\\\(->\\\\)+\\\\) *\"\nfranz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\"\nkcl: \"^>+ *\"" regexp] 8) #@1673 *The current inferior-lisp process buffer. MULTIPLE PROCESS SUPPORT =========================================================================== To run multiple Lisp processes, you start the first up with \[inferior-lisp]. It will be in a buffer named `*inferior-lisp*'. Rename this buffer with \[rename-buffer]. You may now start up a new process with another \[inferior-lisp]. It will be in a new buffer, named `*inferior-lisp*'. You can switch between the different process buffers with \[switch-to-buffer]. Commands that send text from source buffers to Lisp processes -- like `lisp-eval-defun' or `lisp-show-arglist' -- have to choose a process to send to, when you have more than one Lisp process around. This is determined by the global variable `inferior-lisp-buffer'. Suppose you have three inferior Lisps running: Buffer Process foo inferior-lisp bar inferior-lisp<2> *inferior-lisp* inferior-lisp<3> If you do a \[lisp-eval-defun] command on some Lisp source code, what process do you send it to? - If you're in a process buffer (foo, bar, or *inferior-lisp*), 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 `inferior-lisp-buffer'. This process selection is performed by function `inferior-lisp-proc'. Whenever \[inferior-lisp] fires up a new process, it resets `inferior-lisp-buffer' to be the new process's buffer. If you only run one process, this does the right thing. If you run multiple processes, you might need to change `inferior-lisp-buffer' to whichever process buffer you want to use. (defvar inferior-lisp-buffer nil (#$ . -4608)) #@42 Hook for customizing Inferior Lisp mode. (defvar inferior-lisp-mode-hook nil (#$ . 6333)) (put 'inferior-lisp-mode 'mode-class 'special) (defvar inferior-lisp-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [inferior-lisp-mode-hook variable-documentation put "Hook run after entering Inferior Lisp mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp inferior-lisp-mode-map definition-name inferior-lisp-mode] 4) (defvar inferior-lisp-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\207" [inferior-lisp-mode-abbrev-table inferior-lisp-mode-map variable-documentation put purecopy "Keymap for `inferior-lisp-mode'." boundp inferior-lisp-mode-syntax-table definition-name inferior-lisp-mode (lambda (#1=#:def-tmp-var) (defvar inferior-lisp-mode-syntax-table #1#)) make-syntax-table "Syntax table for `inferior-lisp-mode'." (lambda (#1#) (defvar inferior-lisp-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `inferior-lisp-mode'." derived-mode-parent comint-mode] 5) #@2437 Major mode for interacting with an inferior Lisp process. Runs a Lisp interpreter as a subprocess of Emacs, with Lisp I/O through an Emacs buffer. Variable `inferior-lisp-program' controls which Lisp interpreter is run. Variables `inferior-lisp-prompt', `inferior-lisp-filter-regexp' and `inferior-lisp-load-command' can customize this mode for different Lisp interpreters. For information on running multiple processes in multiple buffers, see documentation for variable `inferior-lisp-buffer'. \{inferior-lisp-mode-map} Customization: Entry to this mode runs the hooks on `comint-mode-hook' and `inferior-lisp-mode-hook' (in that order). You can send text to the inferior Lisp process from other buffers containing Lisp source. `switch-to-lisp' switches the current buffer to the Lisp process buffer. `lisp-eval-defun' sends the current defun to the Lisp process. `lisp-compile-defun' compiles the current defun. `lisp-eval-region' sends the current region to the Lisp process. `lisp-compile-region' compiles the current region. Prefixing the lisp-eval/compile-defun/region commands with a \[universal-argument] causes a switch to the Lisp process buffer after sending the text. Commands:\ \[comint-send-input] after the end of the process' output sends the text from the end of process to point. \[comint-send-input] before the end of the process' output copies the sexp ending at point to the end of the process' output, and sends it. \[comint-copy-old-input] copies the sexp ending at point to the end of the process' output, allowing you to edit it before sending it. If `comint-use-prompt-regexp' is nil (the default), \[comint-insert-input] on old input copies the entire old input to the end of the process' output, allowing you to edit it before sending it. When not used on old input, or if `comint-use-prompt-regexp' is non-nil, \[comint-insert-input] behaves according to its global binding. \[backward-delete-char-untabify] converts tabs to spaces as it moves back. \[lisp-indent-line] indents for Lisp; with argument, shifts rest of expression rigidly with the current line. \[indent-sexp] does \[lisp-indent-line] 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. (defalias 'inferior-lisp-mode #[nil "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2036 \321 =\203<\322\f\323 \"\210)\324\325\"\204V =\204V\326\325 C#\210\327 !\210\330\f!\210 !\"\331#\332\307!\210\333$\334%)\335\336!\207" [delay-mode-hooks major-mode mode-name inferior-lisp-mode-map inferior-lisp-mode-syntax-table parent make-local-variable t comint-mode inferior-lisp-mode "Inferior Lisp" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table (":%s") lisp-mode-variables lisp-get-old-input lisp-input-filter run-mode-hooks inferior-lisp-mode-hook inferior-lisp-mode-abbrev-table local-abbrev-table inferior-lisp-prompt comint-prompt-regexp mode-line-process comint-get-old-input comint-input-filter] 6 (#$ . 7723) nil]) #@54 Return a string containing the sexp ending at point. (defalias 'lisp-get-old-input #[nil "\212`\301 \210`{*\207" [end backward-sexp] 2 (#$ . 11142)]) #@63 Return t if STR does not match `inferior-lisp-filter-regexp'. (defalias 'lisp-input-filter #[(str) "\302 \"?\207" [inferior-lisp-filter-regexp str string-match] 3 (#$ . 11300)]) #@420 Run an inferior Lisp process, input and output via buffer `*inferior-lisp*'. If there is a process already running in `*inferior-lisp*', just switch to that buffer. With argument, allows you to edit the command line (default is value of `inferior-lisp-program'). Runs the hooks from `inferior-lisp-mode-hook' (after the `comint-mode-hook' is run). (Type \[describe-mode] in the process buffer for a list of commands.) (defalias 'inferior-lisp #[(cmd) "\303\304!\204\305!\306\307\310 @\311 A%q\210\312 \210)\304\313\304!\207" [cmd cmdlist inferior-lisp-buffer comint-check-proc "*inferior-lisp*" split-string apply make-comint "inferior-lisp" nil inferior-lisp-mode pop-to-buffer-same-window] 6 (#$ . 11486) (list (if current-prefix-arg (read-string "Run lisp: " inferior-lisp-program) inferior-lisp-program))]) (defalias 'run-lisp 'inferior-lisp) #@118 Send the current paragraph to the inferior Lisp process. Prefix argument means switch to the Lisp buffer afterwards. (defalias 'lisp-eval-paragraph #[(&optional and-go) "\212\301 \210\302`\303 #)\207" [and-go mark-paragraph lisp-eval-region mark] 4 (#$ . 12346) "P"]) #@115 Send the current region to the inferior Lisp process. Prefix argument means switch to the Lisp buffer afterwards. (defalias 'lisp-eval-region #[(start end &optional and-go) "\303\304  #\210\305\304 \306\"\210\n\205\307\310!\207" [start end and-go comint-send-region inferior-lisp-proc comint-send-string "\n" switch-to-lisp t] 4 (#$ . 12622) "r\nP"]) #@75 Send the string to the inferior Lisp process to be compiled and executed. (defalias 'lisp-compile-string #[(string) "\301\302 \303\304\"\"\207" [string comint-send-string inferior-lisp-proc format "(funcall (compile nil (lambda () %s)))\n"] 5 (#$ . 12982)]) #@62 Send the string to the inferior Lisp process to be executed. (defalias 'lisp-eval-string #[(string) "\301\302 \303P\"\207" [string comint-send-string inferior-lisp-proc "\n"] 4 (#$ . 13247)]) #@235 Send the current defun to the inferior Lisp process. The actually processing is done by `do-string' and `do-region' which determine whether the code is compiled before evaluation. DEFVAR forms reset the variables to the init values. (defalias 'lisp-do-defun #[(do-string do-region) "\212\304 \210\305 \210`\306\304 \210\307\310!\203\"\n\311\312`\313\\ \"\314Q!\202& ` \"+\207" [case-fold-search end do-string do-region beginning-of-defun forward-sexp t looking-at "(defvar" "(defparameter " buffer-substring-no-properties 7 "\n"] 5 (#$ . 13447)]) #@167 Send the current defun to the inferior Lisp process. DEFVAR forms reset the variables to the init values. Prefix argument means switch to the Lisp buffer afterwards. (defalias 'lisp-eval-defun #[(&optional and-go) "\301\302\303\"\210\205\f\304\305!\207" [and-go lisp-do-defun lisp-eval-string lisp-eval-region switch-to-lisp t] 3 (#$ . 14006) "P"]) #@114 Send the previous sexp to the inferior Lisp process. Prefix argument means switch to the Lisp buffer afterwards. (defalias 'lisp-eval-last-sexp #[(&optional and-go) "\301\212\302 \210`)`#\207" [and-go lisp-eval-region backward-sexp] 4 (#$ . 14364) "P"]) #@79 Send the previous sexp to the inferior Lisp process and move to the next one. (defalias 'lisp-eval-form-and-next #[nil "\300 @\301U\204\302 \210\202\303 \210\304 \207" [syntax-ppss 0 up-list lisp-eval-last-sexp forward-sexp] 2 (#$ . 14625) ""]) #@118 Compile the current region in the inferior Lisp process. Prefix argument means switch to the Lisp buffer afterwards. (defalias 'lisp-compile-region #[(start end &optional and-go) "\303\304 \"!\210\n\205\305\306!\207" [start end and-go lisp-compile-string buffer-substring-no-properties switch-to-lisp t] 4 (#$ . 14881) "r\nP"]) #@170 Compile the current defun in the inferior Lisp process. DEFVAR forms reset the variables to the init values. Prefix argument means switch to the Lisp buffer afterwards. (defalias 'lisp-compile-defun #[(&optional and-go) "\301\302\303\"\210\205\f\304\305!\207" [and-go lisp-do-defun lisp-compile-string lisp-compile-region switch-to-lisp t] 3 (#$ . 15219) "P"]) #@95 Switch to the inferior Lisp process buffer. With argument, positions cursor at end of buffer. (defalias 'switch-to-lisp #[(eob-p) "\304!\203 \206\305\306\"\307!\210)\202\310\n!\210 \205$\311 \210db\207" [inferior-lisp-buffer pop-up-frames inferior-lisp-program eob-p get-buffer-process get-buffer-window t pop-to-buffer run-lisp push-mark] 3 (#$ . 15588) "P"]) #@73 Send the current region to the inferior Lisp, and switch to its buffer. (defalias 'lisp-eval-region-and-go #[(start end) "\302 \303#\207" [start end lisp-eval-region t] 4 (#$ . 15966) "r"]) #@72 Send the current defun to the inferior Lisp, and switch to its buffer. (defalias 'lisp-eval-defun-and-go #[nil "\300\301!\207" [lisp-eval-defun t] 2 (#$ . 16163) nil]) #@76 Compile the current region in the inferior Lisp, and switch to its buffer. (defalias 'lisp-compile-region-and-go #[(start end) "\302 \303#\207" [start end lisp-compile-region t] 4 (#$ . 16337) "r"]) #@75 Compile the current defun in the inferior Lisp, and switch to its buffer. (defalias 'lisp-compile-defun-and-go #[nil "\300\301!\207" [lisp-compile-defun t] 2 (#$ . 16543) nil]) #@187 Record last directory and file used in loading or compiling. This holds a cons cell of the form `(DIRECTORY . FILE)' describing the last `lisp-load-file' or `lisp-compile-file' command. (defvar lisp-prev-l/c-dir/file nil (#$ . 16727)) #@250 Used to determine if a buffer contains Lisp source code. If it's loaded into a buffer that is in one of these major modes, it's considered a Lisp source file by `lisp-load-file' and `lisp-compile-file'. Used by these commands to determine defaults. (custom-declare-variable 'lisp-source-modes ''(lisp-mode) '(#$ . 16969) :type '(repeat symbol) :group 'inferior-lisp) #@50 Load a Lisp file into the inferior Lisp process. (defalias 'lisp-load-file #[(file-name) "\303!\210\304!\305!B\306\307 \310\n\"\"\210\311\312!\207" [file-name lisp-prev-l/c-dir/file inferior-lisp-load-command comint-check-source file-name-directory file-name-nondirectory comint-send-string inferior-lisp-proc format switch-to-lisp t] 5 (#$ . 17342) (comint-get-source "Load Lisp file: " lisp-prev-l/c-dir/file lisp-source-modes nil)]) #@51 Compile a Lisp file in the inferior Lisp process. (defalias 'lisp-compile-file #[(file-name) "\302!\210\303!\304!B\305\306 \307\310Q\"\210\311\312!\207" [file-name lisp-prev-l/c-dir/file comint-check-source file-name-directory file-name-nondirectory comint-send-string inferior-lisp-proc "(compile-file \"" "\")\n" switch-to-lisp t] 5 (#$ . 17789) (comint-get-source "Compile Lisp file: " lisp-prev-l/c-dir/file lisp-source-modes nil)]) #@64 Command to query inferior Lisp for a function's documentation. (defvar lisp-function-doc-command "(let ((fn '%s))\n (format t \"Documentation for ~a:~&~a\"\n fn (documentation fn 'function))\n (values))\n" (#$ . 18237)) #@64 Command to query inferior Lisp for a variable's documentation. (defvar lisp-var-doc-command "(let ((v '%s))\n (format t \"Documentation for ~a:~&~a\"\n v (documentation v 'variable))\n (values))\n" (#$ . 18476)) #@58 Command to query inferior Lisp for a function's arglist. (defvar lisp-arglist-command "(let ((fn '%s))\n (format t \"Arglist for ~a: ~a\" fn (arglist fn))\n (values))\n" (#$ . 18707)) #@64 Command to query inferior Lisp for a variable's documentation. (defvar lisp-describe-sym-command "(describe '%s)\n" (#$ . 18905)) (defalias 'lisp-symprompt #[(prompt default) "\203\f\303\304 #\202 \305P\306 !\211G\307U\203\202 \n*C\207" [default prompt ans format "%s (default %s): " ": " read-string 0] 5]) #@100 Return the name of the function called in the current call. The value is nil if it can't find one. (defalias 'lisp-fn-called-at-pt #[nil "\3011\"\212\214e`\302Z]d}\210\303\304!\210\304u\210\305p!\2119\205+0\207\210\306\207" [obj (error) 1000 backward-up-list 1 read nil] 4 (#$ . 19231)]) (defalias 'lisp-var-at-pt #[nil "\3011\212\302\303!\210\304\305w\210\306p!\2119\205*0\207\210\305\207" [obj (error) forward-sexp -1 "'" nil read] 3]) #@118 Send a command to the inferior Lisp to give documentation for function FN. See variable `lisp-function-doc-command'. (defalias 'lisp-show-function-documentation #[(fn) "\302\303 \304 \"\"\207" [lisp-function-doc-command fn comint-proc-query inferior-lisp-proc format] 5 (#$ . 19687) (byte-code "\300\301\302 \"\207" [lisp-symprompt "Function doc" lisp-fn-called-at-pt] 3)]) #@113 Send a command to the inferior Lisp to give documentation for function FN. See variable `lisp-var-doc-command'. (defalias 'lisp-show-variable-documentation #[(var) "\302\303 \304 \"\"\207" [lisp-var-doc-command var comint-proc-query inferior-lisp-proc format] 5 (#$ . 20069) (byte-code "\300\301\302 \"\207" [lisp-symprompt "Variable doc" lisp-var-at-pt] 3)]) #@105 Send a query to the inferior Lisp for the arglist for function FN. See variable `lisp-arglist-command'. (defalias 'lisp-show-arglist #[(fn) "\302\303 \304 \"\"\207" [lisp-arglist-command fn comint-proc-query inferior-lisp-proc format] 5 (#$ . 20437) (byte-code "\300\301\302 \"\207" [lisp-symprompt "Arglist" lisp-fn-called-at-pt] 3)]) #@103 Send a command to the inferior Lisp to describe symbol SYM. See variable `lisp-describe-sym-command'. (defalias 'lisp-describe-sym #[(sym) "\302\303 \304 \"\"\207" [lisp-describe-sym-command sym comint-proc-query inferior-lisp-proc format] 5 (#$ . 20781) (byte-code "\300\301\302 \"\207" [lisp-symprompt "Describe" lisp-var-at-pt] 3)]) (defalias 'inferior-lisp-proc #[nil "\302\303\304!\203 p\202\f!\211\206\305\306!)\207" [inferior-lisp-buffer proc get-buffer-process derived-mode-p inferior-lisp-mode error "No Lisp subprocess; see variable `inferior-lisp-buffer'"] 4]) #@57 This hook is run when the library `inf-lisp' is loaded. (defvar inferior-lisp-load-hook nil (#$ . 21366)) (byte-code "\300\301!\210\302\303!\207" [run-hooks inferior-lisp-load-hook provide inf-lisp] 2)