comparison lisp/ilisp/ilisp-kil.el @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children b82b59fe008d
comparison
equal deleted inserted replaced
-1:000000000000 0:376386a54a3c
1 ;;; -*- Mode: Emacs-Lisp -*-
2
3 ;;; ilisp-kil.el --
4
5 ;;; This file is part of ILISP.
6 ;;; Version: 5.7
7 ;;;
8 ;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
9 ;;; 1993, 1994 Ivan Vasquez
10 ;;; 1994, 1995 Marco Antoniotti and Rick Busdiecker
11 ;;;
12 ;;; Other authors' names for which this Copyright notice also holds
13 ;;; may appear later in this file.
14 ;;;
15 ;;; Send mail to 'ilisp-request@lehman.com' to be included in the
16 ;;; ILISP mailing list. 'ilisp@lehman.com' is the general ILISP
17 ;;; mailing list were bugs and improvements are discussed.
18 ;;;
19 ;;; ILISP is freely redistributable under the terms found in the file
20 ;;; COPYING.
21
22
23
24 ;;;
25 ;;; ILISP Panic/Reset/Status commands
26 ;;;
27
28 ;;;%% Panic/Reset/Status commands
29 ;;;
30 (defun status-lisp (showp)
31 "Show the message of the current command being executed in the
32 inferior LISP. With a prefix show pending sends as well."
33 (interactive "P")
34 (save-excursion
35 (set-buffer (ilisp-buffer))
36 (comint-current-send showp)))
37
38
39 ;;;
40 (defun reset-ilisp ()
41 "Reset the inferior LISP top level."
42 (interactive)
43 (message "Reset LISP to top level")
44 (comint-simple-send (ilisp-process) (ilisp-value 'ilisp-reset)))
45
46 ;;;
47 (defun abort-commands-lisp (&optional message)
48 "Abort the commands sent to the current ilisp."
49 (interactive)
50 (if (ilisp-value comint-aborting t)
51 (message "Already aborted commands")
52 (beep)
53 (message (or message "Aborted commands"))
54 (comint-abort-sends (ilisp-process))))
55
56 ;;;
57 (defun panic-lisp ()
58 "Panic reset for the inferior LISP."
59 (interactive)
60 (save-excursion
61 (if (y-or-n-p "Panic reset LISP? ")
62 (save-excursion
63 (set-buffer (ilisp-buffer))
64 (comint-setup-ipc t)
65 (message "LISP is reset, state is unknown"))
66 (message ""))))
67
68 ;;;
69 (defun repair-ilisp ()
70 "If ilisp is not listening to you in the lisp interaction buffer, you might try this."
71 (interactive)
72 (set-buffer (ilisp-buffer))
73 (comint-setup-ipc t)
74 (goto-char (point-max))
75 (insert "()")
76 (return-ilisp)
77 (message "ILISP is working again (maybe)"))
78
79
80 ;;;
81 (defun interrupt-subjob-ilisp ()
82 "Interrupt the current top level command in the inferior LISP."
83 (interactive)
84 (if (not (eq comint-send-queue comint-end-queue))
85 (if (y-or-n-p "Abort commands before interrupting top level? ")
86 (abort-commands-lisp)
87 (message "Waiting for commands to finish")
88 (while (not (eq comint-send-queue comint-end-queue))
89 (accept-process-output)
90 (sit-for 0))))
91 (message "Interrupted top level")
92 (comint-interrupt-subjob))