1 ;;; ilisp-scheme-easy-menu.el --- (easy)menu's on Emacs for Ilisp
3 ;;; Copyright (C) 1996 Holger Schauer
5 ;;; This file is part of ILISP.
6 ;;; Please refer to the file COPYING for copyrights and licensing
8 ;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
9 ;;; of present and past contributors.
11 ;;; $Id: ilisp-scheme-easy-menu.el,v 1.3 2002-06-03 23:37:03 wbd Exp $
13 ;; Author: Holger Schauer <Holger.Schauer@gmd.de>
14 ;; Maintainer: Holger.Schauer@gmd.de
15 ;; Keywords: lisp ilisp extensions menu easymenu
17 ;; Status: Should work with any Emacs and easymenu.el (as by Per Abrahamsen)
18 ;; Created: 1996-10-08
19 ;; Last modified: 1996-10-15 (that's 15th October 1996, folks)
21 ;; Where to get it: http://www.uni-koblenz.de/~schauer/uniemacs.html
23 ;; This program is free software; you can redistribute it and/or modify
24 ;; it under the terms of the GNU General Public License as published by
25 ;; the Free Software Foundation; either version 2, or (at your option)
28 ;; This program is distributed in the hope that it will be useful,
29 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;; GNU General Public License for more details.
33 ;; You should have received a copy of the GNU General Public License
34 ;; along with this program; if not, you can either send email to this
35 ;; program's maintainer or write to: The Free Software Foundation,
36 ;; Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
40 ;; This file and it's extensions have been named ilisp-xemacs-menu before.
41 ;; As it is ensured now to work with any Emacs with easymenu the file
42 ;; itself and all relevant names (of commands and variables) are renamed.
44 ;; Use this file as an extension to Ilisp 5.7/5.8
45 ;; (seee http://www.cs.cmu.edu/~campbell/ilisp/index.html)
46 ;; Put it in a place where (X)Emacs can find it and augment your
47 ;; .emacs like the following to use it.
48 ;; (load-library "ilisp-easy-menu")
49 ;; This needs to be loaderd prior to Ilisp !
50 ;; This should give you the menu in any source code buffer and any inferior
51 ;; ilisp buffer. Be careful: the menu is initialized with add-hook
52 ;; on ilisp-mode-hook and lisp-mode-hook, so if you setq these two
53 ;; hooks afterwards you won't get the menu.
55 ;; If you want to use it with Emacs (not XEmacs) you will want to get rid
56 ;; of the old menu. You can do so by applying the following patches (to
57 ;; Ilisp 5.8 - for 5.7 check for ilisp-update-menu and the loading of the
58 ;; menu, i.e. ilisp-menu and ilisp-mnb)
61 ;< (if (not (member +ilisp-emacs-version-id+ '(xemacs lucid-19 lucid-19-new)))
64 ;> (not (member +ilisp-emacs-version-id+ '(xemacs lucid-19 lucid-19-new)))
65 ;> (not (featurep 'ilisp-easy-menu)))
68 ;< (if (not (member +ilisp-emacs-version-id+ '(xemacs lucid-19 lucid-19-new)))
71 ;> (member +ilisp-emacs-version-id+ '(xemacs lucid-19 lucid-19-new)))
72 ;> (not (featurep 'ilisp-easy-menu)))
76 (defconst ilisp-scheme-easy-menu
78 [ "Load File" load-file-lisp t ]
79 [ "Run Ilisp" run-ilisp t ]
82 [ "Eval region" eval-region-lisp t ]
83 [ "Eval defun" eval-defun-lisp t ]
84 [ "Eval next sexp" eval-next-sexp-lisp t ]
85 ;; [ "Eval last sexp" eval-last-sexp-lisp t ]
86 [ "Eval changes" eval-changes-lisp t ]
89 [ "Eval region" eval-region-and-go-lisp t ]
90 [ "Eval defun" eval-defun-and-go-lisp t ]
91 [ "Eval next sexp" eval-next-sexp-and-go-lisp t ]
92 ;; [ "Eval last sexp" eval-last-sexp-and-go-lisp t ]
95 [ "File" compile-file-lisp t ]
96 [ "Defun" compile-defun-lisp t ]
97 [ "Defun and go" compile-defun-and-go-lisp t ]
98 [ "Region" compile-region-lisp t ]
99 [ "Region and go" compile-region-and-go-lisp t ]
100 [ "Compile changes" compile-changes-lisp t ]
104 [ "Edit definitions" edit-definitions-lisp t ]
105 [ "Edit next def." next-definition-lisp t ]
106 [ "Edit callers" edit-callers-lisp t ]
107 [ "Edit next caller" next-caller-lisp t ]
108 [ "Insert arguments" arglist-lisp t ]
110 [ "Find unbalanced paren" find-unbalanced-lisp t ]
111 [ "Close all parens" close-all-lisp t ]
112 [ "Close and send lisp" close-and-send-lisp t ]
114 [ "Reindent" reindent-lisp t ]
115 [ "Indent sexp" indent-sexp-ilisp t ]
116 [ "Indent for comment" lisp-indent-for-comment t ]
117 [ "Comment region" comment-region-lisp t ]
119 [ "Search in Files" search-lisp t ]
121 [ "Kill sexp" kill-sexp t ]
122 [ "Kill last sexp" backward-kill-sexp t ]
124 [ "Macroexpand" macroexpand-lisp t ]
125 [ "Macroexpand-1" macroexpand-1-lisp t ]
127 [ "Begin of def" beginning-of-defun-lisp t ]
128 [ "End of defun" end-of-defun-lisp t ]
131 [ "Documentation" documentation-lisp t ]
132 [ "Describe" describe-lisp t ]
133 [ "Inspect" inspect-lisp t ]
135 [ "Clman-apropos" fi:clman-apropos t ];; with which var can I test if
136 [ "Hyperspec - apropos" hyperspec-lookup-lisp t ];; fi is really loaded ?
141 [ "Package" package-lisp t ]
142 [ "Set Lisp Package" set-package-lisp t ]
143 [ "Set Buffer Package" set-buffer-package-lisp t ]
147 ;; [ "Reset Ilisp" reset-ilisp t ]
148 [ "Select Ilisp" select-ilisp t ]
149 [ "Switch to lisp" switch-to-lisp t ]
150 [ "Abort commands" abort-commands-lisp t ]
151 [ "Status of Lisp" status-lisp t ]
153 [ "Mark change" mark-change-lisp t ]
154 [ "List changes" list-changes-lisp t ]
155 [ "Clear changes" clear-changes-lisp t ]
157 [ "Trace defun" trace-defun-lisp t ]
160 [ "Reset Ilisp Connection" reset-ilisp t ]
161 [ "Repair Ilisp Connection" repair-ilisp t ]
165 ;;; ilisp-update-menu
167 ;;; 19990818 Marco Antoniotti
169 (defun ilisp-update-menu (status)
170 ;; Backward compatibility with old keymap based menus.
171 ;; A no-op for the time being.
174 (provide 'ilisp-scheme-easy-menu)
176 ;;; Hooks to add the menu.
179 ;;; 19990818 Marco Antoniotti
180 ;;; Since I could have installed a CL menu before a Scheme one, I
181 ;;; could be forced to to remove the previous menu. Now the code does not do
182 ;;; this, but it should.
184 (add-hook 'ilisp-mode-hook
186 (when (featurep 'easymenu)
187 (easy-menu-define menubar-ilisp
190 ilisp-scheme-easy-menu)
191 (easy-menu-add ilisp-scheme-easy-menu 'ilisp-mode-map)
195 (add-hook 'scheme-mode-hook
197 (when (featurep 'easymenu)
198 (easy-menu-define menubar-scheme-ilisp
201 ilisp-scheme-easy-menu)
202 (when (boundp 'scheme-menu)
203 (easy-menu-remove scheme-menu))
204 (easy-menu-add ilisp-scheme-easy-menu 'scheme-mode-map)
207 ;;; end of file-- ilisp-scheme-easy-menu.el --