annotate lisp/ilisp/ilisp-mnb.el @ 12:bcdc7deadc19 r19-15b7

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