1 ;;; -*- Mode: Emacs-Lisp -*-
4 ;;; ILISP Panic/Reset/Status commands.
6 ;;; This file is part of ILISP.
7 ;;; Please refer to the file COPYING for copyrights and licensing
9 ;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
10 ;;; of present and past contributors.
12 ;;; $Id: ilisp-kil.el,v 1.3 2001-07-02 09:40:47 youngs Exp $
14 ;;;%% Panic/Reset/Status commands
16 (defun status-lisp (showp)
17 "Show the message of the current command being executed in the
18 inferior LISP. With a prefix show pending sends as well."
21 (set-buffer (ilisp-buffer))
22 (comint-current-send showp)))
27 "Reset the inferior LISP top level."
29 (message "Reset LISP to top level")
30 (comint-simple-send (ilisp-process) (ilisp-value 'ilisp-reset)))
33 (defun abort-commands-lisp (&optional message)
34 "Abort the commands sent to the current ilisp."
36 (if (ilisp-value comint-aborting t)
37 (message "Already aborted commands")
39 (message (or message "Aborted commands"))
40 (comint-abort-sends (ilisp-process))))
44 "Panic reset for the inferior LISP."
47 (if (y-or-n-p "Panic reset LISP? ")
49 (set-buffer (ilisp-buffer))
51 (message "LISP is reset, state is unknown"))
55 (defun repair-ilisp ()
56 "If ilisp is not listening to you in the lisp interaction buffer, you might try this."
58 (set-buffer (ilisp-buffer))
60 (goto-char (point-max))
63 (message "ILISP is working again (maybe)"))
67 (defun interrupt-subjob-ilisp ()
68 "Interrupt the current top level command in the inferior LISP."
70 (if (not (eq comint-send-queue comint-end-queue))
71 (if (y-or-n-p "Abort commands before interrupting top level? ")
73 (message "Waiting for commands to finish")
74 (while (not (eq comint-send-queue comint-end-queue))
75 (accept-process-output)
77 (message "Interrupted top level")
78 (comint-interrupt-subjob))