aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorRichard M. Stallman1993-06-15 21:00:33 +0000
committerRichard M. Stallman1993-06-15 21:00:33 +0000
commitcbd1f89c79d74fcd6516fedecbdb4b5b67124e5b (patch)
treeb684591039fee160902f89853c16c1e1207ebbed /lisp/progmodes
parent3af1a1f3c21056071fbfb2449dcd0d57ff7120c5 (diff)
downloademacs-cbd1f89c79d74fcd6516fedecbdb4b5b67124e5b.tar.gz
emacs-cbd1f89c79d74fcd6516fedecbdb4b5b67124e5b.zip
(inferior-lisp-buffer): Move defvar earlier.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/inf-lisp.el77
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
168This is a fine thing to set in your .emacs file.") 163This 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
167MULTIPLE PROCESS SUPPORT
168===========================================================================
169To run multiple Lisp processes, you start the first up
170with \\[inferior-lisp]. It will be in a buffer named `*inferior-lisp*'.
171Rename this buffer with \\[rename-buffer]. You may now start up a new
172process with another \\[inferior-lisp]. It will be in a new buffer,
173named `*inferior-lisp*'. You can switch between the different process
174buffers with \\[switch-to-buffer].
175
176Commands that send text from source buffers to Lisp processes --
177like `lisp-eval-defun' or `lisp-show-arglist' -- have to choose a process
178to send to, when you have more than one Lisp process around. This
179is determined by the global variable `inferior-lisp-buffer'. Suppose you
180have three inferior Lisps running:
181 Buffer Process
182 foo inferior-lisp
183 bar inferior-lisp<2>
184 *inferior-lisp* inferior-lisp<3>
185If you do a \\[lisp-eval-defun] command on some Lisp source code,
186what 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'.
192This process selection is performed by function `inferior-lisp-proc'.
193
194Whenever \\[inferior-lisp] fires up a new process, it resets
195`inferior-lisp-buffer' to be the new process's buffer. If you only run
196one process, this does the right thing. If you run multiple
197processes, you can change `inferior-lisp-buffer' to another process
198buffer 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
542MULTIPLE PROCESS SUPPORT
543===========================================================================
544To run multiple Lisp processes, you start the first up
545with \\[inferior-lisp]. It will be in a buffer named `*inferior-lisp*'.
546Rename this buffer with \\[rename-buffer]. You may now start up a new
547process with another \\[inferior-lisp]. It will be in a new buffer,
548named `*inferior-lisp*'. You can switch between the different process
549buffers with \\[switch-to-buffer].
550
551Commands that send text from source buffers to Lisp processes --
552like `lisp-eval-defun' or `lisp-show-arglist' -- have to choose a process
553to send to, when you have more than one Lisp process around. This
554is determined by the global variable `inferior-lisp-buffer'. Suppose you
555have three inferior Lisps running:
556 Buffer Process
557 foo inferior-lisp
558 bar inferior-lisp<2>
559 *inferior-lisp* inferior-lisp<3>
560If you do a \\[lisp-eval-defun] command on some Lisp source code,
561what 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'.
567This process selection is performed by function `inferior-lisp-proc'.
568
569Whenever \\[inferior-lisp] fires up a new process, it resets
570`inferior-lisp-buffer' to be the new process's buffer. If you only run
571one process, this does the right thing. If you run multiple
572processes, you can change `inferior-lisp-buffer' to another process
573buffer 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 ()