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