Initial Commit
[packages] / xemacs-packages / ilisp / ilisp.el
1 ;;; -*- Mode: Emacs-Lisp -*-
2
3 ;;; ilisp.el --
4 ;;;
5 ;;; This file is part of ILISP.
6 ;;; Please refer to the file COPYING for copyrights and licensing
7 ;;; information.
8 ;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
9 ;;; of present and past contributors.
10 ;;;
11 ;;; $Id: ilisp.el,v 1.5 2002-06-03 23:37:04 wbd Exp $     
12
13 ;;; Author: Chris McConnell <ccm@cs.cmu.edu>
14 ;;; Maintainer: The Net <ilisp@cons.org>
15 ;;; Created: 14 Jun 1994
16
17 ;;; Keywords: lisp common-lisp scheme comint
18
19 ;;; This file may become part of GNU Emacs in the near future.
20
21 ;;; GNU Emacs is distributed in the hope that it will be useful,
22 ;;; but WITHOUT ANY WARRANTY.  No author or distributor
23 ;;; accepts responsibility to anyone for the consequences of using it
24 ;;; or for whether it serves any particular purpose or works at all,
25 ;;; unless he says so in writing.  Refer to the GNU Emacs General Public
26 ;;; License for full details.
27
28 ;;; Everyone is granted permission to copy, modify and redistribute
29 ;;; GNU Emacs, but only under the conditions described in the
30 ;;; GNU Emacs General Public License.   A copy of this license is
31 ;;; supposed to have been given to you along with GNU Emacs so you
32 ;;; can know your rights and responsibilities.  It should be in a
33 ;;; file named COPYING.  Among other things, the copyright notice
34 ;;; and this notice must be preserved on all copies.
35
36 ;;; *****************************************************************
37 ;;; Please read the texinfo file (via m-x info in emacs or tex it and
38 ;;; print it out) for installation instructions.
39 ;;; *****************************************************************
40
41 ;;; This file defines a generic LISP interface that can be customized
42 ;;; to match a specific LISP dialect.  Support is already provided for
43 ;;; a number of common LISP dialects.  Lucid, Allegro and CMU are
44 ;;; fully supported.  Other LISP dialects are missing features like
45 ;;; arglist and find-source.
46
47 ;;; Since this is built on top of the general command-interpreter-in-
48 ;;; a-buffer mode (comint mode), it shares a common base
49 ;;; functionality, and a common set of bindings, with all modes
50 ;;; derived from comint mode.  This makes it easier to use.
51
52 ;;; For documentation on the functionality provided by comint mode,
53 ;;; and the hooks available for customizing it, see the file
54 ;;; comint.el.
55
56 ;;; Throughout this file you will find comment lines with %'s on them.
57 ;;; These lines define sections for outline mode which I use while
58 ;;; programming to temporarily hide code.
59
60 ;;; See the documentation for ILISP mode, or read texinfo document for
61 ;;; information.  All of the EMACS function names begin or end with
62 ;;; lisp or ilisp to separate ilisp functions from functions in other
63 ;;; packages.  Functions that work only in lisp buffers or that work
64 ;;; in both lisp buffers and inferior lisp buffers use lisp, all other
65 ;;; functions use ilisp.  If a function is intended to be used
66 ;;; interactively, then the lisp or ilisp comes at the end of the
67 ;;; function name, otherwise at the start.
68
69 ;;;%%KNOWN BUGS
70 ;;; 
71 ;;; If you type multiple things to the top level before you get a
72 ;;; prompt, the LISP may be running with the status light indicating
73 ;;; ready.  This is because I have no way to distinguish between input
74 ;;; to a program and that to the top level.
75 ;;;
76 ;;; When running a lisp on Ultrix, you need to set ilisp-program to
77 ;;; "/bin/sh -c your/path/your-lisp-image".
78 ;;; 
79 ;;; If you get lisp output breaking up in weird places it almost
80 ;;; certainly means that comint-prompt-regexp is not precise enough.
81 ;;;
82 ;;; I would like to eat Lucid's return from break in the process
83 ;;; filter, but I can't tell how many newlines to eat after.
84
85
86 ;;;%%CONTRIBUTORS
87
88 ;; Recent contributors include (in alphabetical order):
89
90 ;; Marco Antoniotti, Robert P. Goldman, Larry Hunter, Eyvind Ness, 
91 ;; Ivan Vazquez, Fred White
92
93
94 (require 'cl)
95
96 ;;;%Requirements
97 (if (string-match "\\`18" emacs-version)
98     (load "comint-v18") ; Included older version of comint.
99   (require 'comint))
100
101
102 ;;; Trying to be compatible with all *Emacs versions.
103 (load "ilcompat")
104
105 (load "comint-ipc")
106
107 ;; This is optional -- used only by io-bridge-ilisp
108 (unless (or (eq +ilisp-emacs-version-id+ 'fsf-21)
109             (eq +ilisp-emacs-version-id+ 'fsf-20)
110             (and (eq +ilisp-emacs-version-id+ 'fsf-19)
111                  (>= +ilisp-emacs-minor-version-number+ 29)))
112   (load "bridge"))
113
114
115 ;;; Load the ILISP provided hyperspec if needed.
116
117 (unless (featurep 'hyperspec)
118   (load-library "extra/hyperspec"))
119
120 (unless (featurep 'cltl2)
121   (load-library "extra/cltl2"))
122
123 ;;; 19990806 Martin Atzmueller
124 ;;; Added support for ILISP EASY-MENU. Muts be loaded *before* the
125 ;;; rest of ILISP.
126
127 (unless (load "ilisp-all.elc" t)
128   ;; not integrated yet!
129   ;; (load "custom-ilisp")
130
131   (load "ilisp-def")
132
133   ;; (load "ilisp-el") ; Gotten rid of all the functions in it.
134   (load "ilisp-sym")
135   (load "ilisp-inp")
136   (load "ilisp-ind")
137
138   (load "ilisp-prc")
139   (load "ilisp-val")
140   (load "ilisp-out")
141   (load "ilisp-mov")
142   (load "ilisp-key")
143   (load "ilisp-prn")
144   (load "ilisp-low")
145   (load "ilisp-doc")
146   (load "ilisp-ext")                    ; Some emacs-lisp
147                                         ; bindings. Lisp char syntax.
148   (load "ilisp-mod")
149   (load "ilisp-dia")
150   (load "ilisp-cmt")
151   (load "ilisp-rng")
152   (load "ilisp-hnd")
153   (load "ilisp-utl")
154   (load "ilisp-cmp")
155   (load "ilisp-kil")
156   (load "ilisp-snd")
157   (load "ilisp-xfr")
158   (load "ilisp-hi")
159   (load "ilisp-aut")
160   ;; (load "ilisp-mnb") ; Loaded last. Check end of file.
161
162
163   ;; Dialects.
164   ;; The user will define their autoloads to load "ilisp" when trying
165   ;; to run their dialect.  This will load all of the dialects in.
166   (load "ilisp-cl")
167   (load "ilisp-cmu")
168   (load "ilisp-sbcl")
169   (load "ilisp-chs")
170   (load "ilisp-acl")
171   (load "ilisp-hlw")
172   (load "ilisp-kcl")
173   (load "ilisp-luc")
174   (load "ilisp-sch")
175   (load "ilisp-openmcl")
176   (load "ilisp-ccl")
177
178   )
179
180 ;;; Create the keymaps before running the hooks.
181 ;;; This is necessary if you want the lispm bindings in the load
182 ;;; hook. Otherwise you need to put it AFTER the running of the hooks
183
184 ;;; (if (not ilisp-mode-map) (ilisp-bindings))
185
186
187 ;;; Now run the hooks.
188
189 (run-hooks 'ilisp-site-hook)
190 ;;; (run-hooks 'load-hook)
191 (run-hooks 'ilisp-load-hook)            ; It seem s more reasonable.
192
193 (unless ilisp-mode-map (ilisp-bindings))
194
195 ;;; Optional:
196
197 ;;; Old version menu using XEmacs DEF-MENU.
198 ;;; (load "ilisp-menu")
199 ;;;
200 ;;; 19990818 Marco Antoniotti
201
202 ;;; Load the simple keymap based "Lisp" menu if the easy-menus are not
203 ;;; yet loaded.
204 ;;;
205 ;;; 19990818 Marco Antoniotti
206
207 (message "Loading menu interface.")
208 (message "'ilisp-*enable-cl-easy-meny-p*' is %s"
209          ilisp-*enable-cl-easy-menu-p*)
210
211 (unless (and (member +ilisp-emacs-version-id+
212                      '(xemacs lucid-19 lucid-19-new fsf-20 fsf-21))
213              (or ilisp-*enable-cl-easy-menu-p*
214                  ilisp-*enable-scheme-easy-menu-p*))
215   (load "ilisp-mnb"))
216
217 (when (and (member +ilisp-emacs-version-id+
218                    '(xemacs lucid-19 lucid-19-new fsf-20 fsf-21))
219            ilisp-*enable-cl-easy-menu-p*)
220   (load "ilisp-cl-easy-menu"))
221
222 (when (and (member +ilisp-emacs-version-id+
223                    '(xemacs lucid-19 lucid-19-new fsf-20 fsf-21))
224            ilisp-*enable-scheme-easy-menu-p*)
225   (load "ilisp-scheme-easy-menu"))
226
227
228 ;;; ILD Support by J. M. Siskind <qobi@neci.nj.nec.com>
229 ;;;
230 ;;; 19990818 Marco Antoniotti
231
232 (when ilisp-*enable-ild-support-p*
233   (load "ild"))
234  
235 ;;; IMENU Support
236 ;;;
237 ;;; 2000-03-04 Martin Atzmueller
238
239 (when ilisp-*enable-imenu-p*
240   (when (ignore-errors (require 'imenu))
241     (load "ilisp-imenu")))
242
243 (provide 'ilisp)
244
245 ;;; end of file -- ilisp.el --