diff options
| author | Richard M. Stallman | 1993-06-15 21:00:33 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-06-15 21:00:33 +0000 |
| commit | cbd1f89c79d74fcd6516fedecbdb4b5b67124e5b (patch) | |
| tree | b684591039fee160902f89853c16c1e1207ebbed /lisp/progmodes | |
| parent | 3af1a1f3c21056071fbfb2449dcd0d57ff7120c5 (diff) | |
| download | emacs-cbd1f89c79d74fcd6516fedecbdb4b5b67124e5b.tar.gz emacs-cbd1f89c79d74fcd6516fedecbdb4b5b67124e5b.zip | |
(inferior-lisp-buffer): Move defvar earlier.
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/inf-lisp.el | 77 |
1 files changed, 36 insertions, 41 deletions
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index dee0b331372..2791a7f0866 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el | |||
| @@ -77,11 +77,6 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword | |||
| 77 | (full-copy-sparse-keymap comint-mode-map)) | 77 | (full-copy-sparse-keymap comint-mode-map)) |
| 78 | (setq inferior-lisp-mode-map | 78 | (setq inferior-lisp-mode-map |
| 79 | (nconc inferior-lisp-mode-map shared-lisp-mode-map)) | 79 | (nconc inferior-lisp-mode-map shared-lisp-mode-map)) |
| 80 | ;; Make separate prefix definitions so that we don't clobber the ones | ||
| 81 | ;; inherited from other keymaps. | ||
| 82 | (define-key inferior-lisp-mode-map "\C-x" (make-sparse-keymap)) | ||
| 83 | (define-key inferior-lisp-mode-map "\C-c" (make-sparse-keymap)) | ||
| 84 | (define-key inferior-lisp-mode-map "\e" (make-sparse-keymap)) | ||
| 85 | (define-key inferior-lisp-mode-map "\C-x\C-e" 'lisp-eval-last-sexp) | 80 | (define-key inferior-lisp-mode-map "\C-x\C-e" 'lisp-eval-last-sexp) |
| 86 | (define-key inferior-lisp-mode-map "\C-c\C-l" 'lisp-load-file) | 81 | (define-key inferior-lisp-mode-map "\C-c\C-l" 'lisp-load-file) |
| 87 | (define-key inferior-lisp-mode-map "\C-c\C-k" 'lisp-compile-file) | 82 | (define-key inferior-lisp-mode-map "\C-c\C-k" 'lisp-compile-file) |
| @@ -167,6 +162,41 @@ kcl: \"^>+ *\" | |||
| 167 | 162 | ||
| 168 | This is a fine thing to set in your .emacs file.") | 163 | This is a fine thing to set in your .emacs file.") |
| 169 | 164 | ||
| 165 | (defvar inferior-lisp-buffer nil "*The current inferior-lisp process buffer. | ||
| 166 | |||
| 167 | MULTIPLE PROCESS SUPPORT | ||
| 168 | =========================================================================== | ||
| 169 | To run multiple Lisp processes, you start the first up | ||
| 170 | with \\[inferior-lisp]. It will be in a buffer named `*inferior-lisp*'. | ||
| 171 | Rename this buffer with \\[rename-buffer]. You may now start up a new | ||
| 172 | process with another \\[inferior-lisp]. It will be in a new buffer, | ||
| 173 | named `*inferior-lisp*'. You can switch between the different process | ||
| 174 | buffers with \\[switch-to-buffer]. | ||
| 175 | |||
| 176 | Commands that send text from source buffers to Lisp processes -- | ||
| 177 | like `lisp-eval-defun' or `lisp-show-arglist' -- have to choose a process | ||
| 178 | to send to, when you have more than one Lisp process around. This | ||
| 179 | is determined by the global variable `inferior-lisp-buffer'. Suppose you | ||
| 180 | have three inferior Lisps running: | ||
| 181 | Buffer Process | ||
| 182 | foo inferior-lisp | ||
| 183 | bar inferior-lisp<2> | ||
| 184 | *inferior-lisp* inferior-lisp<3> | ||
| 185 | If you do a \\[lisp-eval-defun] command on some Lisp source code, | ||
| 186 | what process do you send it to? | ||
| 187 | |||
| 188 | - If you're in a process buffer (foo, bar, or *inferior-lisp*), | ||
| 189 | you send it to that process. | ||
| 190 | - If you're in some other buffer (e.g., a source file), you | ||
| 191 | send it to the process attached to buffer `inferior-lisp-buffer'. | ||
| 192 | This process selection is performed by function `inferior-lisp-proc'. | ||
| 193 | |||
| 194 | Whenever \\[inferior-lisp] fires up a new process, it resets | ||
| 195 | `inferior-lisp-buffer' to be the new process's buffer. If you only run | ||
| 196 | one process, this does the right thing. If you run multiple | ||
| 197 | processes, you can change `inferior-lisp-buffer' to another process | ||
| 198 | buffer with \\[set-variable].") | ||
| 199 | |||
| 170 | ;;;###autoload | 200 | ;;;###autoload |
| 171 | (defvar inferior-lisp-mode-hook '() | 201 | (defvar inferior-lisp-mode-hook '() |
| 172 | "*Hook for customising Inferior Lisp mode.") | 202 | "*Hook for customising Inferior Lisp mode.") |
| @@ -329,7 +359,7 @@ With argument, positions cursor at end of buffer." | |||
| 329 | (interactive "P") | 359 | (interactive "P") |
| 330 | (if (get-buffer inferior-lisp-buffer) | 360 | (if (get-buffer inferior-lisp-buffer) |
| 331 | (pop-to-buffer inferior-lisp-buffer) | 361 | (pop-to-buffer inferior-lisp-buffer) |
| 332 | (error "No current process buffer. See variable inferior-lisp-buffer.")) | 362 | (error "No current inferior Lisp buffer")) |
| 333 | (cond (eob-p | 363 | (cond (eob-p |
| 334 | (push-mark) | 364 | (push-mark) |
| 335 | (goto-char (point-max))))) | 365 | (goto-char (point-max))))) |
| @@ -537,41 +567,6 @@ See variable `lisp-describe-sym-command'." | |||
| 537 | (format lisp-describe-sym-command sym))) | 567 | (format lisp-describe-sym-command sym))) |
| 538 | 568 | ||
| 539 | 569 | ||
| 540 | (defvar inferior-lisp-buffer nil "*The current inferior-lisp process buffer. | ||
| 541 | |||
| 542 | MULTIPLE PROCESS SUPPORT | ||
| 543 | =========================================================================== | ||
| 544 | To run multiple Lisp processes, you start the first up | ||
| 545 | with \\[inferior-lisp]. It will be in a buffer named `*inferior-lisp*'. | ||
| 546 | Rename this buffer with \\[rename-buffer]. You may now start up a new | ||
| 547 | process with another \\[inferior-lisp]. It will be in a new buffer, | ||
| 548 | named `*inferior-lisp*'. You can switch between the different process | ||
| 549 | buffers with \\[switch-to-buffer]. | ||
| 550 | |||
| 551 | Commands that send text from source buffers to Lisp processes -- | ||
| 552 | like `lisp-eval-defun' or `lisp-show-arglist' -- have to choose a process | ||
| 553 | to send to, when you have more than one Lisp process around. This | ||
| 554 | is determined by the global variable `inferior-lisp-buffer'. Suppose you | ||
| 555 | have three inferior Lisps running: | ||
| 556 | Buffer Process | ||
| 557 | foo inferior-lisp | ||
| 558 | bar inferior-lisp<2> | ||
| 559 | *inferior-lisp* inferior-lisp<3> | ||
| 560 | If you do a \\[lisp-eval-defun] command on some Lisp source code, | ||
| 561 | what process do you send it to? | ||
| 562 | |||
| 563 | - If you're in a process buffer (foo, bar, or *inferior-lisp*), | ||
| 564 | you send it to that process. | ||
| 565 | - If you're in some other buffer (e.g., a source file), you | ||
| 566 | send it to the process attached to buffer `inferior-lisp-buffer'. | ||
| 567 | This process selection is performed by function `inferior-lisp-proc'. | ||
| 568 | |||
| 569 | Whenever \\[inferior-lisp] fires up a new process, it resets | ||
| 570 | `inferior-lisp-buffer' to be the new process's buffer. If you only run | ||
| 571 | one process, this does the right thing. If you run multiple | ||
| 572 | processes, you can change `inferior-lisp-buffer' to another process | ||
| 573 | buffer with \\[set-variable].") | ||
| 574 | |||
| 575 | ;; "Returns the current inferior Lisp process. | 570 | ;; "Returns the current inferior Lisp process. |
| 576 | ;; See variable `inferior-lisp-buffer'." | 571 | ;; See variable `inferior-lisp-buffer'." |
| 577 | (defun inferior-lisp-proc () | 572 | (defun inferior-lisp-proc () |