comparison lisp/progmodes/inf-lisp.el @ 23700:3be52677d330

(switch-to-lisp): if no inferior lisp present, call `run-lisp' instead of signalling an error.
author Karl Heuer <kwzh@gnu.org>
date Thu, 12 Nov 1998 01:55:57 +0000
parents 9005c1013176
children ebc349d16eb9
comparison
equal deleted inserted replaced
23699:3267bdc78cca 23700:3be52677d330
360 360
361 (defun switch-to-lisp (eob-p) 361 (defun switch-to-lisp (eob-p)
362 "Switch to the inferior Lisp process buffer. 362 "Switch to the inferior Lisp process buffer.
363 With argument, positions cursor at end of buffer." 363 With argument, positions cursor at end of buffer."
364 (interactive "P") 364 (interactive "P")
365 (if (get-buffer inferior-lisp-buffer) 365 (if (get-buffer-process inferior-lisp-buffer)
366 (let ((pop-up-frames 366 (let ((pop-up-frames
367 ;; Be willing to use another frame 367 ;; Be willing to use another frame
368 ;; that already has the window in it. 368 ;; that already has the window in it.
369 (or pop-up-frames 369 (or pop-up-frames
370 (get-buffer-window inferior-lisp-buffer t)))) 370 (get-buffer-window inferior-lisp-buffer t))))
371 (pop-to-buffer inferior-lisp-buffer)) 371 (pop-to-buffer inferior-lisp-buffer))
372 (error "No current inferior Lisp buffer")) 372 (run-lisp inferior-lisp-program))
373 (cond (eob-p 373 (when eob-p
374 (push-mark) 374 (push-mark)
375 (goto-char (point-max))))) 375 (goto-char (point-max))))
376 376
377 377
378 ;;; Now that lisp-compile/eval-defun/region takes an optional prefix arg, 378 ;;; Now that lisp-compile/eval-defun/region takes an optional prefix arg,
379 ;;; these commands are redundant. But they are kept around for the user 379 ;;; these commands are redundant. But they are kept around for the user
380 ;;; to bind if he wishes, for backwards functionality, and because it's 380 ;;; to bind if he wishes, for backwards functionality, and because it's