0
|
1 ;;; -*- Mode: Emacs-Lisp -*-
|
|
2
|
|
3 ;;; ilisp-mnb.el --
|
|
4
|
|
5 ;;; This file is part of ILISP.
|
4
|
6 ;;; Version: 5.8
|
0
|
7 ;;;
|
|
8 ;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
|
|
9 ;;; 1993, 1994 Ivan Vasquez
|
4
|
10 ;;; 1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker
|
|
11 ;;; 1996 Marco Antoniotti and Rick Campbell
|
0
|
12 ;;;
|
|
13 ;;; Other authors' names for which this Copyright notice also holds
|
|
14 ;;; may appear later in this file.
|
|
15 ;;;
|
4
|
16 ;;; Send mail to 'ilisp-request@naggum.no' to be included in the
|
|
17 ;;; ILISP mailing list. 'ilisp@naggum.no' is the general ILISP
|
0
|
18 ;;; mailing list were bugs and improvements are discussed.
|
|
19 ;;;
|
|
20 ;;; ILISP is freely redistributable under the terms found in the file
|
|
21 ;;; COPYING.
|
|
22
|
|
23
|
|
24
|
|
25
|
|
26 ;(require 'ilisp-key)
|
|
27
|
|
28 (defvar lisp-general-menu-map (make-sparse-keymap "Lisp")
|
|
29 "Keymap for main LISP menu")
|
|
30
|
|
31
|
|
32 (defkey-ilisp [menu-bar lisp]
|
|
33 (cons "Lisp" lisp-general-menu-map))
|
|
34
|
|
35
|
|
36 (defkey-ilisp [menu-bar lisp repair]
|
|
37 '("Repair Connection" . repair-ilisp))
|
|
38
|
|
39 (defkey-ilisp [menu-bar lisp reset]
|
|
40 '("Reset Connection" . reset-ilisp))
|
|
41
|
|
42 (defkey-ilisp [menu-bar lisp comment-region]
|
|
43 '("Comment Region" . comment-region))
|
|
44
|
|
45 ;;; (defkey-ilisp [menu-bar lisp sep-1]
|
|
46 ;;; '("-" . ilisp-nop))
|
|
47
|
|
48 (defkey-ilisp [menu-bar lisp macroexpand]
|
|
49 '("Macroexpand" . macroexpand-lisp))
|
|
50
|
|
51 (defkey-ilisp [menu-bar lisp macroexpand-1]
|
|
52 '("Macroexpand 1" . macroexpand-1-lisp))
|
|
53
|
|
54 (defkey-ilisp [menu-bar lisp set-package]
|
4
|
55 '("Set Lisp Package" . set-package-lisp))
|
|
56
|
|
57 (defkey-ilisp [menu-bar lisp set-buffer-package]
|
|
58 '("Set Buffer Package" . set-buffer-package-lisp))
|
0
|
59
|
|
60 (defkey-ilisp [menu-bar lisp arglist]
|
|
61 '("Arglist" . arglist-lisp))
|
|
62
|
|
63 (defkey-ilisp [menu-bar lisp documentation]
|
|
64 '("Documentation" . documentation-lisp))
|
|
65
|
|
66 (defkey-ilisp [menu-bar lisp describe]
|
|
67 '("Describe" . describe-lisp))
|
|
68
|
|
69 (defkey-ilisp [menu-bar lisp inspect]
|
|
70 '("Inspect" . inspect-lisp))
|
|
71
|
|
72 (defkey-ilisp [menu-bar lisp eval-defun]
|
|
73 '("Eval Defun" . eval-defun-and-go-lisp))
|
|
74
|
|
75 (defkey-ilisp [menu-bar lisp start-inferior-lisp]
|
|
76 '("Start Lisp"
|
|
77 "Starts an inferior lisp asking for a dialect name"
|
|
78 . run-ilisp))
|
|
79
|
|
80
|
|
81 (defun ilisp-nop () nil)
|
|
82
|
|
83 ;;; Make sure the menu items are properly marked.
|
|
84 ;;; Checking for 'ilisp-buffer' is very crufty, but I think it is OK
|
|
85 ;;; for the time being. The function 'ilisp-initialized' is not very
|
|
86 ;;; good for this.
|
|
87
|
|
88 (put 'macroexpand-lisp 'menu-enable 'ilisp-buffer)
|
|
89 (put 'macroexpand-1-lisp 'menu-enable 'ilisp-buffer)
|
|
90 (put 'set-package-lisp 'menu-enable 'ilisp-buffer)
|
|
91 (put 'arglist-lisp 'menu-enable 'ilisp-buffer)
|
|
92 (put 'documentation-lisp 'menu-enable 'ilisp-buffer)
|
|
93 (put 'inspect-lisp 'menu-enable 'ilisp-buffer)
|
|
94 (put 'describe-lisp 'menu-enable 'ilisp-buffer)
|
|
95 (put 'eval-defun-and-go-lisp 'menu-enable 'ilisp-buffer)
|
|
96 (put 'run-ilisp 'menu-enable '(null ilisp-buffer))
|
|
97 (put 'reset-ilisp 'menu-enable 'ilisp-buffer)
|
|
98 (put 'repair-ilisp 'menu-enable 'ilisp-buffer)
|
|
99
|
|
100 (put 'comment-region 'menu-enable 'mark-active)
|
|
101
|
|
102
|
|
103 ;;; ilisp-update-menu --
|
|
104 ;;; Update the status of the menu "Lisp".
|
|
105
|
|
106 ;; This variable should disappear!
|
|
107
|
|
108 (defvar ilisp-process-active-p nil
|
|
109 "Kludge to keep track whether the Inf. Lisp is active or not.")
|
|
110
|
|
111 (defun ilisp-update-menu (status)
|
|
112 (if (eq status 'exit)
|
|
113 (progn
|
|
114 ;; (setq ilisp-process-active-p nil)
|
|
115 (put 'macroexpand-lisp 'menu-enable 'ilisp-buffer)
|
|
116 (put 'macroexpand-1-lisp 'menu-enable 'ilisp-buffer)
|
|
117 (put 'set-package-lisp 'menu-enable 'ilisp-buffer)
|
|
118 (put 'arglist-lisp 'menu-enable 'ilisp-buffer)
|
|
119 (put 'documentation-lisp 'menu-enable 'ilisp-buffer)
|
|
120 (put 'inspect-lisp 'menu-enable 'ilisp-buffer)
|
|
121 (put 'describe-lisp 'menu-enable 'ilisp-buffer)
|
|
122 (put 'eval-defun-and-go-lisp 'menu-enable 'ilisp-buffer)
|
|
123 ;; (put 'run-ilisp 'menu-enable '(and (null ilisp-buffer)
|
|
124 ;; ilisp-process-active-p)
|
|
125 (put 'run-ilisp 'menu-enable (null ilisp-buffer))
|
|
126 (put 'reset-ilisp 'menu-enable 'ilisp-buffer)
|
|
127 (put 'repair-ilisp 'menu-enable 'ilisp-buffer)
|
|
128 )
|
|
129 ;; no-op otherwise
|
|
130 ))
|
|
131
|
|
132 ;;;(setplist 'lisp-command-menu nil)
|
|
133 ;;;(def-menu 'lisp-command-menu
|
|
134 ;;; "Lisp"
|
|
135 ;;; "These ILISP commands are available on the menu:"
|
|
136 ;;; '(
|
|
137 ;;; ("Break Interupt current lisp."
|
|
138 ;;; (progn (switch-to-lisp t)
|
|
139 ;;; (interrupt-subjob-ilisp)))
|
|
140 ;;; ("Doc Menu of commands to get help on variables, etc."
|
|
141 ;;; documentation-lisp-command-menu)
|
|
142 ;;; ("Xpand macroexpand-lisp." macroexpand-lisp)
|
|
143 ;;; ("Eval Eval the surrounding defun." eval-defun-lisp)
|
|
144 ;;; ("1E&G Eval defun and goto Inferior LISP." eval-defun-and-go-lisp)
|
|
145 ;;; ("; Comment the region." comment-region-lisp)
|
|
146 ;;; (") find-unbalanced-lisp parens." find-unbalanced-lisp)
|
|
147 ;;; ("] close-all-lisp parens that are open." close-all-lisp)
|
|
148 ;;; ("Trace Traces the previous function symbol." trace-lisp)
|
|
149 ;;; )
|
|
150 ;;; )
|
|
151
|
|
152 ;;;(setplist 'documentation-lisp-command-menu nil)
|
|
153 ;;;(def-menu 'documentation-lisp-command-menu
|
|
154 ;;; "Lisp help"
|
|
155 ;;; "These commands are available for examining Lisp structures:"
|
|
156 ;;; '(
|
|
157 ;;; ("UDoc Get user's documentation string." documentation-lisp)
|
|
158 ;;; ("Rglist Get the arglist for function." arglist-lisp)
|
|
159 ;;; ("Insp Inspect the current sexp." inspect-lisp)
|
|
160 ;;; ("1Insp Prompts for something to inspect." (inspect-lisp -4))
|
|
161 ;;; ("Descr Describe the current sexp." describe-lisp)
|
|
162 ;;; ("1Descr Prompts for something to describe." (describe-lisp -4))
|
|
163 ;;; )
|
|
164 ;;; )
|
|
165
|
|
166 (provide 'ilisp-mnb)
|