annotate lisp/ilisp/ilisp.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.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 ;;; Author: Chris McConnell <ccm@cs.cmu.edu>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ;;; Maintainer: The Net <ilisp@lehman.com>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 ;;; Created: 14 Jun 1994
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 ;;; Version: 5.7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 ;;; Keywords: lisp common-lisp scheme comint
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 ;;; This file may become part of GNU Emacs in the near future.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 ;;; GNU Emacs is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 ;;; but WITHOUT ANY WARRANTY. No author or distributor
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 ;;; accepts responsibility to anyone for the consequences of using it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 ;;; or for whether it serves any particular purpose or works at all,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 ;;; unless he says so in writing. Refer to the GNU Emacs General Public
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 ;;; License for full details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 ;;; Everyone is granted permission to copy, modify and redistribute
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 ;;; GNU Emacs, but only under the conditions described in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 ;;; GNU Emacs General Public License. A copy of this license is
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 ;;; supposed to have been given to you along with GNU Emacs so you
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 ;;; can know your rights and responsibilities. It should be in a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 ;;; file named COPYING. Among other things, the copyright notice
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 ;;; and this notice must be preserved on all copies.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 ;;; *****************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 ;;; Please read the texinfo file (via m-x info in emacs or tex it and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 ;;; print it out) for installation instructions.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 ;;; *****************************************************************
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 ;;; This file defines a generic LISP interface that can be customized
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 ;;; to match a specific LISP dialect. Support is already provided for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 ;;; a number of common LISP dialects. Lucid, Allegro and CMU are
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 ;;; fully supported. Other LISP dialects are missing features like
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 ;;; arglist and find-source.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 ;;; Since this is built on top of the general command-interpreter-in-
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 ;;; a-buffer mode (comint mode), it shares a common base
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 ;;; functionality, and a common set of bindings, with all modes
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 ;;; derived from comint mode. This makes it easier to use.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 ;;; For documentation on the functionality provided by comint mode,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 ;;; and the hooks available for customizing it, see the file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 ;;; comint.el.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 ;;; Throughout this file you will find comment lines with %'s on them.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 ;;; These lines define sections for outline mode which I use while
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 ;;; programming to temporarily hide code.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 ;;; See the documentation for ILISP mode, or read texinfo document for
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 ;;; information. All of the EMACS function names begin or end with
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 ;;; lisp or ilisp to separate ilisp functions from functions in other
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 ;;; packages. Functions that work only in lisp buffers or that work
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 ;;; in both lisp buffers and inferior lisp buffers use lisp, all other
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 ;;; functions use ilisp. If a function is intended to be used
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 ;;; interactively, then the lisp or ilisp comes at the end of the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 ;;; function name, otherwise at the start.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 ;;;%%KNOWN BUGS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 ;;; If you type multiple things to the top level before you get a
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 ;;; prompt, the LISP may be running with the status light indicating
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 ;;; ready. This is because I have no way to distinguish between input
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 ;;; to a program and that to the top level.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 ;;; When running a lisp on Ultrix, you need to set ilisp-program to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 ;;; "/bin/sh -c your/path/your-lisp-image".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 ;;; If you get lisp output breaking up in weird places it almost
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 ;;; certainly means that comint-prompt-regexp is not precise enough.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 ;;; I would like to eat Lucid's return from break in the process
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 ;;; filter, but I can't tell how many newlines to eat after.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 ;;;%%CONTRIBUTORS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 ;; Recent contributors include (in alphabetical order):
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 ;; Marco Antoniotti, Robert P. Goldman, Larry Hunter, Eyvind Ness,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 ;; Ivan Vazquez, Fred White
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 ;;;%Requirements
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 (if (string-match "\\`18" emacs-version)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 (load "comint-v18") ; Included older version of comint.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 (require 'comint))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 ;;; This is the old call. The new one is just below. It now dispatches
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 ;;; on the correct type of Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113 ;;;(load "ilisp-cpat")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 (load "ilcompat")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 (load "comint-ipc")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 ;; This is optional -- used only by io-bridge-ilisp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 (load "bridge")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 (if (load "ilisp-all.elc" t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 (progn ; I know it is useless in Elisp.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 (load "ilisp-def")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 (load "ilisp-el")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 (load "ilisp-sym")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 (load "ilisp-inp")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 (load "ilisp-ind")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130 (load "ilisp-prc")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 (load "ilisp-val")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 (load "ilisp-out")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 (load "ilisp-mov")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 (load "ilisp-key")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 (load "ilisp-prn")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 (load "ilisp-low")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 (load "ilisp-doc")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 (load "ilisp-ext") ; Some emacs-lisp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 ; bindings. Lisp char syntax.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 (load "ilisp-mod")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 (load "ilisp-dia")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 (load "ilisp-cmt")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 (load "ilisp-rng")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 (load "ilisp-hnd")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 (load "ilisp-utl")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 (load "ilisp-cmp")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 (load "ilisp-kil")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 (load "ilisp-snd")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 (load "ilisp-xfr")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 (load "ilisp-hi")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 (load "ilisp-aut")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 ;; Dialects.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 ;; The user will define their autoloads to load "ilisp" when trying
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 ;; to run their dialect. This will load all of the dialects in.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 (load "ilisp-cl")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 (load "ilisp-cmu")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 (load "ilisp-acl")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 (load "ilisp-hlw")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 (load "ilisp-kcl")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 (load "ilisp-luc")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 (load "ilisp-sch")
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 ;;; Create the keymaps before running the hooks.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 ;;; This is necessary if you want the lispm bindings in the load
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 ;;; hook. Otherwise you need to put it AFTER the running of the hooks
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 ;;; (if (not ilisp-mode-map) (ilisp-bindings))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 ;;; Now run the hooks.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 (run-hooks 'ilisp-site-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 ;;; (run-hooks 'load-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 (run-hooks 'ilisp-load-hook) ; It seem s more reasonable.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 (if (not ilisp-mode-map) (ilisp-bindings))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 ;;; Optional:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 ; (load "ilisp-menu")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 (if (not (member +ilisp-emacs-version-id+ '(xemacs lucid-19 lucid-19-new)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 (load "ilisp-mnb"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 (provide 'ilisp)