annotate lisp/ilisp/ilisp.el @ 164:4e0740e5aab2

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