ilisp-5.12.0+cvs.2004.12.26/0000700000175000001440000000000010324774334013561 5ustar mvelausersilisp-5.12.0+cvs.2004.12.26/ACKNOWLEDGMENTS0000600000175000001440000000257610020674034015732 0ustar mvelausersThanks to Chris McConnell (the author of the original ILISP), Paolo Amoroso, Marco Antoniotti, Martin Atzmueller, David Bakash, Daniel Barlow, Guido Bosch, Tim Bradshaw, David Braunegg, Thomas M. Breuel, Craig Brozefsky (Debian packaging), Gary Byers (for the OpenMCL code), Rick Campbell, Hans Chalupsky, Bill Clementson, Kimball Collins, William Deakin, Brian Dennis, David Duff, Tom Emerson, Michael Ernst, Scott Fahlman, Karl Fogel, Dave Fox, Paul Fuqua (for the CMU-CL GC display code), David Gadbois, Robert P. Goldman, Marty Hall, Richard Harris, Utz-Uwe Haus, Jim Healy, Matthias Hoelzl, Christopher Hoover, Larry Hunter, Ben Hyde, Chuck Irvine, Mark Kantrowitz, Michael Kashket, Matthias Koeppe, Hannu Koivisto, Qiegang Long, Christian Lynbech, Erik Naggum, Eyvind Ness, Alain Picard, Dan Pierson, Yusuf Pisan, Frank Ritter, Bob Rogers, Ole Rohne, Jeffrey Mark Siskind, Neil Smithline, Richard Stallman, Larry Stead, Jason Trenouth, Christof Ullwer, Reini Urban, Ivan Vazquez (ILISP maintainer in the early 90's), Bjorn Victor, Edmund Weitz, Fred White, Ben Wing, Matsuo Yoshihiro, Jamie Zawinski for bug reports, suggestions and code. Our apologies to anyone we may have forgotten. Special thanks to Todd Kaufmann for the texinfo file, work on bridge, epoch-pop and for really exercising everything. And, of course, to the original author of ILISP, Chris McConnell. The ILISP Maintainers ilisp-5.12.0+cvs.2004.12.26/COPYING0000600000175000001440000000710307600742200014605 0ustar mvelausersCOPYING -- TERMS AND LICENSING AGREEMENT FOR ILISP ------------------------------------------------------------------------------- This file is part of ILISP. Version: 5.12.0 Date: 2002-05-28 Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell 1993, 1994 Ivan Vasquez 1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker 1996-2000 Marco Antoniotti and Rick Campbell 2001 Paolo Amoroso, Marco Antoniotti, Martin Atzmueller, Craig Brozefsky, William Deakin, Matthias Koeppe Other authors' names for which this Copyright notice also holds may appear later in this file, in the ACKNOWLEGMENTS file and in individual files (in which case the content of the file is to be intended to be copyrighted by that author). Please visit the ILISP Project at Sourceforge (http://sourceforge.net/projects/ilisp) for news and support. ILISP mailing lists are also hosted at Sourceforge. ------------------------------------------------------------------------------- ILISP if freely redistributable. Eventually it may become part of GNU Emacs and it will in that case comply with the GPL. For the time being we adopt the following licensing agreement. Such licensing agreement may be overridden by the licensing notice contained in an individual file and for that file only. ------------------------------------------------------------------------------- GENERAL LICENSE AGREEMENT AND LACK OF WARRANTY This software is distributed in the hope that it will be useful (both in and of itself and as an example of lisp programming), but WITHOUT ANY WARRANTY. The author(s) do not accept responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all. No warranty is made about the software or its performance. Use and copying of this software and the preparation of derivative works based on this software are permitted, so long as the following conditions are met: o The copyright notice and this entire notice are included intact and prominently carried on all copies and supporting documentation. o If you modify this software, you must cause the modified file(s) to carry prominent notices (a Change Log) describing the changes, who made the changes, and the date of those changes. o Any work distributed or published that in whole or in part contains or is a derivative of this software or any part thereof is subject to the terms of this agreement. The aggregation of another unrelated program with this software or its derivative on a volume of storage or distribution medium does not bring the other program under the scope of these terms. o Permission is granted to manufacturers and distributors of lisp compilers and interpreters to include this software with their distribution. This software is made available AS IS, and is distributed without warranty of any kind, either expressed or implied. In no event will the author(s) or their institutions be liable to you for damages, including lost profits, lost monies, or other special, incidental or consequential damages arising out of or in connection with the use or inability to use (including but not limited to loss of data or data being rendered inaccurate or losses sustained by third parties or a failure of the program to operate as documented) the program, even if you have been advised of the possibility of such damanges, or for any claim by any other party, whether in an action of contract, negligence, or other tortious action. January 4th, 1995 # end of file -- COPYING -- ilisp-5.12.0+cvs.2004.12.26/ChangeLog0000600000175000001440000020700110140476613015330 0ustar mvelausers2004-08-02 Kevin Rosenberg * guile-ilisp.scm: Apply patch from Daniel Skarda to export symbols from the root package. 2004-04-06 Matthias Koeppe * guile-ilisp.scm: Compute a more useful arglist for GOOPS generic functions. 2004-01-07 Matthias Koeppe Users that want to use ILISP for Lisp but not for Scheme can now use (setq lisp-source-modes '(lisp-mode)) to prevent ILISP from changing the Scheme mode bindings. * ilisp-key.el (ilisp-bindings): Don't setup mode bindings if mode isn't in `lisp-source-modes.' Patch by Mike Sperber 2003-12-20 Bob Rogers * comint-ipc.el (comint-process-filter): add unwind-protect, remove broken conditional guarding the restoring set-buffer call. This fixes a M-. bug reported by 2003-12-18 by Lynn Quam (and probably other bugs as well). 2003-12-13 Bob Rogers (aka "rgr") * Makefile: Flush "loadfile" target, which created ilisp-all.elc from the other binaries, plus related support & documentation. This caused function doc strings to be garbled, with little or no apparent benefit. Bug reported 2003-12-07 by Edi Weitz. 2003-12-05 Bill Clementson * hyperspec.el: Corrected URL for hyperspec (change from xanalys to lispworks). Fix submitted by Vincent Arkesteijn. 2003-11-24 Bill Clementson * ilisp-mov.el: ILISP was getting confused by quote character in lisp code. Fix submitted by Edi Weitz. 2003-11-24 Bill Clementson * ilisp.emacs: Changed ilisp.emacs so that the referenced file is Map_Sym.txt, rather than Map_Sym.Txt. 2003-11-03 Hannu Koivisto * sbcl.lisp: * Now tries to require sb-introspect. * (arglist) Modified to support sb-introspect. * cl-ilisp.lisp: * (maybe-function) New function. 2003-10-13 Matthias Koeppe * guile-ilisp.scm: Update the documentation->arglist code to handle Guile 1.6. 2003-09-14 Kevin Rosenberg * completer.el: Require ilcompat. Necessary when loading completer.el, but have not yet loaded ilisp. Suggested by Aaron Ucko. 2003-09-03 Bill Clementson * ilisp-key.el, extra/hyperspec.el: Added hyperspec lookup of format control characters. Sent in by Nikodemus Siivola and based on code written by Frode Fjeld. 2003-08-04 Bob Rogers (aka "rgr") * ilisp-utl.el (lisp-slashify): Bind print-escape-* variables. 2003-07-03 Bill Clementson * ilisp-key.el: Fixed fsf keybinding for reposition-window-lisp. 2003-05-30 Bill Clementson * ilisp-chs.el: Added "step" ild command to CLISP file. 2003-05-29 Bill Clementson * ilisp-cl-easy-menu.el: Added ilisp-compile-buffer, trace-defun-lisp-break, ild-step, cltl2-lookup to menu. 2003-05-27 Bill Clementson * completer.el: Applied patch submitted by Hannu Koivisto. (completer-file) Replace slash with blackslashes in STRING only in XEmacs running on Windows. * ilisp-cl-easy-menu.el, ilisp-key.el, ilisp.texi, ilisp-hi.el: Added functions eval-dwim-lisp and eval-dwim-and-go-lisp. 2003-05-21 Bill Clementson * ilisp-key.el: Minor mods to FSF key bindings. 2003-05-21 Bill Clementson * ild.el, ilisp-key.el, ilisp.texi: Updated FSF keybindings to use "C-c C-v" prefix instead of "C-c C-f" due to conflict with xemacs comint mode binding. 2003-05-20 Bill Clementson * ild.el, ilisp-key.el, ilisp.texi: Updated FSF keybindings to use 3 control key sequences. 2003-05-18 Kevin Rosenberg * allegro.lisp: Change reader conditional with Larry Hunter's fix. 2003-05-16 Bill Clementson * ilisp.texi: Updated documentation to reflect changes to FSF keybindings. 2003-05-14 Kevin Rosenberg * cmulisp.lisp: Fixes for CMUCL 18e+ from Raymond Toy. 2003-05-11 Bill Clementson * ilisp-src.el: Applied patch sent by Eduardo Muñoz that fixes problem of point moving to beginning of the buffer when function lisp-locate-definition-in-file is trying to find a definition in the current buffer. 2003-05-09 Bill Clementson * cl-chs-init.lisp: Applied patch sent by Eduardo Muñoz that fixes problem of CLISP "barfing" when #P".lisp" (a pathname) is member of system::*source-file-types* (a list of strings). 2003-05-09 Bill Clementson * ild.el, ilisp-key.el: Complete revision of the FSF key bindings. * ilisp-hi.el: Added functions eval-last-sexp-lisp and eval-last-sexp-and-go-lisp. * ilisp-cl-easy-menu.el: Added functions eval-last-sexp-lisp and eval-last-sexp-and-go-lisp to the menu and removed the non-existent function lisp-indent-for-comment. * ilisp-src.el: Applied patch sent by Eduardo Muñoz that allows "unenhanced" Lisps to use the M-. functionality. * icompile.bat: Added additional parameter to make it optional to produce the monolithic ilisp-all.elc file (this file loads a bit faster but you lose visibility to the ilisp functions in elisp). 2003-04-11 Bob Rogers * cmulisp.lisp (ilisp-callers): Interface to new CMUCL 18e xref:who-calls feature. (The emacs end still needs work.) 2003-04-10 Bob Rogers * ilisp-mouse.el: New feature, mouse interface to M-. that can invoke find-file, dired, ange-ftp, find-tag, your favorite WWW browser (via the browse-url package), and (of course) the ilisp and eli M-. Lisp definition finders. No binding yet; see the source. 2003-04-01 Bob Rogers (aka "rgr") * ilisp-src.el, find-src.lisp, others: Improved M-. functionality using a new lisp->emacs protocol for returning information about known definitions. 2003-03-23 Paolo Amoroso * ilisp-sbcl.el: make debugger exit command `:r toplevel' unambiguous. SBCL 0.7.13 and later introduce the `return' command (patch contributed by Daniel Barlow ). 2003-03-03 Kevin Rosenberg * ilisp-sbcl.el: Add support for aclrepl prompt 2003-02-16 Bob Rogers * cl-ilisp.lisp (ilisp-message): fix double format bug (was using format result as format string). (ilisp-errors): reset ACL command index, as done for CLISP. 2003-02-15 Bob Rogers * ilisp-prc.el (select-ilisp): Make the select-ilisp default behave more like C-x b, show current dialect in prompt. * ilisp-out.el (ilisp-bury-output-internal): Don't let ilisp-bury-output-internal die if ilisp-delete-window fails. 2003-01-10 Matthias Koeppe * guile-ilisp.scm (ilisp-print-info-message): Do nothing if SYM is not a symbol. (This gets rid of the error messages that occured when ilisp-arglist-message-lisp-space was invoked after a non-symbol and ilisp-*arglist-message-lisp-space-p* is ALL.) 2003-01-02 Paolo Amoroso * ilisp-hi.el (ilisp-arglist-message-lisp-space): changed argument to `self-insert-command' so that several spaces can be inserted via a prefix argument (fix suggested by Pascal_Bourguignon ). 2002-12-21 Kevin Rosenberg * COPYING: Based on results of ILISP Developer Questionnaire of Nov 20, 2002, the clause: o No fees or compensation are charged for use, copies, or access to this software. You may charge a nominal distribution fee for the physical act of transferring a copy, but you may not charge for the program itself. was removed from the license. 2002-12-12 Matthias Koeppe * guile-ilisp.scm (info-message): Give informational messages for variables bound to non-procedural values. Show the procedure name before its arglist. 2002-12-06 Paolo Amoroso * docs/ilisp.texi (How to get the latest ILISP distribution): fixed reference to license. Fixed typo. Removed reference to HISTORY file. (Introduction): renamed to "Features". Updated list of supported Emacs versions. Clarified explanations of packages, evaluation and super brackets features. (Files of ILISP): removed. (Configuration and compilation): removed reference to `HyperSpec' variable in Makefile, clarified expected value of variable `LN'. (How to run a Lisp process using ILISP): clarified usage of `run-ilisp' and `allegro', and name of dialect buffer. `cmucl' -> `cmulisp'. (Buffers used by ILISP, and their commands): added first cut at `*Arglist-Output*' item. Changes contributed by Robert Strandh . * INSTALLATION (FIRST INSTALLATION STEP: UNPACKING AND COMPILING): removed reference to `HyperSpec' variable in Makefile, clarified expected value of variable `LN'. 2002-12-03 Kevin Rosenberg * ilisp-snd.el, comint-ipc.el: conditionalize sit-for when called with 2 or 3 parameters to be compatible with xemacs and fsf emacs. 2002-11-11 Martin Atzmueller * cl-ilisp.lisp: apply patch by Bob Rogers, i.e. on Ilisp-devel: 'ilisp::special-form-p undefined in "modern" Allegro', on Fri, 20 Sep 2002, reader conditionalization is lowercase, now. (This makes reader conditionalization uniform in the file, which is a good thing, too ;-) * ilisp-out.el (ilisp-bury-output-internal): remove popup-frame (i.e. *arglist-output*) only from ilisp-*output-sink-history*, if the frame is really buried, not if it is only erased. So, it is possible to delete it by "C-c 1". 2002-11-10 Martin Atzmueller * ilisp-snd.el (ilisp-send): Incorporated patch by Eduardo Munoz fixing Bugs 525424 and 565365 from the SF bugtracking system. (from "Ilisp-help Fw: Solution to bugs 525424 & 565365" on Thu, 15 Aug 2002"). (lisp-buffer-package-internal): removed unnecessary variable IN-PACKAGE-FOUND-P. (lisp-find-hash-form): removed use of variable IN-PACKAGE-FOUND-P as well. 2002-10-29 Matthias Koeppe * guile-ilisp.scm (info-message): If we have a procedure-with-setter whose getter is a closure, get the arglist from there. 2002-10-24 Kevin Rosenberg * ilcompat.el, *.el: Change calls from buffer-substring to buffer-substring-no-properties to fix problem with fsf emacs 21.2 which copies font information with the buffer-substring command. Added buffer-substring-no-properties function to ilcompat.el for platforms that don't have it implmented. 2002-09-25 Will Deakin Stuff to fix the package stuff I broke when trying to * ilisp-snd.el: `refactored' ilisp-check-package-advanced with call to new functin ilisp-get-package-advanced. Removed extraneous fallback stuff. * ilisp-cl.el: ilisp-fallback-package is a symbol; ilisp-in-package uses a %S and not \"%s\". (This caused some confusion with setting package names.) 2002-09-11 Bob Rogers (aka "rgr") * ilisp-out.el (ilisp-bury-output): Handle multiple stacked output frames, numeric arg now buries all. 2002-09-05 Bob Rogers * cl-ilisp.lisp (ilisp-compile), cmulisp.lisp (fun-defined-from-pathname): Teach CMUCL not to forget the source file of interactively compiled definitions. * ilisp-hi.el (lisp-find-file): Remove a misfeature: If NO-NAME was nil and there is a buffer with a name that is the same as the final pathname component, lisp-find-file selected that buffer instead of reading the file associated with the full pathname. NO-NAME is now obsolete, so is lisp-buffer-file (in lisp-def.el), and lisp-find-file is now much smaller. * ilisp-hi.el (ilisp-arglist-message-lisp-space): Don't lose on #:foo. 2002-09-03 Matthias Koeppe * ilisp-def.el (ilisp-*process-connection-type*): New variable. * ilisp-mod.el (ilisp): Use this variable here. * ilisp-cmp.el (complete-lisp): Bail out early if LISP-PREVIOUS-SYMBOL returns nil. 2002-08-20 Will Deakin * cl-ilisp.lisp, HISTORY and docs/ilisp-refcard.tex: Picky change to capitalisation on XEmacs; * ilisp-chs.el: Clean up to comment above -ansi; 2002-07-01 Matthias Koeppe * ilisp-hi.el (ilisp-arglist-message-lisp-space): Don't try to get the arglist if point is directly behind a semicolon. (This check was introduced on 2000/12/06 and broken later.) 2002-06-28 Matthias Koeppe * guile-ilisp.scm (ilisp-describe): New. * ilisp-sch.el (guile): Set ilisp-describe-command. 2002-06-17 Paolo Amoroso * docs/ilisp.texi (ACKNOWLEDGMENTS): added Alain Picard. Updated modification date. * ACKNOWLEDGMENTS: added Alain Picard. * lispworks.lisp (munge-who-calls, ilisp-source-files): improved support for `edit-definitions-lisp'. (translate-source-type-to-dspec, *source-type-translations*): removed. (*ilisp->lispworks-type-mappings*, ilisp->lispworks-types): new. Patch contributed by Alain Picard . 2002-06-07 Paolo Amoroso * ACKNOWLEDGMENTS: added Bill Clementson and Dave Fox. * docs/ilisp.texi (Acknowledgments): added Bill Clementson, Dave Fox and Hannu Koivisto. Updated modification date. * INSTALLATION (TIPS): added Windows entry. 2002-06-03 Paolo Amoroso Version 5.12.0 released (tagging and releasing done by Marco Antoniotti ). 2002-06-03 Marco Antoniotti * Makefile: Changed SHELL to /bin/csh (just to make the `tarring' target work). Removed variable `HyperSpec'. Added `icompile.bat' to variable `OtherFiles'. * icompile.bat: Removed the copying of `hyperspec.el' (no more need for it). 2002-06-02 Marco Antoniotti * ChangeLog: ChangeLog updated. * ilisp-out.el: Added Reini Urban's fix for XEmacs. * ilisp.emacs: Changed the 'setq *-hook' to more proper 'add-hook. * docs/ilisp.texi: Changed date to 'June 2002' and fixed the paragraph about the `hyperspec.el' file. 2002-06-02 Marco Antoniotti * ilisp-out.el: Added Reini Urban's fix for XEmacs. * ilisp.emacs: Changed the 'setq *-hook' to more proper 'add-hook. * docs/ilisp.texi: Changed date to 'June 2002' and fixed the paragraph about the `hyperspec.el' file. 2002-05-31 anisotropy9 * debian/emacsen-install, extra/README: Updated references elsewhere in line with the removal of the hyperspec-*.el files. 2002-05-31 Paolo Amoroso * docs/ilisp.texi (Acknowledgments): added Reini Urban. (Files of ILISP): added `ilisp-ccl.el'. (How to run a Lisp process using ILISP): added Corman Lisp info. (Interface to Lisp Debuggers): mentioned Corman Lisp. (ILISP Customization): added `cormanlisp'. Patches contributed by Reini Urban . * ilisp.emacs: added Corman Lisp examples (patch contributed by Reini Urban ). * ilisp.el: Added `(load "ilisp-ccl")' (patch contributed by Reini Urban ). * ilisp-snd.el (comint-send-code-init-function): added call to `file-name-hack' (patch contributed by Reini Urban ). * ilisp-mak.el (;; Dialects): added `ilisp-ccl' (patch contributed by Reini Urban ). * ilisp-hi.el (file-name-hack): new function. Combined Ivan's ange-ftp hack and the cygwin => w32 path conversion (patch contributed by Reini Urban ). * ilisp-cl-easy-menu.el (ilisp-ild-easy-menu): added. Insert "Debug" menu if `ilisp-*enable-ild-support-p*'. Enable the commands only if inside the debugging loop. (ilisp-ild-p): added. (ilisp-insert-menu): added. (ilisp-redefine-menu): added. (ilisp-cl-easy-menu): changed to `defvar'. Patches contributed by Reini Urban . * Makefile (LoadFiles): added ilisp-ccl.elc (patch contributed by Reini Urban ). * ilisp-ccl.el, cormanlisp.lisp: Initial revision (file contributed by Reini Urban ). * cl-ilisp.lisp (ilisp-w32-fix-filenames): new function. Similar to `file-name-hack' on the Lisp side. Converts backslashes to forward slashes also. Some minor Corman fixes (patch contributed by Reini Urban ). * ACKNOWLEDGMENTS: Added Reini Urban. 2002-05-28 Will Deakin * ilisp-def.el (ilisp-*version*): set to 5.12.0. * README: updated version info for 5.12.0. * Makefile (Version): set to 5.12.0. * docs/Makefile (Version): set to 5.12.0. 2002-05-24 Matthias Koeppe * guile-ilisp.scm (ilisp-in-package): Fix process-use-modules call. * ilisp-cmp.el (ilisp-complete): Report "Error completing SYMBOL" when the value read from Lisp's output is not a list. * ilisp-out.el (ilisp-make-output-frame): Set frame parameter `tool-bar-lines' to nil in ILISP output frames; this disables the Emacs 21 tool bar. 2002-04-21 Paolo Amoroso * cmulisp.lisp (def-debug-command "POP"): `restart-report-function' should be passed a stream, not nil. Passing nil apparently stopped working in CMU CL 18d-pre (patch contributed by Tim Moore ). 2002-04-11 Martin Atzmueller * ilisp-hi.el (ilisp-arglist-message-lisp-space): Commit another long standing fix for a problem reported by Stephen Wilson on ilisp-help (around beginning of march): after pressing "left parenthesis, backslash, space", ILISP does not lock up, now. * ilisp-snd.el (lisp-buffer-package-internal): Commit my long-standing fix for a problem reported on ilisp-help by Edmund Weitz (01 Feb 2002 13:13:43): prevent ILISP from shortcutting the package-exploration process, i.e. if there is a DEFPACKAGE after the first IN-PACKAGE, this still can yield a later IN-PACKAGE, so don't just return the first IN-PACKAGE. 2002-03-03 Paolo Amoroso * INSTALLATION (CLISP): removed discussion of `system::*source-file-types*'. 2002-03-01 Matthias Koeppe * ACKNOWLEDGMENTS: Thank Hannu Koivisto. Move Craig Brozefsky into alphabetical order. 2002-02-24 Paolo Amoroso * ilisp-kcl.el (ecl): comint-prompt-regexp tuned slightly (patch contributed by Hannu Koivisto ). * ilisp-out.el (ilisp-make-output-frame): disabled use of `icon-type' parameter with `make-frame'. This caused fatal problems with Emacs 21.1 on Win2K. Removed old cruft in comments. (lisp-pop-to-buffer): rewritten to work sanely in all cases and to actually set input focus in Emacs 21 and XEmacs when requested with new optional `set-input-focus-p parameter'. This solves some problems with KDE (it stole focus in wrong situations, raised frames on top of everything else but didn't change focus, etc.) and Win2K. (switch-to-lisp): now requests `lisp-pop-to-buffer' to set input focus. Also cosmetic changes. (ilisp-display-output-in-lisp-listener): cosmetic changes. (above patches contributed by Hannu Koivisto ). * comint-ipc.el (comint-process-filter): output handler is now called inside save-current-buffer instead of save-excursion so that if, for example, `comint-insert' is called by the handler, it is able to move the point. This fixes the bug that caused point not to move after output after `set-lisp-package command', after starting an inferior Lisp before using `ilisp-compile-inits', and possibly other situations (patch contributed by Hannu Koivisto ). 2002-02-20 Paolo Amoroso * docs/ilisp.texi (Configuration and compilation): added info on compiling under Windows with `icompile.bat'. (Files of ILISP): added `icompile.bat' entry. * icompile.bat: initial revision (file contributed by Bill Clementson ). 2002-02-18 Paolo Amoroso * docs/ilisp.texi (Configuration and compilation): added CLHS URL and downloading information. Updated version info. * extra/hyperspec-naggum.el: The Harlequin Group Ltd -> Xanalys Inc. Updated CLHS URL. 2002-02-14 Paolo Amoroso * extra/hyperspec-naggum.el: replaced symbol table for CLHS v 4.0 with the one for v 6.0, which is now online at Xanalys' site (patch contributed by Edmund Weitz ). * INSTALLATION (KCL, AKCL, Ibuki, GCL, and ECL): added suggestion to get the latest CVS version of ECL (by Hannu Koivisto ). (Xanalys LispWorks): added note on using CAPI (info contributed by Dave Fox ). * ilisp-kcl.el (ecl): `comint-prompt-regexp' tuned slightly. Binary extension is now figured out in the generic way. `comint-fix-error' kludged temporarily so that the user gets a valid prompt (patch contributed by Hannu Koivisto ). 2002-01-31 Martin Atzmueller * ilisp-cl.el (common-lisp): removed ILISP-DEFPACKAGE-REGEXP, since it was never used. * ilisp-scheme-easy-menu.el (scheme-mode-hook): removed the unnessary second parameter of EASY-MENU-REMOVE. * ilisp-imenu.el (ilisp-imenu-create-lisp-index): removed previous (commented out) version of this function. * ilisp-cl-easy-menu.el (lisp-mode-hook): removed the unnessary second parameter of EASY-MENU-REMOVE. * ilisp-imenu.el (imenu): require 'imenu. This makes the (INDEX-)imenu work, when ilisp-imenu is compiled! 2002-01-25 Matthias Koeppe Added OpenMCL support contributed by Gary Byers . * openmcl.lisp, ilisp-openmcl.el: New files. * Makefile, cl-ilisp.lisp, ilisp-dia.el, ilisp-mak.el, ilisp.el, docs/ilisp.texi: Add OpenMCL support. * ACKNOWLEDGMENTS: Mention Gary Byers. 2002-01-21 Matthias Koeppe * ilisp-def.el, ilisp-dia.el (ilisp-locals, setup-ilisp): Make the Emacs-21 variable `comint-use-prompt-regexp-instead-of-fields' buffer-local and set it to T. The default Emacs-21 behavior of using "output fields" instead of regexps does not seem to work with ILISP, so `comint-previous-prompt' and others would not work. * ilisp-cmp.el (ilisp-restore-prefix, ilisp-current-choice): Another Emacs 21 minibuffer completion fix. 2002-01-18 Matthias Koeppe * ilisp-cmp.el: Emacs 21 minibuffer completion fix; edit-callers-lisp would not accept minibuffer input when minibuffer-no-complete is nil. (ilisp-minibuffer-prompt-end): New function. (ilisp-current-choice, ilisp-completion-word, ilisp-completion-paren, ilisp-completion-exit): Use ilisp-minibuffer-prompt-end instead of 1 or (point-min). * guile-ilisp.scm (ilisp-source-file): Add missing newline in negative answer, which took ILISP to :error state. 2002-01-17 Martin Atzmueller * sbcl.lisp (arglist): arglists now can be either strings, or lists (depending on SBCL-version). Tweak, to print the empty arglist as '()', in the latter case. 2002-01-16 Matthias Koeppe * ilisp-sch.el (scheme): Fix ilisp-block-command, so that blocks ending with a comment but no newline are handled properly. * guile-ilisp.scm (info-message): Use the 'arglist procedure property when available (Guile 1.5.4 and later). 2002-01-07 Martin Atzmueller * ilisp-sbcl.el (sbcl-check-prompt): sbcl-check-prompt has become a dummy function. The function is set later, to take care of different prompts in different sbcl versions. (sbcl-check-prompt-sbcl<07): check-prompt version for SBCL version, where version < 0.7.x. (match-and-extract): new function. (sbcl-check-prompt-sbcl>=07): check-prompt for SBCL version >= 0.7.x. (ilisp-*sbcl<07-version*): marker-variable. (set-determined-sbcl-version): new function. (sbcl-ilisp-customize): new function for all sorts of customizations, after the lisp has started up. (sbcl-version-hook-fun): customizing hook function. (sbcl): the new hook-fun is added to the ilisp-init-hook-local hook. (All this will hopefully work in all Emacs versions ...) 2002-01-04 Martin Atzmueller * cl-ilisp.lisp: ditto. (some #+ecl tweaks ...) * ilisp-kcl.el (ecl): ecl tweaks; after manual compilation of the ILISP *.lisp files, ecl(s)-0.5 works better. 2001-12-28 Craig Brozefsky * ilisp-mak.el: install files which were previously commented out of the installation process, and minor emacs21 compat change. * Makefile.el: added ilisp-cl-easy-menu to list of .elc files and link a hyperspec interface implementation file to hyperspec.el. The hyperspec and cltl2 files are no longer compiled seperately in the Makefile, instead they are compiled by ilisp-mak.el * docs/ilisp.texi: minor texinfo errors removed. * debian/*: Improved package support under Debian, installing files which were previously missed due to ilisp-mak.el issues. Also installs info files appropriately. * ACKNOWLEDGMENTS: added myself to end of list. 2001-12-10 Paolo Amoroso * extra/hyperspec-naggum.el (eval-when): replaced assignment to symbol function with alias definition (fix suggested by Hannu Koivisto ). * ACKNOWLEDGMENTS: added Edmund Weitz. * docs/ilisp.texi (Acknowledgments): added Edmund Weitz. * ilisp.emacs: added comments on customizing hyperspec-naggum.el (patch contributed by Edmund Weitz ). * extra/hyperspec-naggum.el: added support for dynamic symbol table and HyperSpec versions later than 3 (patch contributed by Edmund Weitz ). 2001-12-07 Paolo Amoroso * ild.el: added support for breakpoint stepping (patch contributed by Ole Rohne ). * ilisp-cmu.el: added support for breakpoint stepping (patch contributed by Ole Rohne ). * docs/ilisp.texi (Interface to Lisp debuggers): documented `ild-step'. (Acknowledgments): added Ole Rohne. Updated version info. * ACKNOWLEDGMENTS: added Ole Rohne. 2001-11-06 Martin Atzmueller * sbcl.lisp (arglist): tweak due to more renamings in the SBCL-0.7.pre branch. (get-correct-fn-object): ditto. 2001-11-02 Paolo Amoroso * ilisp-chs.el (clisp-hs-program): added back ANSI mode flag `-ansi'. Omitting it may break the Common Lisp support code, now or in the future. 2001-10-28 Paolo Amoroso * ilisp-chs.el (clisp-hs-program): removed `-a' (deprecated, and besides whe should let the user decide whether he prefers ANSI mode) and `-q' (didn't give deserved credit) options from CLISP's command line. 2001-10-25 Paolo Amoroso * completer.el: (minibuffer-prompt-end): New function for compatibility, defined only if not defined already. (completer-region): Backward movement is now limited by the end of the minibuffer prompt. (completer-match-exit): Ditto. (completer-minibuffer-string): Now excludes minibuffer prompt using minibuffer-prompt-end. Patch for making ILISP work with GNU Emacs 21 contributed by Hannu Koivisto . * docs/ilisp.texi (Configuration and compilation): The Harlequin Group Ltd -> Xanalys Inc. Updated date info. * INSTALLATION: (FIRST INSTALLATION STEP: UNPACKING AND COMPILING): The Harlequin Group Ltd -> Xanalys Inc. (LispWorks): updated and shortened. Patch contributed by Dave Fox . * lispworks.lisp: (ilisp-callers): extended conditionalization to include LW 4.2 as well as 4.1, and made it more future-proof. (sys::define-top-loop-handler): made the definition of `sys::define-top-loop-handler' avaliable at macro-expansion time, when it is needed during compilation of this file. (system::*force-top-level*): added for getting an interactive session with ILISP under Unix. Patch contributed by Dave Fox . 2001-10-20 Martin Atzmueller * sbcl.lisp: add some more comments. 2001-10-19 Martin Atzmueller * ilisp-sbcl.el (sbcl): removed hardcoded compiled-file extensions, e.g. "x86f", because - ILISP already had a general mechanism to take care of that, - sbcl-0.7.x uses ".fasl" instead of the former extensions. * cmulisp.lisp (arglist): relevant changes to THE-*-IF-DEFINED forms, due to changes to the macros. * sbcl.lisp: tweaks, to make sbcl-0.7pre (and hopefully sbcl-0.7, too) work with ILISP again. Used a lot of THE-SYMBOL-IF-DEFINED, and THE-FUNCTION-IF-DEFINED magic. Now it's not only necessary, to take care of differences between sbcl-0.7.x and sbcl-0.6.x due to absence of evaluator/byte-compiler in sbcl-0.7.x, but also to take care of renamings of various (internal) functions ... * cmulisp.lisp: removed exports. * sbcl.lisp: removed exports. * ilisp-pkg.lisp ("ILISP"): put the exports in one place, not in seperate source files (deleting stuff from sbcl.lisp, cmulisp.lisp). * cl-ilisp.lisp (the-symbol-if-defined): tweak. (the-function-if-defined): tweak as well, for better interface. 2001-10-05 Paolo Amoroso * sbcl.lisp (SB-EVAL, ilisp-compile, arglist, source-file, fun-defined-from-pathname): make ILISP work with SBCL 0.pre7, which does not have byte compiler and SB-EVAL package (patch contributed by Alexey Dejneka ). 2001-09-05 Paolo Amoroso * INSTALLATION: added coverage of CLtL2 lookup. * ilisp.emacs: added sample CLtL2 configuration instructions. * docs/ilisp.doc: updated version info. (Acknowledgments): added Utz-Uwe Haus. (Configuration and compilation, Documentation functions): added coverage of CLtL2 lookup. 2001-08-27 Paolo Amoroso * ilisp-def.el (ilisp-binary-extension, ilisp-init-binary-extension): fixed docstring typos. 2001-07-27 Matthias Koeppe * extra/cltl2.el: New file, contributed by Utz-Uwe Haus , for browsing the CLTL2 online edition. * ilisp-def.el (ilisp-*use-cltl2-interface-p*): New variable. * ilisp-key.el: Bind cltl2-lookup to C-z L (or C-z M-l). * ACKNOWLEDGMENTS, Makefile, ilisp.el: Appropriate additions. 2001-07-16 Matthias Koeppe * guile-ilisp.scm (doc->arglist): Fix parsing of texinfo-formatted docstrings of 0-ary procedures. 2001-06-06 Marco Antoniotti * ACKNOWLEDGMENTS: Added (while being utterly ashamed) the credit to Chris McConnell, the author of the original ILISP. 2001-06-06 Paolo Amoroso * docs/ilisp.texi (Acknowledgements): added Daniel Barlow and Matthias Hoelzl. 2001-06-06 Martin Atzmueller * ilisp-sbcl.el (sbcl): sb changed to sbcl in call to ilisp-load-inits. * ilisp-doc.el (ilisp-documentation): SBLISP changed to SBCL. * ilisp-dia.el: SBLISP changed to SBCL. 2001-06-06 Paolo Amoroso * ilisp-def.el (ilisp-*version*): set to 5.11.1. * README: updated version info for 5.11.1. * COPYING (Version, Date): update version infor for 5.11.1. * Makefile (Version): set to 5.11.1. * docs/Makefile (Version): set to 5.11.1. * docs/ilisp.texi: updated version info for 5.11.1. (Files of ILISP, How to run a Lisp process using ILISP, ILISP Customization): the "sblisp" dialect is now called "sbcl". 2001-06-06 Martin Atzmueller * sbcl.lisp: new (ILISP 5.11) boilerplate text (from sblisp.lisp). * ACKNOWLEDGMENTS: add Matthias Hoelzl, who first contributed sblisp.lisp. add Dan Barlow to the hall of fame, too. * sbcl.lisp (source-file): "typo": SB-IMPL-ERRORS does not exist, and should be ILISP-ERRORS. 2001-06-05 Paolo Amoroso * sbcl.lisp: initial release (file contributed by Daniel Barlow ). * ilisp-sbcl.el (sblisp): changed the name of the Steel Bank Common Lisp dialect to "sbcl". (sblisp-source-directory-regexp, sblisp-local-source-directory): removed because SBCL sources are usually unreadable in a running system, so it seems unlikely that they are used any more. (ilisp-sbcl-init-file): renamed from "ilisp-sblisp-init-file" and given appropriate default value. (ilisp-directory-command, ilisp-set-directory-command): now use the portable *default-pathname-defaults* code, which should work in 0.6.12.20 or newer. (comint-fix-error, ilisp-reset, comint-interrupt-regexp): updated to commands that work. Patches contributed by Daniel Barlow . * Makefile (SHELL): use sh instead of csh (fix contributed by Daniel Barlow ). 2001-05-22 Matthias Koeppe * Makefile: Include ChangeLog and ACKNOWLEDGMENTS in the distribution. * guile-ilisp.scm: Define module (guile-ilisp) before using it in module (guile-user); this is needed for Guile 1.5. 2001-05-14 Matthias Koeppe * Makefile: Put *.scm files into the distribution. 2001-05-13 Marco Antoniotti Version 5.11 released. 2001-05-09 Matthias Koeppe * guile-ilisp.scm (ilisp-get-package): If the full module name is available (as is in Guile >= 1.4), use it instead of parsing the sequence of define-module forms. This also works around an eval memoizing bug in Guile 1.5. * guile-ilisp.scm: Write all results using `write' and return no value. (When the (ice-9 history) module is in use, all return values are prefixed, which ILISP can't parse.) 2001-04-19 Martin Atzmueller * cl-ilisp.lisp: include patch - 2001 Apr 06 on ilisp-devel (patch contributed by Craig Brozefsky ): take care of new :CMU18 feature in the (debian) cmucl 18c version. * ilisp-sbcl.el (sblisp): comint-fix-error expression becomes ":abort" instead of former ":pop". * sblisp.lisp: removed the "POP"-debugger command, because it is already handled by the abort-restart. 2001-04-10 Paolo Amoroso * ilisp-def.el (ilisp-*version*): set version marker to 5.11. 2001-04-05 Paolo Amoroso * docs/ilisp.texi (FTP and Web directions): added URL of ILISP's filelist at SourceForge and new index entry. Minor reformatting. * GETTING-ILISP: added URL of ILISP's filelist at SourceForge. Minor reformatting. 2001-04-04 Matthias Koeppe * guile-ilisp.scm (symbol-not-present): Strip parens from the module names; C-u M-x arglist-lisp would parse them as an arglist. 2001-04-04 Paolo Amoroso * docs/ilisp.texi (How to run a Lisp process using ILISP, ILISP Customization): added info on MzScheme and DrScheme-jr. 2001-04-03 Paolo Amoroso * docs/ilisp.texi: updated date and version info. 2001-04-02 Matthias Koeppe * ilisp-sch.el (mzscheme): Provide symbol completion for MzScheme. * mzscheme-ilisp.scm: New file, MzScheme support. * ilisp-hi.el (ilisp-arglist-message-lisp-space): Fixed last change: always insert the space, even if no electric behaviour is available. 2001-03-29 Martin Atzmueller * ilisp-mod.el (ilisp): ilisp-init-hook replaced by ilisp-init-hook-local. * ilisp-dia.el (setup-ilisp): ilisp-init-hook replaced by ilisp-init-hook-local. Default ilisp-init-hook-local hook now runs hooks on ilisp-init-hook, too. * ilisp-def.el (ilisp-init-hook): ilisp-init-hook has become a DEFVAR. (ilisp-init-hook-local): new variable ilisp-init-hook-local, that replaces the old DEFLOCAL ilisp-init-hook. Thus fixing bug reported by Hannu Koivisto (cmucl-imp 2001-03-16). * ilisp-hi.el (default-directory-lisp): test if directory-command is bound, if default-directory is set. 2001-03-27 Martin Atzmueller * ilisp-hi.el (ilisp-arglist-message-lisp-space): don't try to display an arglist, after a #+ or #- form, e.g. after a "feature-switch" form. 2001-03-27 Matthias Koeppe * guile-ilisp.scm (ilisp-arglist, ilisp-help): Be more verbose when the symbol is undefined. (ilisp-in-package): Use the (guile-ilisp) module in every module switched to. This enables the ILISP commands there. 2001-03-21 Matthias Koeppe * guile-ilisp.scm (doc->arglist): Parse multi-line arglists in procedure documentation that has been passed through TeXinfo (Guile 1.4.1). 2001-03-13 Martin Atzmueller * sblisp.lisp ("POP"): tweaked dynamic code (using the new macros). * cmulisp.lisp (arglist): old feature-based stuff replaced with even more dynamic code based on the new macros (below). (source-file): ditto. (fun-defined-from-pathname): ditto (the-function-if-defined). (fun-defined-from-pathname): ditto (the-symbol-if-defined). * cl-ilisp.lisp: old version of print-function-arglist (in comments) removed. (ilisp-print-info-message): old debugging code (in comments) removed. (the-function-if-defined): new macro: instead of testing on compiler-features in *features*, this macro tests on the presence of certain functions. (the-symbol-if-defined): new macro: instead of testing on compiler-features in *features*, this macro tests on the presence of certain symbols. Both help SBCL and CMUCL in curing some versioning differences. * sblisp.lisp: old version of print-simple-source-info (in comments) removed. * cmulisp.lisp: old version of print-simple-source-info (in comments) removed. 2001-03-12 Martin Atzmueller * sblisp.lisp ("POP"): tweaks. Old version of arglist (in comments) removed. Old version of source-file (in comments) removed. * cmulisp.lisp (patch contributed by Hannu Koivisto): (arglist) CMU17 read-time conditional stuff replaced with a more dynamic feature testing code. Also few cosmetic fixes. Old version of arglist (in comments) removed. Old version of source-file (in comments) removed. 2001-03-12 Paolo Amoroso * INSTALLATION (log message): removed the whole contents of the INSTALLATION file, which was accidentally added to the log message during the previous commit. Sorry :-( * INSTALLATION (Harlequin/Xanalys LispWorks): added info on the LWW 4.1.20 patch bundle (info contributed by Carl Shapiro ). 2001-03-02 Matthias Koeppe * guile-ilisp.scm (ilisp-help), ilisp-sch.el (guile): Get documentation for the symbol from the right module. 2001-03-01 Matthias Koeppe * guile-ilisp.scm (doc->arglist, ilisp-arglist): Minor fixes related to arglists. 2001-02-20 Paolo Amoroso * cl-ilisp.lisp (get-function-arglist): fixed a bug that prevented the most appropriate arglist function from being selected with LispWorks, and probably also GCL (fix contributed by Alain Picard ). 2001-02-14 Paolo Amoroso * ilisp-cmu.el (ilisp-directory-command, ilisp-set-directory-command): added to fix the broken behavior of `default-directory-lisp' with CMUCL (fix contributed by Tijs van Bakel ). 2001-02-12 Paolo Amoroso * ilisp-hi.el (ilisp-arglist-message-lisp-space): don't try to display arglist if there is no inferior Lisp running (patch contributed by Hannu Koivisto ). 2001-01-24 Martin Atzmueller * docs/ilisp.texi (Package Commands): updated documentation, since ilisp-package-regexp is gone, this has become ilisp-hash-form-regexp. 2001-01-23 Martin Atzmueller * ilisp-def.el (ilisp-*arglist-message-lisp-space-p*): documentation update. 2001-01-22 Martin Atzmueller * ilisp-mod.el (lisp-command-args): removed commented out version. 2001-01-21 Martin Atzmueller * ilisp-snd.el (comint-send-code-init-function): new function, moved out of ilisp-init-internal for doing init stuff in the comint process buffer. * ilisp-out.el: * (ilisp-desired-height) output sink buffer's window is now searched from all frames because a separate typeout frame might be in use. * (ilisp-shrink-wrap-window-and-frame) * Window size modification code removed because there's only one window anyway and an attempt to resize it results to an error. * when+not -> unless. * (ilisp-display-buffer-in-typeout-frame) * ignore-errors workaround removed from around ilisp-shrink-wrap-window-and-frame call since the real problem is now (hopefully) fixed. * Cosmetic changes: debug code comments removed and some closing parens moved away from their own lines. (patch contributed by Hannu Koivisto ) * ilisp-snd.el: cosmetic changes: removed some unnecessary comments, moved some closing parens away from their own lines. * ilisp-snd.el: * (lisp-buffer-package-internal) * Allow nil when fetching the value of the ilisp-hash-form-regexp variable. * If ilisp-hash-form-regexp is nil, assume that the system doesn't know about packages and return nil as the package. * Old implementation of lisp-buffer-package-internal in comments removed; it's still available via CVS if someone really needs it for documentation purposes. (patch contributed by Hannu Koivisto ) * ilisp-sch.el: * (guile) Setting of ilisp-package-regexp removed as it's not used anymore. (patch contributed by Hannu Koivisto ) * ilisp-doc.el: * (ilisp-documentation) References to ilisp-package-regexp replaced with ilisp-hash-form-regexp; it's used for the same purpose ilisp-package-regexp was. (patch contributed by Hannu Koivisto ) * ilisp-def.el: * (ilisp-in-package-command-string) New definition for an ilisp-local variable that was in use already. * (ilisp-defpackage-command-string) Ditto. * (ilisp-hash-form-regexp) Ditto. * (ilisp-package-regexp) Removed as it's not used anymore. (patch contributed by Hannu Koivisto ) * ilisp-cl.el: * (common-lisp) Setting of ilisp-package-regexp removed as it's not used anymore. (patch contributed by Hannu Koivisto ) 2001-01-18 Martin Atzmueller * ilisp-out.el (ilisp-display-buffer-in-typeout-frame): if there exists a cached frame, just raise it. * ilisp-out.el (ilisp-bury-output): erase the buffer used. If 'this-command is arglist-message-lisp-space, don't delete the sinks frame, to cache it. (this helps when using some window-managers like KDE in focus-management). * ilisp-sch.el: - (scheme) ilisp-block-command modified to ensure ILISP never passes empty blocks to Scheme as they are not allowed by R5RS. - (guile) Guile-specific empty-block -prevention removed. - (mzscheme) New dialect definition. - (drscheme-jr) Ditto. (patches contributed by Hannu Koivisto ). * ilisp-mod.el (lisp-command-args) Reimplemented (badly, but better than nothing) to support quoted program name and arguments with spaces in them. (patch contributed by Hannu Koivisto ). * ilisp-mak.el: - Cosmetic changes: useless comments removed, some fixed a bit, useless progn removed, (setq x (cons .. x)) -> (push .. x), excess newlines removed, etc. - Compatibility files are now actually compiled: byte-compile changed to byte-compile-file for them. - If XEmacs, ilxemacs is compiled instead of illuc19. Incorrect comment related to this removed; illuc19 and ilxemacs are not linked in the current version of ILISP. - Error message typo fix. (patches contributed by Hannu Koivisto ). * ilisp-hi.el (ilisp-arglist-message-lisp-space) ilisp-print-info-message-command needs to be something useful for arglist message to be printed. (patch contributed by Hannu Koivisto ). * ilisp-def.el (ilisp-print-info-message-command) New definition for an ilisp-local variable that was in use already. (patches contributed by Hannu Koivisto ). * ilcompat.el: - Now requires cl. - Now provides ilcompat instead of compat. - Cosmetic fixes: commenting more consistent with other files. - Work-around for last bug in Emacs 19.34 < x < ? Nothing in ILISP as of this writing faces this, I think, but it's easy to bump into with, for example, destructuring-bind, so better be safe than sorry. (patches contributed by Hannu Koivisto ). * ilisp-hi.el (ilisp-compile-buffer): display the result of compiling a buffer. * sblisp.lisp (arglist): reworked my previous patch on that. * comint-ipc.el (comint-sender): sends are logged now (patch contributed by John M. Adams). * ilisp-hi.el (ilisp-compile-buffer): compile-buffer did not work because deactivate-mark has no function definition in XEmacs (patch contributed by John M. Adams). 2001-01-16 Martin Atzmueller * ilisp-out.el: ILISP Output and ILISP Arglist Output frames are no longer created at load time because they may not be used at all and they are created on-demand anyway (patch contributed by Hannu Koivisto ). 2001-01-09 Martin Atzmueller * sblisp.lisp (arglist): fixed a bug, when we already have the correct symbol. 2001-01-07 Martin Atzmueller * Welcome: corrected my email contact address. * ilisp-sbcl.el (sblisp): cleaned up a comment. * sblisp.lisp ("POP" debug command): reworked this, since the SBCL debugger code has changed a bit. * sblisp.lisp (fun-defined-from-pathname): comment cleanup. 2001-01-05 Paolo Amoroso * docs/ilisp.texi (Acknowledgements): added Craig Brozefsky. Updated date info. * Welcome: added Craig Brozefsky to the list of maintainers. 2000-12-26 Matthias Koeppe * ilisp-sch.el, guile-ilisp.scm: Rewrote the Guile arglist fetching code, which is more clever now; tested with Guile 1.3.4, 1.4 and 1.4.1. * ilisp-hi.el (ilisp-arglist-message-lisp-space): Don't try to get the arglist if point is directly behind a semicolon; the comment character would be passed to the Lisp, causing confusion. 2000-12-26 Paolo Amoroso * INSTALLATION (TIPS): created section and added tip on input focus with Enlightment/Gnome (suggested by Marco Antoniotti ). 2000-12-21 Matthias Koeppe * guile-ilisp.scm (ilisp-source-file): Made search for source properties more reliable. * ilisp-low.el (lisp-def.el): Handle some Scheme dialects' curried definitions like (define ((f a) b) ...). 2000-12-07 Matthias Koeppe * ilisp-src.el (edit-definitions-lisp): When using tags, use a tags loop with the locator instead of find-tag if SEARCH is true. (There are no tags for function calls, only for definitions, so search all tagged files for calls.) * ilisp-src.el (ilisp-locate-scheme-calls): Don't expect package prefixes when locating calls; Scheme does not have package prefixes. 2000-12-04 Matthias Koeppe * ilisp-sch.el (scheme), ilisp-src.el (ilisp-locate-scheme-definition, ilisp-locate-scheme-calls): New Scheme source locators. The standard locators would fail on "(define (thunk) ....)" and report "(define (procedure ...) ...)" as a procedure call. * ilisp-sch.el (guile), guile-ilisp.scm (ilisp-source-file): Get the source file of a definition from the interpreter. * guile-ilisp.scm (ilisp-trace, ilisp-untrace): I broke these in the last change, fixed. 2000-12-03 Paolo Amoroso * allegro.lisp (allegro-v5.0): added support for ACL 6.0 and updated the comment (fix suggested by Larry Hunter ). 2000-11-30 Matthias Koeppe * docs/ilisp.texi: Removed comment about Guile support being incomplete. (It has been completed.) 2000-11-30 Paolo Amoroso * Welcome: added info about the SourceForge site and mailing lists. Added Matthias Koeppe to the list of maintainers. Reformatted. 2000-11-30 Matthias Koeppe * ilisp-sch.el (guile), guile-ilisp.scm: Updated for Guile 1.4.1. Handle the case of unregistered modules. Send source position to the interpreter when evaluating. * ilisp-ext.el: Don't clobber C-M-l and C-M-r keybindings in FSF compliant mode. Those are bound to `reposition-window' and `isearch-backward-regexp', respectively, at least in GNU Emacs 20. * ilisp-def.el (ilisp-eval-command, ilisp-defvar-command): Format strings now take an extra parameter, source LINE. * ilisp-hi.el (lisp-send-region): Send source line to inferior lisp. 2000-11-29 Matthias Koeppe * ilisp-snd.el (ilisp-check-package-advanced): Don't signal an error if ilisp-no-package-in-core-regexp is nil. 2000-11-15 Paolo Amoroso * docs/ilisp.texi (Files and directories): added description of the behavior of `load-file-lisp' with .system files. 2000-11-14 Paolo Amoroso * docs/ilisp.texi (How to get the latest ILISP distribution): added information about the SourceForge site and mailing lists. (FTP and Web directions, Acknowledgements): added reference to the mailing lists. Updated version info. * docs/README: removed redundant version number; minor formatting changes. * GETTING-ILISP: added reference to the mailing lists; minor formatting changes. * README: updated version number; changed Harlequin to Xanalys/Harlequin; added information about the SourceForge site and mailing lists; minor formatting changes. 2000-11-12 Paolo Amoroso * Welcome: removed Rick Campbell from the list of current maintainers because he no longer works on ILISP. 2000-11-06 Martin Atzmueller * ilisp-cl.el (common-lisp): changed ilisp-hash-form-regexp, so that cl:in-package and cl:defpackage is understood as well as their variants, with or without the explicit package-marker. 2000-11-06 Paolo Amoroso * ilisp-sbcl.el (sblisp-source-directory-regexp, sblisp-local-source-directory): added back because the file includes other references to the variables and since I don't have SBCL, I don't know what's the best approach to removing the obsolete support for source directory. 2000-11-06 Paolo Amoroso * ilisp-sbcl.el (ilisp-sblisp-init-file): added comment on init file source extension. (sblisp): added `ilisp-directory-command' and `ilisp-set-directory-command'. William says: "This is a quick hack to make things work for now. In a later version of SBCL I'd like to have a cleaner way of doing this, without reaching into a private implementation package for unsupported functions, and perhaps interacting with CL:*DEFAULT-PATHNAME-DEFAULTS* the way that the ANSI spec suggests too." (sblisp-source-directory-regexp, sblisp-local-source-directory): removed because unsupported by SBCL. (patches contributed by William Harold Newman ). 2000-10-08 Martin Atzmueller * ilisp-hnd.el (ilisp-handler): fix call to ilisp-output-buffer. 2000-10-07 Martin Atzmueller * ilisp-sbcl.el (sblisp): new ilisp-error-regexp. * ilisp-snd.el (ilisp-check-package-advanced): Due to the 'in-package behavior (see below) check for errors, and fix them. If the package is not found, the fallback-package will be used. Display status after a search for package. * ilisp-cl.el (common-lisp): ignoring errors in ilisp-package-command _does_ not help any ANSI-CL! It is basically redundant. This is because of the complicated behavior of 'in-package (see Hyperspec). 'in-package is implemented as a macro in ANSI-CL, and might expand into a '(eval-when (...) something, and the error will be thrown, nevertheless of any 'ignore-error handler! Modified 'ignore-error -form, because there were some strange things happening testing it in CLISP and SBCL. 2000-10-03 Paolo Amoroso * ilisp-snd.el (lisp-buffer-package-internal): Doesn't try to find unfinished (in-package ) forms when there's nothing to search in. This fixes a bug that broke everything that uses lisp-buffer-package, e.g. set-buffer-package-lisp and evaluation commands (patch contributed by Hannu Koivisto ). 2000-10-01 Paolo Amoroso * ilisp-cl.el: o (common-lisp): o ilisp-package-command now ignores errors. o Default value for new ilisp-no-package-in-core-regexp variable. o Ditto for ilisp-fallback-package. (patches contributed by Hannu Koivisto ) * ilisp-def.el: o (ilisp-no-package-in-core-regexp): New local variable. o (ilisp-fallback-package): Ditto. (patches contributed by Hannu Koivisto ) * ilisp-snd.el: o (ilisp-check-package-advanced): If specified for the current dialect, ilisp-no-package-in-core-regexp is used to check if ilisp-package-command perhaps failed in a way which indicates that the package is not in core. If this is the case, fallback package is returned alongside a new second return value that indicates if the package was not found in core. o (lisp-buffer-package-internal): The new second return value of ilisp-check-package-advanced is now considered and it's possibly propagated to the should-not-cache-p second return value of this function. o (ilisp-buffer-package-internal): o Dummy argument removed. o Now returns both a package and a flag suggesting whether it's ok to cache the package or not. o Doesn't break with unfinished (in-package ) forms; in such a case the second return value indicates that the returned package should not be cached. o Cosmetic if -> when fix. o (lisp-buffer-package): o Removed (message "") with no known useful purpose. o Merged the cond clause of lisp-dont-cache-package being true and the default clause. o Now considers the flag returned by lisp-buffer-package-internal as its second value. (patches contributed by Hannu Koivisto ) * ilisp-hi.el: o (ilisp-arglist-message-lisp-space): Now proceeds even if the initial lisp-buffer-packge call doesn't cache the buffer package to buffer-package. o (default-directory-lisp): default-direcotory -> default-directory o (load-file-lisp): o if -> when and if+not -> unless cosmetic fixes. o For .system files, no compilation or loading of possibly existing . is attempted. (patches contributed by Hannu Koivisto ) 2000-09-13 Atzmueller * sblisp.lisp (ilisp-compile): special case is not necessary anymore. removed * cl-ilisp.lisp (ilisp-compile): cleanup. 2000-09-11 Atzmueller * ilisp-dia.el (setup-ilisp): use ilisp-*enable-ilisp-special-frame-p*. If T, push ilisp-buffer on 'special-display-buffer-names. * ilisp-def.el (ilisp-*enable-ilisp-special-frame-p*): new variable, put ilisp-buffer-name in special-display-buffer-names, if set to T. 2000-09-10 Martin Atzmueller * ilisp-out.el: partly incorporated M. Koeppes patch. (see 'special-display-buffer-names). Kept `ilisp-*arglist-message-switch-back-p*'; if we don't put the ilisp-buffer in 'special-display-buffer-names then this is still necessary. Might add new variable ilisp-*ilisp-buffer-display-special*. * ilisp-snd.el (lisp-string-to-symbol): symbol-completion in source buffers was broken due to 'ilisp-package-seperator-regex as a local variable. fixed. * Makefile (compile): add '--force' option when linking 'hyperspec.el'. * ilisp-out.el: (ilisp-make-output-frame) incorporated patch by Will Deakin as of August 03. 2000-09-09 Martin Atzmueller * ilisp-hi: (ilisp-arglist-message-lisp-space) handle the special case #\". * ilisp-sbcl: (sblisp-program) invoke sbcl with --noinform, to prevent printing of startup-message. 2000-08-18 Paolo Amoroso * ChangeLog (2000-08-17, ilisp-imenu.el): fixed wrong attribution of the patch to `imenu--completion-buffer' from Matthias Koeppe to Colin Walters . * ilisp-imenu.el: file unchanged; the commit log of the patch to `imenu--completion-buffer' on 2000-08-17 (ilisp-imenu.el 1.2) incorrectly attributed it to Matthias Koeppe. It was instead contributed by Colin Walters . 2000-08-17 Paolo Amoroso * lispworks.lisp (ilisp-source-files): fixed `edit-definitions-lisp' failure when using logical pathnames (patch contributed by Alain Picard ). * Makefile (FaslFiles, clean): added Lisp fasl files removal. * ilisp.emacs: removed obsolete reference to TMC completion package FTP download (it is included with recent versions of Emacs). * ilisp-imenu.el (imenu--completion-buffer): fixed incorrect reference to `string-equal' (patch contributed by Colin Walters ). 2000-08-02 Paolo Amoroso * ACKNOWLEDGMENTS: updated and sorted alphabetically the list of names. * docs/ilisp.texi (Acknowledgements): added William Deakin and Matthias Koeppe. * README: added version number and reference to a group of maintainers. * GETTING-ILISP: replaced unnecessary reference to explicit version numbers in file names--e.g. 5.9--with generic ones--i.e. x.y.z. * extra/README: removed references to version number and date; added hint to check INSTALLATION; fixed capitalization of HyperSpec and added reference to Xanalys. 2000-07-31 Paolo Amoroso * INSTALLATION: added information on the reference card and setting LN and HyperSpec in Makefile. * docs/ilisp.texi (Configuration and compilation): added information on setting LN and HyperSpec in Makefile. * Makefile: added commands to link, compile and remove the HyperSpec access package. Now compilation creates `extra/hyperspec.el' as a link/copy of the appropriate package. * extra/hyperspec.el: removed to let the makefile create a link/copy to the appropriate HyperSpec package during compilation. 2000-07-27 Paolo Amoroso * Welcome: updated list of maintainers. 2000-07-24 Paolo Amoroso * Makefile (DocFiles): added `docs/ilisp-refcard.tex'. * docs/ilisp.texi (Configuration and compilation): updated for the reference card. * docs/README: updated for ilisp-refcard.tex and fixed a couple of typos. * docs/Makefile: added support for ilisp-refcard.tex compilation. * docs/ilisp-refcard.tex: initial revision. * docs/ilisp-refcard.tgz: removed for keeping only ilisp-refcard.tex. 2000-07-19 Paolo Amoroso * docs/ilisp.texi (Files of ILISP): clarified entry for *.lisp and added *.scm entry. Updated version info of the document. * Makefile (clean): added TAGS among the files to remove. * ilisp-snd.el (lisp-string-to-symbol): test `ilisp-package-separator-regexp' (patch contributed by Matthias Koeppe ). * ilisp-sch.el (guile): improved error handling for Guile (patch contributed by Matthias Koeppe ). * ilisp-def.el (ilisp-package-separator-regexp): turned into a local variable (patch contributed by Matthias Koeppe ). * ilisp-cl.el (common-lisp): added `ilisp-package-separator-regexp' (patch contributed by Matthias Koeppe ). 2000-07-13 Paolo Amoroso * docs/ilisp.texi (Files of ILISP): uncommented ilisp-cmp.el entry. * ilisp-out.el (ilisp-write-string-to-buffer (ilisp-output-sink string)): ensure that the buffer associated to `ilisp-output-sink' exists. The old code only worked for the standard display functions due to their side effects (patch contributed by Matthias Koeppe ). 2000-07-12 Paolo Amoroso * ilisp-cmp.el (complete-lisp): fixed bug with both XEmacs and GNU Emacs, i.e. doing completion with M-TAB on an empty command line produced the error "Wrong type argument: number-char-or-marker-p,nil" (XEmacs), or "Wrong type argument: number-or-marker-p, nil" with GNU Emacs (patch contributed by William Deakin ). 2000-07-06 Paolo Amoroso * .ilisp: removed obsolete version of ilisp.emacs. 2000-07-03 Paolo Amoroso * .ILISP.prcs-aux, ILISP.prj: removed PRCS auxiliary files no longer needed with CVS. 2000-06-30 Paolo Amoroso * ilisp-sch.el (guile): fixed malformed `ilisp-package-separator-regexp' assignment (Paolo: pay more attention when committing a change). 2000-06-30 Paolo Amoroso * INSTALLATION (LispWorks): added info on saving an image without the GUI and making the system work with ILISP under Windows and Linux (contributed by Martin Simmons ). 2000-06-29 Paolo Amoroso * ilisp-sch.el (guile): sets `ilisp-package-separator-regexp' so that it never matches (patch contributed by Matthias Koeppe ). * ilisp-snd.el (lisp-string-to-symbol): uses `ilisp-package-separator-regexp' instead of its hardcoded value in order to work with Guile, and possibly other Schemes (patch contributed by Matthias Koeppe ). * ilisp-def.el (ilisp-package-separator-regexp): added (patch contributed by Matthias Koeppe ). Matthias suggested `deflocal', I changed it to `defvar' as a temporary workaround because of a bug. After making each dialect set it to the appropriate value, the declaration can be changed to `deflocal'. 2000-06-27 Paolo Amoroso * guile-ilisp.scm: support functions for Guile, which also work with Guile 1.4 (new file contributed by Matthias Koeppe ). * ilisp-sch.el (guile): improved Guile support (patch contributed by Matthias Koeppe ). 2000-05-07 Martin Atzmueller * sblisp.lisp (source-file): fixed a typo. * ilisp-out.el (ilisp-bury-output): incorporated patch by Tim Moore in #'ilisp-bury-output: if the output-window was *active* it could not be deleted. * ilisp-cmp.el (ilisp-complete): if the package of a symbol to be completed was not known an error was _not_ propagated in the right place. fixed. * lispworks.lisp: integrated patch by Martin Simmons. UNTESTED. I can't install Lispworks Personal, b/c of failed Deps! * ilfsf19.el: integrated patch by Martin Simmons for Emacs 19.x. UNTESTED b/c I don't have Emacs19. * Makefile: removed 'custom-ilisp.elc' when building a loadfile. * ilisp.el: removed load entry for 'custom-ilisp'. * ilisp-mak.el: removed load/compile entry for 'custom-ilisp'. This screwed up when using ilisp-*use-fsf-compliant-keybindings*. 2000-05-03 Paolo Amoroso * docs/ilisp.texi: Replaced occurrences of `Harlequin' with `Xanalys/Harlequin'. "Configuration and compilation": Fixed a typo. 2000-04-29 Paolo Amoroso * INSTALLATION: Added tips for making ILISP work with LispWorks (contributed by Martin Simmons ). 2000-04-26 Paolo Amoroso * docs/ilisp.texi (Files of ILISP): Uncommented completer.el; added custom-ilisp.el; fixed Common Lisp spelling in the ilisp-cl.el entry; removed imenu.el. * docs/ilisp.texi: Added entry for the dir file (suggestion by Matthias Hoelzl ). 2000-04-21 Paolo Amoroso * docs/doc-changes.txt: Restored information lost in the move to SourceForge. Added warning stating that the file will no longer be maintained. * docs/ilisp.texi: Restored changes made in Jan-Feb 2000 and lost in the move to SourceForge (see docs/doc-changes.txt). Renamed to the ILISP-*VARNAME* convention some variable names missed in the transition to ILISP 5.10.1. Fixed the appearance of control characters and command names in section "Switching between interactive and raw keyboard modes". * INSTALLATION: Restored information lost in the move to SourceForge (replaced unnecessary references to explicit version numbers in file names--e.g. 5.9.4--with generic ones--i.e. x.y.z). Renamed variable names to the ILISP-*VARNAME* convention. 2000-04-19 Marco Antoniotti * docs/ilisp.texi (Acknowledgements): Added Karl Fogel. * ilisp-mak.el (top level): added load/compile entry for 'custom-ilisp'. * ilisp.el (load): added loading of 'custom-ilisp'. 2000-03-26 Marco Antoniotti * ilisp-dia.el (setup-ilisp): Changed value of 'ilisp-symbol-delimiter'. * ilisp-def.el (ilisp-bindings-*bind-right-bracket-p*): Added variable to control binding of ']' to 'close-all-lisp'. Modified all the places where the above binding is set. I.e. 'ilisp-key.el' and 'ilisp-ext.el'. * extra/hyperspec.el (common-lisp-hyperspec-root): updated default link to new 'http://www.xanalys.com/software_tools/reference/HyperSpec/' * ilcompat.el (+ilisp-emacs-version-id+): Minimum hack to take into account version 21 of Xemacs. Of course the real thing would be to actually upgrade the whole 'compatibility' file support. 2000-02-03 Karl Fogel * doc/ilisp.texi (Keybindings): new node, document the FSF-compliant keybinding situation. (Miscellany): removed mention of ] for `close-all-lisp' (see change to `lisp-bindings' in ilisp-key.el, below). * ilisp-def.el: (ilisp-prefix): Set to C-c if above new defcustom is non-nil, else set to C-z if above is nil or unbound. (ilisp-use-fsf-compliant-keybindings): New defcustom. (ilisp-use-fsf-compliant-keybindings): * ilisp-key.el: (ilisp-safe-define-key): New func, binds a key to a command in keymap, using new optional arg FSF-KEY if `ilisp-use-fsf-compliant-keybindings' is non-nil. (ilisp-define-ilisp-key-for-map): Replaces `ilisp-defkey'. Use ilisp-safe-define-key, passing new optional argument to it. Changed name partly because this function does something new now, and partly to avoid confusion with `defkey-ilisp', which has an entirely different purpose. All callers changed. (lisp-bindings): Use above new functions where appropriate. Pass `no-fsf-key' where no worthwhile binding is possible under the FSF-approved keyspace. Don't bind ] to `close-all-lisp' (see comment in source). (defkey-ilisp): take new optional FSF-KEY arg, similarly to `ilisp-define-ilisp-key-for-map' (see above). * ild.el: pass `no-fsf-key' arg to all keybinding calls here. ilisp-5.12.0+cvs.2004.12.26/GETTING-ILISP0000600000175000001440000000060407277332355015473 0ustar mvelausersFTP and WWW directions ====================== You can get the distribution file, `ilisp-x.y.z.tar.gz' (`ilisp-x.y.z.zip'), via HTTP or anonymous FTP at the following addresses: http://sourceforge.net/project/showfiles.php?group_id=3957 Please report any problems to the ilisp-help mailing list (see the README file for more info on the ILISP lists). Enjoy, The ILISP Maintainers ilisp-5.12.0+cvs.2004.12.26/HISTORY0000600000175000001440000006676007530511435014662 0ustar mvelausers# -*- Mode: Text -*- ILISP HISTORY =============================================================================== Version: 5.12. Even Newer Version. Please refer to the ChangeLog entries to see what relevant changes have happened. These changes include some help for Window users and other stuff involving so many cool changes that I'm going to give up now ;) =============================================================================== Version: 5.11. New Version. Please refer to the ChangeLog entries to see what relevant changes have happened. There are way too many changes. =============================================================================== Version: 5.10.1. ILISP is on SOURCEFORGE! Fixes and enhancements since 5.9.4. Many. -- More CLish conventions for naming variables. Note that 'ilisp-prefix' is now 'ilisp-*prefix*' . Check your ilisp initializations in your .emacs or wherever you keep them. -- Better FSF compliance (see variable 'ilisp-*use-fsf-compliant-keybindings*') -- changed vars in ilisp-def: ilisp-*prefix* ilisp-*use-fsf-compliant-keybindings* ilisp-*use-frame-for-output* ilisp-*prefix-match* ilisp-*version* ilisp-*arglist-message-lisp-space-p* ilisp-*use-frame-for-arglist-output-p* ilisp-*enable-imenu-p* ilisp-*enable-cl-easy-menu-p* ilisp-*enable-scheme-easy-menu-p* ilisp-*enable-ild-support-p* ilisp-*use-hyperspec-interface-p* ilisp-*use-fi-clman-interface-p* ilisp-*directory* -- *.el: replaced vars. -- In ilisp-key: new custom: ilisp-bindings-*bind-space-p*: if t bind #\SPACE to #'ilisp-arglist-message-lisp-space -- Changed vars in ilisp-out: changed all sink's to ilisp-output-sink's ilisp-*icon-file* ilisp-*last-ilisp-output-sink* -- doc/ilisp.texi: replaced found vars of above with their replacements. -- doc/ilisp.texi: documented the frame-p stuff, arglist-p stuff, imenu-p stuff. -- doc/ilisp.texi: documented imenu.el, ilisp-imenu.el. -- ilisp-out.el & ilisp-chs.el: in ilisp-display-output-default: now printing of error messages in the lisp-listener should work!! at least it works for clisp, as I found out. -- ilisp-def: new variable ilisp-*arglist-message-switch-back-p* -- ilisp-hi: in lisp-send-region: fixed a bug; we had multiple outputs despite the fact that we should not have had that (eq switch 'result) => no display. -- sblisp.lisp: changed #'arglist; code is a adapted version of #'arglist in cmulisp.lisp. did not work for (arglist 'make-array) for example. -- cl-ilisp: reformatting of last ) ) [oops! :)] bugfix: special-operator-p replaced by special-form-p in #'ilisp-print-info-message. added support for ECL (ECLS). =============================================================================== Version: 5.9.4. Fixes and enhancements since 5.9.3. -- Cleaned up CLisp support (a leftover glitch from a previous 'merge'). -- Corrected a few typos here and there, especially in the INSTALLATION file. -- the CL functions ILISP-DESCRIBE and ILISP-INSPECT try now to be a little smarter regarding symbols. The generic behavior implemented in 'cl-ilisp.lisp' should be ok for many CL implementations (it works beautifully with CMUCL), but it may need some tuning for other ones. =============================================================================== Version 5.9.3 Fixes and enhancements since 5.9.1. -- Better treatment of CLisp. -- The #\Space (?Space) key is now bound to the ILISP-ARGLIST-MESSAGE-LISP-SPACE function. In an ILISP buffer it will give you the arglist associated with a function you are about to type in. The main bug list of 5.9.1 is still in place. =============================================================================== Version 5.9.2 Fixes and enhancements since 5.9.1. 5.9.2 is mainly a bug fix releases with some simple bugs fixed. The main bug list of 5.9.1 is still in place. =============================================================================== Version 5.9.1 Fixes and enhancements since 5.9 -- Documentation fixed. -- Wrong symlink in 'extra' directory fixed. -- Hopefully fixed most problems with 'ilisp-*-binary-extension's. Not perfect, but it should work now thanks to Hannu Koivisto. See file 'ilisp-cl.el'. -- README.CL-HS file removed from distribution. -- ild.mail file removed from distribution. -- Slightly changed 'Welcome' file. -- Many buglets fixed. Known Bugs -- When using different implementations within the same session of (X)Emacs, it may happen that the by switching from one to the other in sequence, some settings are not cleared correctly. This bug has been reported by Hannu Koivisto using CLisp and CMUCL. -- Multiprocessing handling is not up to par to Franz ELI interface when using Allegro. Similar problems may appear in Harlequin Lispworks and Liquid and in the experimental versions of CMUCL floating around. =============================================================================== Version 5.9 The major change in this release concerns the new Home for ILISP at CONS.ORG. Fixes and enhancements since 5.8 alpha -- Changed behavior of package definitions in buffers thanks to Martin Atzmueller. Now (DEFPACKAGE "ZUT" ...) (IN-PACKAGE "ZUT") works as expected/desired. -- New Menus (thanks to Martin Atzmueller). -- Major Change for toplevel dialect: it is now called 'common-lisp' (it used to be 'clisp'). Note however, that for the time being, the name of the CLISP dialect remains 'clisp-hs'. -- Many bug fixes to CLISP dialect. -- The 'hyperspec' package and new 'ilisp-easy-menus' are distributed with ILISP. They are not loaded by default. -- Fixed loading of compatibility files for Emacs 20.xx. -- Fixed compilation and loading of 'ilisp-chs'. -- Fixed missing EXCL::FN_SYMDEF in ACL 5.0 (Larry Hunter) -- ILD Debugger interface by J. M. Siskind has been integrated in the dialect definitions. Please report any problems you may have with it. -- Changed default binding for 'clisp-hs-program' form "clisp" to "clisp -I" to account for buffer flushing behavior of this implementation. -- Added several Scheme dialects (thanks to Christian Lynbech). =============================================================================== Version 5.8 alpha Fixes and enhancements since 5.7 -- XLISP and XLISPSTAT support has been added on an experimental way. Please give us feedback on their behavior. -- There is now a way to disable the DEFPACKAGE feature for GCL. But it is not turned on. You have to fix it manually by transforming two '#+(and nil gcl)' into '#+(and t gcl)' -- A few fixes were made to realign ILISP to XEmacs 19.14 -- The file 'clisp.lisp' has been renamed to 'cl-ilisp.lisp', in order to avoid confusion with the CLISP implementation of Common Lisp. -- The file ILISP.prj (if present) can be safely ignored unless you want to use the PRCS project control system (http://xcf.berkeley.edu/~jmacd/prcs.html) -- Changed 'comint-ipc' and 'bridge'. They now use 'process-send-string' instead of defining specialized versions of it. (This was done because it appears that the newer versions of 'comint' have a 'process-send-string' that does what these specialized versions used to do.) -- Added constant '+ilisp-emacs-minor-version-number+' (in 'ilcompat'). -- Conditionalized loading of 'bridge.el' (in 'ilisp'). -- Fixed the annoying ECL/GCL glitch in 'ilisp-kcl' and the error regexps for KCL and IBCL in the same file -- Patched 'comint-ipc' according to suggestion by Kazuhiro Fujieda. -- Patched 'ilisp-out' according to suggestion by Kazuhiro Fujieda. Known Bugs -- Allegro multiprocessing output handling is still broken. This is a though one and the maintaners cannot fix it. ------------------------------------------------------------------------------- Version 5.7 Fixes and enhancements since 5.6: -- ILISP now unpacks in a directory called ./ilisp-. -- Fixed various simple bugs in the init files (hooks et similia). Check 'ilisp.el' and 'ilisp.emacs' for details. -- Support for different Emacs versions has been broken down in various version specific files. See: ilcompat.el (new name for compatibility file) ilfsf19.el ilfsf18.el illuc19.el = ilxemacs.el -- ILISP is now compiled with version 19 bytecodes when appropriate. (This should work at least for FSF 19.xx). -- Added a primitive menubar entry. -- Included the bug fixes for source file tracking. -- The Makefile now contains a new target called 'loadfile', which generates a file called 'ilisp-all.elc'. This speeds up ILISP sturtup. -- Popping to the inferior lisp buffer is now done in a more intelligent way in FSF-19 (i.e. if a frame with the appropriate window is available, then that frame is raised instead of recreating a window in the current one). -- The ILD uniform Lisp debugger by J. Siskind has been added to the distribution (file 'ild.mail'). ILD is not integrated yet with ILISP, but it is important enough that people should experiment with it. -- The texinfo file has been fixed. -- New dialects have been added: GCL, ECL, Harlequin Lispworks, CLISP. -- The special-form-p/special-operator-p mess should be fixed (at least in CMUCL). -- Cleaned up support for Lucid, Allegro and CMULISP. -- The file 'scheme2c.mail' contains a trick to make Scheme->C to work with ILISP. -- The file 'ilisp-s2c.el' contains a first cut definition of the Scheme->C dialect. Note that this file is neither byte compiled nor loaded. Known bugs: -- Keymap handling is still rather inflexible. Either you like the setup or you don't. (A patch by Kimball Collins was not inserted in the code because we feel there should be a more thorough cleanup). -- AKCL and GCL may cause an error in the sturtup procedure of ILISP. We (the maintainers) have been unable to track down this one since we have not access to an AKCL or GCL environment. Please help us. -- Source level tracking for interpreted code in CMUCL may still break down unexpectedly. This is due to the inner working of CMUCL and there is no easy fix. We try to fall back on the TAG machinery. -- The menu entry does not track correctly the status of the inferior lisp. I.e. there is no code yet that disables the menu items when the inferior Lisp is not running anymore. -- Package tracking is still somewhat flaky. -- Multiprocessing Lisps may still cause problems with prompts. This has been noticed especially with Allegro CL. -- The "send the source even if compiled file file exist" bug is still in place. =============================================================================== Mon, 11 Jul 94 10:48:24 EDT Version 5.6 Released -- Works once again with GNU emacs 19.25, lemacs 19.10. and emacs 18.58. -- The popper facility has been completely replaced by a much less intrusive facility which has most of the original functionality. All ilisp output is funneled through the function which is the value of the variable ilisp-display-output-function. Several sample display functions are provided. Do c-H m in an ilisp buffer for more info. -- The common lisp arglist printer has been prettified somewhat. -- Ilisp no longer tries to handle lisp errors by default. This is controlled by the varible ilisp-handle-errors. -- Many of the hairy regexps used to located definitions have been broken out into separate variables. One is ilisp-cl-source-locater-patterns, which is an alist of (function-type regexp) -- Compile-defun, eval-defun and friends display the returned lisp value. -- Defined variables for the init files for the built-in dialects, to ease customization (ilisp-clisp-init-file, etc). -- Some handy new functions: ilisp-lispm-bindings, repair-ilisp. -- A minor bugfix in ilisp-send. -- A simplified makefile. =============================================================================== Fixes in 5.5: -- Now works with lemacs 19.8 (to be released soon) in addition to all the other versions of emacs around. =============================================================================== Fixes in 5.4: -- Added support for CMUCL 17b. -- Fixed definition regexp in ilisp-locate-ilisp. Thanks to Paul Krause. -- Hacked popper to make output lines of one line or less get displayed in the message buffer, depending on the variable popper-use-message-buffer. =============================================================================== Fixes in 5.3: -- Fixes some problems in clisp.lisp -- Makefile-ilisp now valid for Sun's distributed `make'. -- Did the right thing regarding autoloads (yes you have to define them in your .emacs, and make them autoload "ilisp".) See ilisp.emacs -- Put the run-hooks calls at the end of ilisp.el where they should be. "Fixes" in version 5.2 of ILISP. Cause more problems with autoloads and fixes a missing definition in the Makefile-ilisp in 5.1 "Fixes" in version 5.1: It removes some correct information concerning autoloads in ilisp.texi and ilisp.emacs that was released in 5.0 ====================================================================== Sat Jun 26 14:22:01 1993 Version 5.0 Released Changes: The major changes from 4.12: --Now works with emacs-18, fsf emacs-19, and Lucid emacs-19. --Major file splitting done in an attempt to modularize ILISP. --Added LISP-DONT-CACHE-PACKAGE lets users tell ILISP to search for the most recent IN-PACKAGE on each eval/compile in a lisp buffer. --Added 'message feature for lisp-no-popper, allows output from ILISP to be sent to the message window (instead of via the popper or the inferior lisp buffer) if it is one line long. Useful for small arg-lists, etc. Now the default. --Made the popper be off by default. To have the popper on, set popper-pop-buffers and popper-buffers-to-skip to t in a popper-load-hook. See the sample in popper.el FEATURES: +Support for multiple LISP dialects including Lucid, Allegro, KCL, AKCL, IBCL and CMU on multiple machines even at the same time. +Dynamically sized pop-up windows that can be buried and scrolled from any window. +Packages are properly handled including the distinction between exported and internal symbols. +Synchronous, asynchronous or batch eval and compile of files, regions, definitions and sexps with optional switching and automatic calling. +Arglist, documentation, describe, and macroexpand. +Completion of filename components and LISP symbols including partial matches. +Find source both with and without help from the inferior LISP. Including CLOS methods, multiple definitions and multiple files. Also works for automatically generated functions like defstruct. +Edit the callers of a function with and without help from the inferior LISP. +Trace/untrace a function. +Esc-q works properly on paragraphs in comments, strings and code. +Find unbalanced parentheses. +Super brackets. +Handles editing, entering and indenting full LISP expressions. +Next/previous and similar history mechanism compatible with comint. +Handles LISP errors. +Result histories are maintained in the inferior LISP. +Does not create spurious symbols and handles case issues. +Raw keyboard mode allows interaction with interactive programs through Emacs. +Online manuals for ILISP. ====================================================================== 92/03/17 Version 4.12 released Changes: Fixed an intermittent send bug. Made it so that popper is not required so aggressively. Ignore symbolics font information of source. Made lisp-end-defun-text so that it would work in non-lisp modes. Set the package for ilisp-arglist. Made error dispatch case insensitive. Fixed lisp-directory to add files when lisp-edit-files is t. Fixed clisp.lisp compile for lucid. Made comint-interrupt-subjob interactive. Updated popper to run with emacs 19. Fixed popper-wraps so that shell-command gets wrapped at load time and changed it to be a function. Added newline at end of bug messages. Updated the cmulisp interface file to run with the lastest CMU CL release. Made sure that *standard-output* and *error-output* are bound to *terminal-io*. Fixed completer so that last completion was accurate in the case of interruptions. Added a path cache to completer. Fixed completer so that Meta-return completes to best guess and so that the full pattern is used for disambiguation. Fixed + history so that it is saved/restored. Fixed popper so that popping up a window when in a popper window resuses the same window and if the buffer is changed within a temp-buffer-show form, it works properly. Fixed lisp-defun-end so that it no longer includes to the end of the line. Made it so that initialization through commands did not try to synchronize with the inferior LISP. Fixed edit-definitions-lisp so that it would work if there is no inferior lisp. Fixed popper-wrap so that it included numeric documentation strings. Made it so that popper preserves the buffer point and scrolling backwards wraps around. Incoroporated the latest version of completion. Added documentation on global-map bindings. Added ilisp-load-no-compile-query. Added ilisp-use-map so that keymaps can be switched in dialect definitions. Added completer-any-delimiter to completer. Fixed bug in completer that caused relative file names to get erased. Fixed popper so that it handled killed buffers, popped faster and had negative buffer lists. Fixed it so that dialect-program doesn't get stomped by loading ilisp. Made it so that ilisp-bug doesn't stomp on someone's unfinished message. Look for both .elc and .el files for setting ilisp-directory. Fixed a bug in lucid that prevented compilation of the interface files on some implementations. Fixed epoch-pop so that it quits nicer. Fixed bug in CMU LISP interface. Added *features* to ilisp-bug. Fixed bugs in completer when extending directories and for Apollo and AFS. Fixed popper so that it does not remove the trailing newline. Made lisp-buffer smart about killed buffers. ====================================================================== 91/05/08 Version 4.11 released Changes: Improved the way that completer handled filenames ending with a / and relative pathnames. Added popper-wrap to popper for functions that don't use with-output-to-temp-buffer. Added popper-empty-min and popper-min-heights. Made popper-pop-buffers and popper-buffers-to-skip default to t. Fixed lisp-prefix-p so that reusing completion tables works better. Fixed a bug in lisp-end-defun-text that made things weird when people did not use ;;; for top comment blocks. Improved ilisp-bug so that it gives more information and is less likely to break. Put interface files in their own package. Changed ilisp-compile to funcall of compile for all except lucid. Fixed a bug in lisp-pop-to-buffer that put the lisp in the popper buffer. Fixed a bug in ilisp-matching-symbols that prevented pattern matching with a pattern that matched the last word. Bare CR's now send an empty string. Made it so that allegro init binary extensions default to excl:*fasl-default-type* unless on a known platform. Added fboundp to generic-function-p in ilisp-arglist. Fixed KCL and friends dialects. Fixed a couple of small bugs in completer. Added raw keyboard mode. Fixed lisp-pop-to-buffer so that the buffer was always selected which fixed a bug in edit-definitions and friends. Removed space from KCL comint-prompt-regexp. Added inspect-lisp. Fixed a bug in popper-show that complained if buffer was a string and fixed call in who-calls-lisp. Fixed some bugs in completer that completed too much for local returns and that nuked the string if confirmation was required. ====================================================================== 91/03/19 Version 4.10 released Changes: Changed the default binding of close-and-send-lisp. Added better dialect support for kcl, akcl, and ibcl. Improved the run-time detection of PCL/CLOS in clisp.lisp. Fixed a nasty popper bug if you tried to pop up a window when in a popper window. Made it so that popper-other-window would switch to the popper window when called with a C-u prefix. Added support for allegro 4.0. Made lisp-in-string smarter about escaped " so that close-all-lisp worked better. Renamed reparse-attribute-list and made it so that you can specify manual packages. Improved partial completion of symbols so that it goes to the ambiguous part. Changed it so that uncompiled interface files complain rather than compile. Improved completer so that it completes pathname components. Made it so that dialects could be started up with emacs switches. Incorporated a new fancier version of reposition-window-lisp. Fixed restore so that it no longer printed messages when there were multiple line values restored. Added trace-function-lisp. Improved lisp-function-name when it is in a string. Changed initialization so that there is a dialect specific program variable and the defaults are better and sticky. lucid-check-prompt was hosed which of course broke everything in Lucid. Fixed load-file-lisp so that it allows interaction and senses compile errors better. Added process bridges. Added comint-always-scroll. Made allegro macroexpand so that it would walk instead. Fixed popper so that switching to the popper buffer worked. Fixed close-all-lisp so that it did not blow away # or ' at start of sexp. Fixed ilisp-buffer so that it complained if the buffer was killed out from under it. Changed ilisp-filter-regexp to filter all lone keywords. Added prefix arg to documentation-lisp so that function call doc could be gotten. Set ilisp-directory in initialization so that it could be built into Emacs image. Added Franz online common lisp manual. Added reset-ilisp to reset to top-level and made it so that delete-char would pop one level at the end. Added call-defun-lisp and bound it to C-z y. Fixed the binding for popper-grow-output. Added lisp-no-popper to stop using popper. Fixed compile-defun-lisp so that it would compile the previous form in the inferior LISP. Made it so that the entire in-package sexp is sent to the inferior so that nicknames get set. Added package-lisp and set-package-lisp. Removed eval-prev-sexp-lisp and made eval-next-sexp-lisp do that with a negative prefix. Fixed lisp-defun-name so that it returned just the function name. Added lisp-region-name to better name regions. Improved messages in interrupt-subjob-lisp. Added sit-for to all accept-process-output loops to prevent locking up Emacs in Sys V. Changed how comment-region-lisp treated the end of the region and fixed a nasty bug for a region including the eob. Made changes to clisp.lisp for lucid and kcl. Added better kcl dialect definition. Made it so that end-of-defun-lisp would require ;;; at the left margin to decide that the next definition had started. Made it so that multiple sexps could be typed to the top-level. Made it so that all popper windows could be skipped. Simplified the ilisp-package-regexp. ====================================================================== 90/12/30 Version 4.00 released IMPROVEMENTS: Process stuff has been rewritten and much improved. If you prefer the old eval/compile behavior, set lisp-wait-p to t in your ilisp-load-hook. Improved edit-definitions and edit-callers so that they support multiple definitions of any LISP object even if the inferior LISP does not store the information. Added support for Epoch. Separated out lisp-mode extensions, symlink fix, source stuff and batch eval/compile. Lots of minor improvements, see details below. INCOMPATIBLE CHANGES: Renamed interactive functions to put package specification at the end so that names were quicker to specify and some internal functions so that they were unique to ilisp. ilisp-clisp now takes the full file name. ilisp-load-or-send-command now takes the binary and source paths explicitly. The ilisp- prefix was removed from dialect file names. ilisp-definition-regexp has gone away. ilisp-prompt, ilisp-fix-error and ilisp-continue have gone away in favor of the actual comint- variables. ilisp-expand-symlinks has gone away. DETAILS: Finally fixed up how many newlines are inserted. Made it so that the source file stuff would use a resident buffer with the same name if available. Added ilisp-filter-length to the input filter. When reading a symbol, the inferior lisp is no longer queried with an empty string. newline-and-indent-ilisp will send a string w/o a new line if called at the end of a buffer. This was so that raw character i/o could be done in some lisps. All comint and comint-ipc variables can now be set in hooks and the right thing will happen. Made lisp-end-defun-text skip over leading comments. Added the functions search-in-lisp-files and replace-in-lisp-files. Prevented the addition of duplicate entries to the input ring and expanded its size to 200 entries. Made lisp-def-name so that it adds the name of the defining form and returns an empty string at the end of a buffer. Swapped bindings of macroexpand-lisp and macroexpand-1-lisp. Fixed expand-file-name bug if // was at the start of a filename. Fixed obscure bug in make-local-variable. Added ilisp-other-prompt and bol-ilisp. Added case-fold-search to appropriate places. Fixed error recovery in ilisp-completer. Removed extra parentheses in the string for ilisp-init-binary-command. Added documentation on scrolling the popper window backwards. Fixed comment-region so that it handles empty lines and deleting spaces at the start. Fixed behavior of reindent-lisp on comments at the start and end of a buffer. Saved the point in reposition-window-lisp. Rewrote close-all-lisp so that it inserted a bracket if in a string and was better behaved WRT non sexp brackets and so that it could close all brackets. Removed breaks in lisp-end-defun-text for unclosed strings. Added comint-check-prompt to comint-ipc so that dialects can be smarter about errors. Added ilisp-check-prompt and allegro and lucid definitions. Changed edit-callers so that it uses the name of the current defun as its default. Changed popper so that it handles more windows, removes trailing lines, is nicer about bindings and added popper-grow-output. Also added epoch-pop for epoch. Made lisp-input-start work if the point was at the start of the line the prompt was on. This made reindent-lisp and close-all-lisp work in ilisp mode. Added close-and-send-lisp. Made it so that bindings are only done after the hooks are run. Shorter clisp error messages. Removed ilisp-definition-regexp and replaced it with ilisp-locator. Made message optional in ilisp-send and ilisp-send-string. Added a startup message to ilisp buffers. Made it so that there is filename completion when prompting for lisp program. Fixed bug in ilisp-load-init. Made it so that if an eval/compile worked normally, no message was displayed. Fixed lucid ilisp-list-callers so that it does not recurse forever. Changed lisp-list-callers to who-calls-lisp and made it so that it would display the buffer. Added ilisp-dialect as a list of dialect names for the inferior LISP. Added partial minibuffer completion. Improved filename completion help in complete-lisp. Added ilisp-bug for bug reporting. Improved case handling for clisp. popper v2.00, completer v2.00. ====================================================================== 10/12/90 Version 3.0 released. Improved pop-up windows, symbol completion, package handling, compilation and initialization. Changed default binding prefix. Added trace/untrace and evaluation of defvars. ====================================================================== 8/22/90 Version 2.0 released. Fixed bugs and changed initialization. ====================================================================== 6/11/90 Version 1.0 released. ilisp-5.12.0+cvs.2004.12.26/INSTALLATION0000600000175000001440000003221010020674034015372 0ustar mvelausers-*- Mode: Text -*- WELCOME TO ILISP. FIRST INSTALLATION STEP: UNPACKING AND COMPILING. Copy the ILISP distribution archive, e.g. ilisp-x.y.z.tar.gz, to the location where you would like to install it. Next extract the archive (you may need root privileges to perform these operations): % gzip -dc ilisp-x.y.z.tar.gz | tar xf - or: % unzip ilisp-x.y.z.zip Some configuration needs to be done before compiling the Emacs Lisp files that comprise ILISP. Start with the Makefile file, in the section after the comment Various variables (you can safely ignore the variables for configuring packaging and distribution, which are intended for maintainers). First, set the EMACS variable to be the pathname of the Emacs you will be using ILISP with. This is the Emacs that will be used to compile ILISP with. Be sure to set `LN' to the name of your operating system's command for creating symbolic filesystem links, ESPECIALLY IF YOU ARE A WINDOWS USER. If your Emacs supports the `easymenu' package, it is possible to make ILISP add to Lisp mode buffers and buffers with inferior Lisp processes, or to Scheme mode buffers and buffers with inferior Scheme processes, an Ilisp menu with all available commands. To enable this feature, set to T the variable ILISP-*ENABLE-CL-EASY-MENU-P* in `ilisp-def.el' for the Common Lisp dialects, and ILISP-*ENABLE-SCHEME-EASY-MENU-P* for Scheme dialects. Setting these variables also causes the default Lisp menu to be removed before displaying the Ilisp one. See the next section for additional configuration options and known problems for specific Lisp dialects. Run `make' or `make compile' to build ILISP from source. Ignore any compilation warnings unless they result in ILISP not compiling completely. To activate ILISP you should add appropriate Emacs Lisp forms to your `.emacs' or to the system-wide `default.el' file, depending on who will be using ILISP. These forms take care of starting it whenever you access a Lisp file or run an inferior Lisp process. You can copy relevant portions of the sample file `ilisp.emacs', which also shows how to customize some ILISP features. You should add the directory where all of the ILISP Emacs Lisp files reside to your load-path. There is an example of this in `ilisp.emacs'. As an alternative you could set up a `.ilisp' which contains the appropriate portions of `ilisp.emacs', in order to avoid cluttering too much `.emacs' or `default.el'. The first time a dialect is started, the interface files will complain about not being compiled, just ignore the message. Once a Lisp dialect is started up, you should execute the command ilisp-compile-inits which will compile the `*.lisp' files and write them to the same directory as the ilisp files. The binary files should have a unique extension for each different combination of architecture and Lisp dialect. You will need to change ILISP-INIT-BINARY-EXTENSION and ILISP-INIT-BINARY-COMMAND to get additional extensions. The binary for each different architecture should be different. If you want to build the interface files into a Lisp world, you will also need to set ILISP-LOAD-INITS to NIL in the same place that you change ILISP-PROGRAM to load the Lisp world. There is an ILISP-SITE-HOOK for initializing site specific stuff like program locations when ILISP is first loaded. You may want to define appropriate autoloads in your system Emacs start up file. Example site init: ;;; CMU site (setq ilisp-site-hook '(lambda () (setq ilisp-motd "CMU ILISP V%s") (setq expand-symlinks-rfs-exists t) (setq allegro-program "/usr/local/acl5/lisp") (setq lucid-program "/usr/misc/.lucid/bin/lisp"))) Kent Pitman and Xanalys Inc. have made publicly available on the Web the Common Lisp HyperSpec, an HTML version of the full text of the ANSI Common Lisp specification. Daniel Barlow, Stephen Carney and Erik Naggum independently developed Emacs Lisp packages for looking up Lisp symbols in the HyperSpec and displaying the relevant sections with a Web browser. ILISP includes all of them in the `extra' directory of the distribution tree. By default ILISP uses Naggum's package. If you want to use one of the others, see the comments at the beginning of the corresponding files. The `ilisp.emacs' file provides sample instructions for making Naggum's package access a local copy of the HyperSpec. Since the package relies on the `browse-url' Emacs package, make sure that the latter is properly configured. Digital Press has made publicly available online, as a service to the Lisp community, the full text of the book ``Common Lisp, The Language'' (by Guy L. Steele Jr., 2nd edition, Digital Press, 1990, ISBN 1-55558-041-6; a.k.a. ``CLtL2'') in a number of formats, including HTML. ILISP provides support, contributed by Utz-Uwe Haus, for looking up Lisp symbols in the HTML version of the book and displaying the relevant sections with a Web browser. See the file `extra/cltl2.el' for more information on configuring this feature. The `ilisp.emacs' file provides sample instructions for making ILISP's CLtL2 support access a local copy of the book. What has been said above about `browse-url' configuration also applies to CLtL2 lookup. Note that, althouth Steele's book is a well written and useful resource, it covers the Common Lisp language in the state it was a few years before ANSI standardization. If you need an accurate description of ANSI Common Lisp, see the above mentioned HyperSpec instead. Previous versions of ILISP provided commands for accessing the online Common Lisp documentation shipped with Franz Inc.'s Allegro CL product (`fi:clman' module). The public availability of the HyperSpec, and the inclusion since version 5.9 of ILISP of the `hyperspec' packages, make access to the Franz documentation no longer necessary. So by default ILISP does not load the `fi:clman' module, but if you still want to use its commands set the ILISP-*USE-FI-CLMAN-INTERFACE-P* to T in `ilisp-def.el'. The ILISP documentation consists of a user manual and a reference card (the latter may not be up to date). Both of them are in the `docs' directory of the distribution tree. The generation of GNU Info, DVI, PostScript and HTML versions of the documentation from the Texinfo and TeX source is controlled by the `Makefile' in the `docs' directory. Run `make docs' or `make' to generate all of the formats. If you are interested in only some of them then issue the appropriate command: `make info' for GNU Info, `make dvi' for DVI, `make ps' for PostScript and `make html' for HTML. To remove the intermediate files produced during the generation of DVI output you can run `make tmpclean'. Note that some of the output formats may not be supported for certain documents. The ILISP reference card is available as a TeX source file. Check the comments at the beginning of the file if you need to generate a version with a different number of columns (the default is 3). SECOND INSTALLATION STEP: DIALECT REQUIREMENTS. ILISP assumes a minimum of CLtL2 compliance. This requirements immediately clashes with the problems of some KCL-derivativs, including GCL. Here is a list of known problems for several CL implementations (we do not know whether there are problems with Scheme's - please let us know). o All Common Lisp dialects Be sure that the variables: ilisp-binary-extension ilisp-init-binary-extension ilisp-binary-command Have the appropriate value. Older versions of ILISP (< 5.8) assumed a single CL installation and suggested a change to the hook 'ilisp-site-hook' in the 'ilisp.emacs' file. This should not be so anymore. o KCL, AKCL, Ibuki, GCL, and ECL Be sure to get the latest CVS version of ECL. - DEFPACKAGE You need to have your system configured with a DEFPACKAGE. You can either generate an image which contains it or you can arrange the init file to load it for you. You can find a DEFPACKAGE in the AI.Repository of CMU. If you do not want - for mysterious reasons - DEFPACKAGE in your GCL, you can manually edit the files 'ilisp-pkg.lisp' and 'cl-ilisp.lisp' at the DEFPACKAGE and EXPORT forms. - LOOP Most likely the DEFPACKAGE will require a full fledged LOOP. The same instructions apply. o CMUCL If you are interested in maintaining CMU CL or compiling it from source try to set the variables: cmulisp-source-directory-regexp cmulisp-local-source-directory to sensible values, e.g. set 'cmulisp-local-source-directory' to "target:". Refer to CMUCL documentation for an explanation of this setting. o Xanalys LispWorks (formerly Harlequin LispWorks) On Windows and Linux, the LispWorks executable should be resaved without the GUI. In addition, on Windows it MUST be resaved as a console application to ensure correct interaction with Emacs shell buffers. Create a script (let's call it `console.lisp') including the following: (load-all-patches) (save-image "lw42-console" :console t :environment nil) (quit) and run it using: /lispworks-4200 -init /console.lisp When the `lw42-console' image has been created, it can be used as the value of the `lispworks-program' variable in ILISP. If you are using LispWorks 4.1 with Emacs 20.4 or higher on Windows, then ensure you're at patch level 4.1.20. This patch bundle includes patches (LSC #7270, LSC #7727 and LSC #7291) that make it work with ILISP. For more information check the README file which comes with the bundle. LispWorks users who wish to use the CAPI (LispWorks GUI toolkit) via ILISP can create a suitable image with this script (call it 'console-capi.lisp'): (in-package "CL-USER") (load-all-patches) (compile (defun my-restart () #+Unix (capi:ensure-motif-libraries) (mp:initialize-multiprocessing))) (save-image "lw-ilisp-capi" :restart-function 'my-restart :environment nil #+Win32 :console #+Win32 t) (quit) This is because the CAPI requires multiprocessing, and on some Unix platforms the GUI libraries that CAPI uses are normally loaded on startup of the IDE, which we're bypassing with :environment nil for ILISP. o Lucid No known extra installation glitches o Allegro No known extra installation glitches o CLISP (The list below was provided by Valentino Kyriakides) The following lists some unusual ILISP behaviour related to CLISP. Some of these are of general interest, and should hopefully be fixed in an upcomming ILISP distribution. Most of these points were reported by Bruno Haible. - On startup, ILISP presents a Lisp prompt and shortly afterwards another Lisp prompt. This is somehow confusing. - While prompted, a user can backspace over the prompt, or can move the cursor down to inexistent lines, thus making the buffer look bad. - The history mode is unfortunately circular, which means that after M-p M-n you don't get back your original empty line. Also, a two- character input like "()" doesn't appear in the history. - CLISP does not know that once it received a form for evaluation the cursor is in column 0. Therefore (format t "~&") will output a blank line. This results in too many blank lines. - The default completion character for clisp (Tab) does not work. Instead there are two different completion characters, with two other keybindings. - The Lisp code invisibly loaded into clisp is interpreted. Since it is not user-visible, it could as well be compiled, for speed. - In a CLISP debugger loop typing "abort" often throws you into the next deeper debugging level, instead of leaving the actual one. So you often have to retype "abort" x-times to get it work. - When the ILISP/CLISP interaction hangs (blocks), you have to type C-g to abort your last command, in order get the minibuffer work again. After this you have to do a "M-x panic-lisp" to reassign the ILISP/CLISP interaction. Scheme->C - To get Scheme->C to work under ILISP it may be necessary to create a custom executable with the following C foreign function: #include void nobuff(){setbuf(stdout, (char*)0);} (define-c-external (nobuff) void "nobuff") (nobuff) TIPS o Microsoft Windows You may check the document "Setting up an IDE with Emacs on Windows", by Bill Clementson, which is part of the Common Lisp Cookbook Project: http://cl-cookbook.sourceforge.net/windows.html It is a tutorial on setting up ILISP with CLISP, Corman Lisp and LispWorks under Windows. o Enlightment window manager under Gnome If ILISP popup windows unexpectedly keep the input focus, in the Enlightment Configuration Editor choose the "Beahvior" item and toggle off all the "[...] get keyboard focus" items. ilisp-5.12.0+cvs.2004.12.26/Makefile0000600000175000001440000000776410020674034015226 0ustar mvelausers# -*- Mode: Makefile -*- # Makefile -- # # This file is part of ILISP. # Please refer to the file COPYING for copyrights and licensing # information. # Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list # of present and past contributors. # # $Id: Makefile,v 1.23 2003/12/13 23:43:44 rgrjr Exp $ # Note: this makefile assumes GNU make #============================================================================== # Various Variables Version = 5.12.0 # Use whichever you like most #EMACS = xemacs #EMACS = /usr/local/bin/emacs EMACS = emacs # If your operating system does not support file links (e.g. Windows), # change this to an ordinary copy command LN = ln -s # The SHELL variable is used only for making the distribution. SHELL = /bin/csh # The 'rm' command used (we redefine it mostly because it may be # aliased RM = /bin/rm -f # These are used mostly for packaging the distribution Ilisp_src_dir = $(shell pwd) Ilisp_tar_dir = ilisp-$(Version) OtherFiles = README \ HISTORY \ Makefile \ ilisp.emacs \ icompile.bat \ INSTALLATION \ COPYING \ GETTING-ILISP \ Welcome \ ChangeLog \ ACKNOWLEDGMENTS # maybe add custom-ilisp.elc to LoadFiles later. LoadFiles = ilisp-def.elc ilisp-sym.elc \ ilisp-inp.elc ilisp-ind.elc ilisp-prc.elc ilisp-val.elc ilisp-out.elc \ ilisp-mov.elc ilisp-key.elc ilisp-prn.elc ilisp-low.elc ilisp-doc.elc \ ilisp-ext.elc ilisp-mod.elc ilisp-dia.elc ilisp-cmt.elc ilisp-rng.elc \ ilisp-hnd.elc ilisp-utl.elc ilisp-cmp.elc ilisp-kil.elc ilisp-snd.elc \ ilisp-xfr.elc ilisp-hi.elc ilisp-aut.elc \ ilisp-cl.elc ilisp-cmu.elc ilisp-sbcl.elc ilisp-cl-easy-menu.elc\ ilisp-acl.elc ilisp-kcl.elc ilisp-luc.elc ilisp-sch.elc ilisp-hlw.elc \ ilisp-xls.elc ilisp-chs.elc ilisp-openmcl.elc ilisp-ccl.elc DocFiles = docs/Makefile \ docs/README \ docs/doc-changes.txt \ docs/ilisp-refcard.tex \ docs/ilisp.texi FaslFiles = *.fasl *.fas *.lib *.x86f *.sparcf *.pfsl #============================================================================== # Rules compile: $(EMACS) -batch -l ilisp-mak.el tags: etags *.el docs: FORCE cd docs; $(MAKE) clean: -$(RM) *.elc *~ extra/*.elc extra/*~ TAGS \ $(FaslFiles) (cd docs; $(MAKE) clean) loadfile: @echo 'The "loadfile" target is no longer supported.' @exit 1 compress: gzip *.el $(OtherFiles) FORCE: #============================================================================== # The following targets are used only to create a distribution file. dist: tarring dist_compressing tarring: @echo "ILISP dist: preparing tar file." @echo " source directory: " $(Ilisp_src_dir) @echo " tar directory: " $(Ilisp_tar_dir) (cd $(Ilisp_src_dir)/..; \ if ( $(notdir $(Ilisp_src_dir)) != $(Ilisp_tar_dir) ) \ ln -s $(notdir $(Ilisp_src_dir)) $(Ilisp_tar_dir) ; \ tar cvf $(Ilisp_tar_dir).tar \ $(patsubst %,$(Ilisp_tar_dir)/%,$(OtherFiles)) \ $(Ilisp_tar_dir)/*.el \ $(Ilisp_tar_dir)/*.lisp \ $(Ilisp_tar_dir)/*.scm \ $(patsubst %,$(Ilisp_tar_dir)/%,$(DocFiles)) \ $(Ilisp_tar_dir)/extra/README \ $(Ilisp_tar_dir)/extra/hyperspec.el \ $(Ilisp_tar_dir)/extra/cltl2.el \ $(Ilisp_tar_dir)/pictures/ilisp-icon.* \ ) dist_compressing: (cd $(Ilisp_src_dir)/.. ; gzip $(Ilisp_tar_dir).tar) uuencoding: ../$(Ilisp_tar_dir).tar.gz (cd $(Ilisp_src_dir)/.. ; \ uuencode $(Ilisp_tar_dir).tar.gz $(Ilisp_tar_dir).tar.gz > il.uue) # end of file -- Makefile -- ilisp-5.12.0+cvs.2004.12.26/README0000600000175000001440000000372107474750755014463 0ustar mvelausersILISP 5.12.0 ============ ILISP is a powerful GNU Emacs interface to many dialects of Lisp, including Lucid, Allegro, Xanalys/Harlequin LispWorks, GCL, KCL, AKCL, ECL, IBCL, and CMUCL. Also some Scheme implementations are supported as well as a preliminary version of Xlisp/XlispStat. Written by Chris McConnell and now maintained by a group of programmers led by Marco Antoniotti . Please refer to the following files in this directory: HISTORY : A detailed summary of changes over the course of ILISP's existence. GETTING-ILISP : Directions for obtaining this collection using anonymous FTP. INSTALLATION : Directions about how to install ILISP and specific dialect needs. General information on ILISP is available at: http://ilisp.cons.org The project site, which provides access to the CVS source tree, bug database, mailing lists and other resources, is hosted at SourceForge: http://sourceforge.net/projects/ilisp/ The following mailing lists are available: ilisp-announce : Subscribe to this list if you want to receive public announcements regarding ILISP. ilisp-devel : This is the list for people who want to be actively involved in the development of ILISP. ilisp-help : This is the list for asking usage questions regarding ILISP. ilisp-cvs : Subscribe to this list *only* if you want to monitor the CVS repository activity. You can subscribe to the lists and access the archives via the general information pages: http://lists.sourceforge.net/mailman/listinfo/ilisp-announce http://lists.sourceforge.net/mailman/listinfo/ilisp-devel http://lists.sourceforge.net/mailman/listinfo/ilisp-help http://lists.sourceforge.net/mailman/listinfo/ilisp-cvs You may send bug reports, questions, suggestions, etc. to ilisp-help or ilisp-devel. Enjoy, The ILISP Maintainers ilisp-5.12.0+cvs.2004.12.26/Welcome0000600000175000001440000000306407226166235015106 0ustar mvelausersWelcome to ILISP. ILISP is a GNU Emacs package for controlling an inferior process running a Lisp dialect. You can get ILISP at: http://ilisp.cons.org The project site, which provides access to the CVS source tree, bug database, mailing lists and other resources, is hosted at SourceForge: http://sourceforge.net/projects/ilisp/ ILISP is currently being maintained by Paolo Amoroso , Marco Antoniotti , Martin Atzmueller , Craig Brozefsky , William Deakin and Matthias Koeppe . The following mailing lists are available: ilisp-announce : Subscribe to this list if you want to receive public announcements regarding ILISP. ilisp-devel : This is the list for people who want to be actively involved in the development of ILISP. ilisp-help : This is the list for asking usage questions regarding ILISP. ilisp-cvs : Subscribe to this list *only* if you want to monitor the CVS repository activity. You can subscribe to the lists and access the archives via the general information pages: http://lists.sourceforge.net/mailman/listinfo/ilisp-announce http://lists.sourceforge.net/mailman/listinfo/ilisp-devel http://lists.sourceforge.net/mailman/listinfo/ilisp-help http://lists.sourceforge.net/mailman/listinfo/ilisp-cvs You may send bug reports, questions, suggestions, etc. to ilisp-help or ilisp-devel. Enjoy, The ILISP Maintainers ilisp-5.12.0+cvs.2004.12.26/allegro.lisp0000600000175000001440000000366407662217515016116 0ustar mvelausers;;; -*- Mode: Lisp -*- ;;; allegro.lisp -- ;;; ILISP Franz ACL dialect support definitions. ;;; ;;; This file is part of ILISP. ;;; Please refer to the file COPYING for copyrights and licensing ;;; information. ;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list ;;; of present and past contributors. ;;; ;;; $Id: allegro.lisp,v 1.7 2003/05/19 18:15:41 kevinrosenberg Exp $ ;;; Allegro initializations ;;; Author: Chris McConnell, ccm@cs.cmu.edu (in-package :ilisp) ;; Larry Hunter's fix #+(and allegro-version>= (version>= 5)) (eval-when (compile load) (require :llstructs)) ;;; (defun ilisp-callers (symbol package) "Print a list of all of the functions that call FUNCTION. Returns T if successful." (ilisp-errors (let ((function (ilisp-find-symbol symbol package)) (callers nil) (*print-level* nil) (*print-length* nil) (*package* (find-package 'lisp))) (when (and function (fboundp function)) (labels ((in-expression (function expression) (cond ((null expression) nil) ((listp expression) (let ((header (first expression))) (if (or (eq header function) (and (eq header 'function) (eq (second expression) function))) t (dolist (subexp expression) (when (in-expression function subexp) (return t))))))))) (excl::who-references function #'(lambda (function) (push (excl::fn_symdef function) callers))) (do-all-symbols (symbol) (when (and (fboundp symbol) (not (compiled-function-p (symbol-function symbol))) (in-expression function (symbol-function symbol))) (push symbol callers))) (dolist (caller callers) (print caller)) t))))) ;;;=========================================================================== ;;; Epilogue (eval-when (load eval) (unless (compiled-function-p #'ilisp-callers) (ilisp-message t "File is not compiled, use M-x ilisp-compile-inits"))) ;;; end of file -- allegro.lisp -- ilisp-5.12.0+cvs.2004.12.26/bridge.el0000600000175000001440000003744507556227534015366 0ustar mvelausers;;; -*-Emacs-Lisp-*- ;;;%Header ;;; Bridge process filter, V1.0 ;;; Copyright (C) 1991 Chris McConnell, ccm@cs.cmu.edu ;;; ;;; Send mail to ilisp@cons.org if you have problems. ;;; ;;; Send mail to majordomo@cons.org if you want to be on the ;;; ilisp mailing list. ;;; This file is part of GNU Emacs. ;;; GNU Emacs is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY. No author or distributor ;;; accepts responsibility to anyone for the consequences of using it ;;; or for whether it serves any particular purpose or works at all, ;;; unless he says so in writing. Refer to the GNU Emacs General Public ;;; License for full details. ;;; Everyone is granted permission to copy, modify and redistribute ;;; GNU Emacs, but only under the conditions described in the ;;; GNU Emacs General Public License. A copy of this license is ;;; supposed to have been given to you along with GNU Emacs so you ;;; can know your rights and responsibilities. It should be in a ;;; file named COPYING. Among other things, the copyright notice ;;; and this notice must be preserved on all copies. ;;; Send any bugs or comments. Thanks to Todd Kaufmann for rewriting ;;; the process filter for continuous handlers. ;;; USAGE: M-x install-bridge will add a process output filter to the ;;; current buffer. Any output that the process does between ;;; bridge-start-regexp and bridge-end-regexp will be bundled up and ;;; passed to the first handler on bridge-handlers that matches the ;;; output using string-match. If bridge-prompt-regexp shows up ;;; before bridge-end-regexp, the bridge will be cancelled. If no ;;; handler matches the output, the first symbol in the output is ;;; assumed to be a buffer name and the rest of the output will be ;;; sent to that buffer's process. This can be used to communicate ;;; between processes or to set up two way interactions between Emacs ;;; and an inferior process. ;;; You can write handlers that process the output in special ways. ;;; See bridge-send-handler for the default handler. The command ;;; hand-bridge is useful for testing. Keep in mind that all ;;; variables are buffer local. ;;; YOUR .EMACS FILE: ;;; ;;; ;;; Set up load path to include bridge ;;; (setq load-path (cons "/bridge-directory/" load-path)) ;;; (autoload 'install-bridge "bridge" "Install a process bridge." t) ;;; (setq bridge-hook ;;; '(lambda () ;;; ;; Example options ;;; (setq bridge-source-insert nil) ;Don't insert in source buffer ;;; (setq bridge-destination-insert nil) ;Don't insert in dest buffer ;;; ;; Handle copy-it messages yourself ;;; (setq bridge-handlers ;;; '(("copy-it" . my-copy-handler))))) ;;; EXAMPLE: ;;; # This pipes stdin to the named buffer in a Unix shell ;;; alias devgnu '(echo -n "\!* "; cat -; echo -n "")' ;;; ;;; ls | devgnu *scratch* ;;;%Parameters (defvar bridge-hook nil "Hook called when a bridge is installed by install-hook.") (defvar bridge-start-regexp "" "*Regular expression to match the start of a process bridge in process output. It should be followed by a buffer name, the data to be sent and a bridge-end-regexp.") (defvar bridge-end-regexp "" "*Regular expression to match the end of a process bridge in process output.") (defvar bridge-prompt-regexp nil "*Regular expression for detecting a prompt. If there is a comint-prompt-regexp, it will be initialized to that. A prompt before a bridge-end-regexp will stop the process bridge.") (defvar bridge-handlers nil "Alist of (regexp . handler) for handling process output delimited by bridge-start-regexp and bridge-end-regexp. The first entry on the list whose regexp matches the output will be called on the process and the delimited output.") (defvar bridge-source-insert t "*T to insert bridge input in the source buffer minus delimiters.") (defvar bridge-destination-insert t "*T for bridge-send-handler to insert bridge input into the destination buffer minus delimiters.") (defvar bridge-chunk-size 512 "*Long inputs send to comint processes are broken up into chunks of this size. If your process is choking on big inputs, try lowering the value.") ;;;%Internal variables (defvar bridge-old-filter nil "Old filter for a bridged process buffer.") (defvar bridge-string nil "The current output in the process bridge.") (defvar bridge-in-progress nil "The current handler function, if any, that bridge passes strings on to, or nil if none.") (defvar bridge-send-to-buffer nil "The buffer that the default bridge-handler (bridge-send-handler) is currently sending to, or nil if it hasn't started yet. Your handler function can use this variable also.") (defvar bridge-last-failure () "Last thing that broke the bridge handler. First item is function call (eval'able); last item is error condition which resulted. This is provided to help handler-writers in their debugging.") ;;;%Utilities (defun bridge-insert (output) "Insert process OUTPUT into the current buffer." (if output (let* ((buffer (current-buffer)) (process (get-buffer-process buffer)) (mark (process-mark process)) (window (selected-window)) (at-end nil)) (if (eq (window-buffer window) buffer) (setq at-end (= (point) mark)) (setq window (get-buffer-window buffer))) (save-excursion (goto-char mark) (insert output) (set-marker mark (point))) (if window (progn (if at-end (goto-char mark)) (if (not (pos-visible-in-window-p (point) window)) (let ((original (selected-window))) (save-excursion (select-window window) (recenter '(center)) (select-window original))))))))) ;;; ;(defun bridge-send-string (process string) ; "Send PROCESS the contents of STRING as input. ;This is equivalent to process-send-string, except that long input strings ;are broken up into chunks of size comint-input-chunk-size. Processes ;are given a chance to output between chunks. This can help prevent processes ;from hanging when you send them long inputs on some OS's." ; (let* ((len (length string)) ; (i (min len bridge-chunk-size))) ; (process-send-string process (substring string 0 i)) ; (while (< i len) ; (let ((next-i (+ i bridge-chunk-size))) ; (accept-process-output) ; (process-send-string process (substring string i (min len next-i))) ; (setq i next-i))))) ;;; (defun bridge-call-handler (handler proc string) "Funcall HANDLER on PROC, STRING carefully. Error is caught if happens, and user is signaled. State is put in bridge-last-failure. Returns t if handler executed without error." (let ((inhibit-quit nil) (failed nil)) (condition-case err (funcall handler proc string) (error (ding) (setq failed t) (message "bridge-handler \"%s\" failed %s (see bridge-last-failure)" handler err) (setq bridge-last-failure (` ((funcall '(, handler) '(, proc) (, string)) "Caused: " (, err)))))) (not failed))) ;;;%Handlers (defun bridge-send-handler (process input) "Send PROCESS INPUT to the buffer name found at the start of the input. The input after the buffer name is sent to the buffer's process if it has one. If bridge-destination-insert is T, the input will be inserted into the buffer. If it does not have a process, it will be inserted at the end of the buffer." (if (null input) (setq bridge-send-to-buffer nil) ; end of bridge (let (buffer-and-start buffer-name dest to) ;; if this is first time, get the buffer out of the first line (cond ((not bridge-send-to-buffer) (setq buffer-and-start (read-from-string input) buffer-name (format "%s" (car (read-from-string input))) dest (get-buffer buffer-name) to (get-buffer-process dest) input (substring input (cdr buffer-and-start))) (setq bridge-send-to-buffer dest)) (t (setq buffer-name bridge-send-to-buffer dest (get-buffer buffer-name) to (get-buffer-process dest) ))) (if dest (let ((buffer (current-buffer))) (if bridge-destination-insert (unwind-protect (progn (set-buffer dest) (if to (bridge-insert input) (goto-char (point-max)) (insert input))) (set-buffer buffer))) (if to ;; (bridge-send-string to input) (process-send-string to input) )) (error "%s is not a buffer" buffer-name))))) ;;;%Filter (defun bridge-filter (process output) "Given PROCESS and some OUTPUT, check for the presence of bridge-start-regexp. Everything prior to this will be passed to the normal filter function or inserted in the buffer if it is nil. The output up to bridge-end-regexp will be sent to the first handler on bridge-handlers that matches the string. If no handlers match, the input will be sent to bridge-send-handler. If bridge-prompt-regexp is encountered before the bridge-end-regexp, the bridge will be cancelled." (let ((inhibit-quit t) (match-data (match-data)) (buffer (current-buffer)) (process-buffer (process-buffer process)) (case-fold-search t) (start 0) (end 0) function b-start b-start-end b-end) (set-buffer process-buffer) ;; access locals (setq function bridge-in-progress) ;; How it works: ;; ;; start, end delimit the part of string we are interested in; ;; initially both 0; after an iteration we move them to next string. ;; b-start, b-end delimit part of string to bridge (possibly whole string); ;; this will be string between corresponding regexps. ;; There are two main cases when we come into loop: ;; bridge in progress ;;0 setq b-start = start ;;1 setq b-end (or end-pattern end) ;;4 process string ;;5 remove handler if end found ;; no bridge in progress ;;0 setq b-start if see start-pattern ;;1 setq b-end if bstart to (or end-pattern end) ;;2 send (substring start b-start) to normal place ;;3 find handler (in b-start, b-end) if not set ;;4 process string ;;5 remove handler if end found ;; equivalent sections have the same numbers here; ;; we fold them together in this code. (unwind-protect (while (< end (length output)) ;;0 setq b-start if find (setq b-start (cond (bridge-in-progress (setq b-start-end start) start) ((string-match bridge-start-regexp output start) (setq b-start-end (match-end 0)) (match-beginning 0)) (t nil))) ;;1 setq b-end (setq b-end (if b-start (let ((end-seen (string-match bridge-end-regexp output b-start-end))) (if end-seen (setq end (match-end 0))) end-seen))) (if (not b-end) (setq end (length output) b-end (length output))) ;;1.5 - if see prompt before end, remove current (if b-start (let ((prompt (string-match bridge-prompt-regexp output b-start-end))) (if (and prompt (<= (match-end 0) b-end)) (setq b-start nil ; b-start-end start b-end start end (match-end 0) bridge-in-progress nil )))) ;;2 send (substring start b-start) to old filter, if any (if (/= start (or b-start end)) ; don't bother on empty string (let ((pass-on (substring output start (or b-start end)))) (if bridge-old-filter (let ((old bridge-old-filter)) (store-match-data match-data) (funcall old process pass-on) ;; if filter changed, re-install ourselves (let ((new (process-filter process))) (if (not (eq new 'bridge-filter)) (progn (setq bridge-old-filter new) (set-process-filter process 'bridge-filter))))) (set-buffer process-buffer) (bridge-insert pass-on)))) ;;3 find handler (in b-start, b-end) if none current (if (and b-start (not bridge-in-progress)) (let ((handlers bridge-handlers)) (while (and handlers (not function)) (let* ((handler (car handlers)) (m (string-match (car handler) output b-start-end))) (if (and m (< m b-end)) (setq function (cdr handler)) (setq handlers (cdr handlers))))) ;; Set default handler if none (if (null function) (setq function 'bridge-send-handler)) (setq bridge-in-progress function))) ;;4 process string (if function (let ((ok t)) (if (/= b-start-end b-end) (let ((send (substring output b-start-end b-end))) ;; also, insert the stuff in buffer between ;; iff bridge-source-insert. (if bridge-source-insert (bridge-insert send)) ;; call handler on string (setq ok (bridge-call-handler function process send)))) ;;5 remove handler if end found ;; if function removed then tell it that's all (if (or (not ok) (/= b-end end));; saw end before end-of-string (progn (bridge-call-handler function process nil) ;; have to remove function too for next time around (setq function nil bridge-in-progress nil) )) )) ;; continue looping, in case there's more string (setq start end) )) ;; protected forms: restore buffer, match-data (set-buffer buffer) (store-match-data match-data) )) ;;;%Interface (defun install-bridge () "Set up a process bridge in the current buffer." (interactive) (if (not (get-buffer-process (current-buffer))) (error "%s does not have a process" (buffer-name (current-buffer))) (make-local-variable 'bridge-start-regexp) (make-local-variable 'bridge-end-regexp) (make-local-variable 'bridge-prompt-regexp) (make-local-variable 'bridge-handlers) (make-local-variable 'bridge-source-insert) (make-local-variable 'bridge-destination-insert) (make-local-variable 'bridge-chunk-size) (make-local-variable 'bridge-old-filter) (make-local-variable 'bridge-string) (make-local-variable 'bridge-in-progress) (make-local-variable 'bridge-send-to-buffer) (setq bridge-string nil bridge-in-progress nil bridge-send-to-buffer nil) (if (boundp 'comint-prompt-regexp) (setq bridge-prompt-regexp comint-prompt-regexp)) (let ((process (get-buffer-process (current-buffer)))) (if process (if (not (eq (process-filter process) 'bridge-filter)) (progn (setq bridge-old-filter (process-filter process)) (set-process-filter process 'bridge-filter))) (error "%s does not have a process" (buffer-name (current-buffer))))) (run-hooks 'bridge-hook) (message "Process bridge is installed"))) ;;; (defun reset-bridge () "Must be called from the process's buffer. Removes any active bridge." (interactive) ;; for when things get wedged (if bridge-in-progress (unwind-protect (funcall bridge-in-progress (get-buffer-process (current-buffer)) nil) (setq bridge-in-progress nil)) (message "No bridge in progress."))) ;;; (defun remove-bridge () "Remove bridge from the current buffer." (interactive) (let ((process (get-buffer-process (current-buffer)))) (if (or (not process) (not (eq (process-filter process) 'bridge-filter))) (error "%s has no bridge" (buffer-name (current-buffer))) ;; remove any bridge-in-progress (reset-bridge) (set-process-filter process bridge-old-filter) (funcall bridge-old-filter process bridge-string) (message "Process bridge is removed.")))) ;;;% Utility for testing (defun hand-bridge (start end) "With point at bridge-start, sends bridge-start + string + bridge-end to bridge-filter. With prefix, use current region to send." (interactive "r") (let ((p0 (if current-prefix-arg (min start end) (if (looking-at bridge-start-regexp) (point) (error "Not looking at bridge-start-regexp")))) (p1 (if current-prefix-arg (max start end) (if (re-search-forward bridge-end-regexp nil t) (point) (error "Didn't see bridge-end-regexp"))))) (bridge-filter (get-buffer-process (current-buffer)) (buffer-substring-no-properties p0 p1)) )) (provide 'bridge) ilisp-5.12.0+cvs.2004.12.26/cl-chs-init.lisp0000600000175000001440000000404007657054675016602 0ustar mvelausers;;; -*- Mode: Lisp -*- ;;; cl-chs-init.lisp -- ;;; Init file for CLisp H.S. ;;; ;;; This file is part of ILISP. ;;; Please refer to the file COPYING for copyrights and licensing ;;; information. ;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list ;;; of present and past contributors. ;;; ;;; $Id: cl-chs-init.lisp,v 1.4 2003/05/09 23:29:59 bill_clementson Exp $ ;;; Old history logs. ;;; ;;; 19990912 Marco Antoniotti ;;; Cleaned up for inclusion in 5.9.1. See also file 'cl-ilisp.lisp' ;;; for related changes (e.g. in ILISP-ERRORS). ;;; ;;; 1999-09-03; M. Atzmueller ;;; removed obsolete stuff ;;; ;;; 1999-06-15: M. Atzmueller ;;; removed command to load inspect1.fas ;;; load any INSPECTOR yourself if there is no other inspect! ;;; ;;; 1999-05-31: M. Atzmueller ;;; ilisp-arglist => #+clisp arglist (...) modified definition ;;; another option might be sys::arglist ... ;;; added command to preload inspect1 (in-package :ilisp) ;;; (defun ilisp-inspect (sexp package) "Inspect SEXP in PACKAGE." (when (not (ignore-errors (functionp #'inspect))) (cerror "~% Try loading it yourself, or proceed without inspecting ... :-( !" "~% There seems to be no INSPECTOR present!")) (ilisp-errors (let ((*package* (ilisp-find-package package))) (if (functionp #'inspect) (let ((item-to-be-described (read-from-string sexp))) (if (atom item-to-be-described) (inspect item-to-be-described) (inspect (eval item-to-be-described)))) (format t "Sorry -- can't inspect ~S as Clisp has no inspector!" sexp))))) (defun arglist (sym) (when (fboundp sym) (let* ((s (with-output-to-string (s) (describe (symbol-function sym) s))) (p (search "Argument list: " s))) (if p (read-from-string (subseq s (+ 15 (search "Argument list: " s)))) '(???))))) ;;; Epilogue (eval-when (:execute :load-toplevel) (when (not (compiled-function-p #'ilisp-inspect)) (ilisp-message t "File is not compiled, use M-x ilisp-compile-inits")) (sys::debug-unwind)) ;;; end of file -- cl-chs-init.lsp -- ilisp-5.12.0+cvs.2004.12.26/cl-ilisp.lisp0000600000175000001440000006257610140476614016204 0ustar mvelausers;;; -*- Mode: Lisp -*- ;;; cl-ilisp.lisp -- ;;; Common Lisp initializations ;;; Author: Chris McConnell, ccm@cs.cmu.edu ;;; ;;; This file is part of ILISP. ;;; Please refer to the file COPYING for copyrights and licensing ;;; information. ;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list ;;; of present and past contributors. ;;; ;;; $Id: cl-ilisp.lisp,v 1.22 2004/08/11 19:12:46 kevinrosenberg Exp $ ;;; Old history log. ;;; ;;; ange-ftp hack added by ivan Wed Mar 10 12:30:15 1993 ;;; ilisp-errors *gc-verbose* addition ivan Tue Mar 16 03:21:51 1993 ;;; ;;; Rcs_Info: clisp.lisp,v 1.26 1993/09/03 02:05:07 ivan Rel $ ;;; ;;; Revision 1.19 1993/08/24 22:01:52 ivan ;;; Use defpackage instead of just IN-PACKAGE. ;;; Renamed FUNCTION to FUN in ilisp-arglist to get around CMUCL 17b bug. ;;; ;;; Revision 1.16 1993/06/29 05:51:35 ivan ;;; Added Ed Gamble's #'readtable-case fix and Hans Chalupsky's ;;; allegro-4.1 addition. ;;; ;;; Revision 1.8 1993/06/28 00:57:42 ivan ;;; Stopped using 'COMPILED-FUNCTION-P for compiled check. ;;; ;;; Revision 1.3 1993/03/16 23:22:10 ivan ;;; Added breakp arg to ilisp-trace. ;;; ;;; (in-package :ilisp) ;;; ;;; GCL 2.2 and GCL 2.3 do not have defpackage (yet) so we need to put ;;; the export here. (toy@rtp.ericsson.se) ;;; ;;; Please note that while the comment and the fix posted by R. Toy ;;; are correct, they are deprecated by at least one of the ILISP ;;; maintainers. :) By removing the 'nil' in the following #+, you ;;; will fix the problem. However you are advised to install ;;; DEFPACKAGE in your GCL and to write the GCL maintainers and to ask ;;; them to incorporate DEFPACKAGE in their standard builds if this is ;;; not so yet. ;;; 19960715 Marco Antoniotti ;;; 20010831 Marco Antoniotti #+(or (and gcl)) (export '(ilisp-errors ilisp-save ilisp-restore ilisp-symbol-name ilisp-find-symbol ilisp-find-package ilisp-eval ilisp-compile ilisp-describe ilisp-inspect ilisp-arglist ilisp-documentation ilisp-macroexpand ilisp-macroexpand-1 ilisp-trace ilisp-untrace ilisp-compile-file ilisp-casify ilisp-print-info-message ilisp-matching-symbols)) ;;; (defvar *ilisp-old-result* nil "Used for save/restore of top level values.") (defvar *ilisp-message-addon-string* "ILISP:") (defun maybe-function (symbol-name package-name) (let ((symbol (and (find-package package-name) (find-symbol (symbol-name symbol-name) (find-package package-name))))) (when (fboundp symbol) symbol))) (defmacro the-symbol-if-defined (((if-symbol if-package) (&optional else-symbol else-package) &key eval-p) &body body) (let* ((sym-if (and (find-package if-package) (find-symbol (symbol-name if-symbol) (find-package if-package)))) (sym-else (unless sym-if (and else-symbol (find-package else-package) (find-symbol (symbol-name else-symbol) (find-package else-package))))) (tmp-symbol (or sym-if sym-else))) (if (consp (first body)) `(let ((the-symbol (symbol-value ',tmp-symbol))) ,@body) (if eval-p `,(eval tmp-symbol) `',tmp-symbol)))) (defmacro the-function-if-defined (((if-function if-package) (&optional else-function else-package) &key function-binding-p) &body body) (let* ((fun-if (ignore-errors (find-symbol (symbol-name if-function) (find-package if-package)))) (fun-else (unless fun-if (ignore-errors (and else-function (find-symbol (symbol-name else-function) (find-package else-package))))))) (when (or fun-if fun-else) (if function-binding-p `(let ((the-function (symbol-function ',(or fun-if fun-else)))) ,@body) `(,(or fun-if fun-else) ,@body))))) ;;; Martin Atzmueller 2000-01-15 ;;; ilisp-message was mostly set up because Clisp expects an ;;; ~& or ~% before the message-string, otherwise it does not display anything!" (defun ilisp-message (output-stream format-control-string &rest args) "ilisp-message provides an interface to create 'special' ILISP messages, i.e. \"ILISP: ... \" in an uniform way." (let ((result-string (apply #'format nil format-control-string args))) (format output-stream ;; [what are these quotes for, and why do we only want them ;; sometimes? it doesn't necessarily make the resulting output ;; readable, that i can see. right now only ilisp-errors passes nil ;; for output-stream, btw. -- rgr, 27-Sep-02.] (if (or (equal (char result-string 0) #\") (not output-stream)) "~&~A ~A" "~&\"~A ~A\"") *ilisp-message-addon-string* result-string))) ;; MNA: ecl (ecls-0.5) still had special-form-p in COMMON-LISP, ;; which produced an error, when redefined. #+(and (or :cormanlisp :ansi-cl) (not :ecl)) (defun special-form-p (symbol) "Backward compatibility for non ANSI CL's." (special-operator-p symbol)) #+(and :cltl2 (not :ansi-cl)) (defun special-form-p (symbol) "For CLTL2 Lisp just use the old one." (lisp:special-form-p symbol)) ;;; (defmacro ilisp-handler-case (expression &rest handlers) "Evaluate EXPRESSION using HANDLERS to handle errors." handlers (if (macro-function 'handler-case) `(handler-case ,expression ,@handlers) #+lucid `(lucid::handler-case ,expression ,@handlers) #-lucid expression)) ;;; ilisp-readtable-case -- ;;; ;;; 19991218 Marco Antoniotti ;;; READTABLE-CASE is ANSI. However, I feel magnanimous today, so I ;;; leave the check in to make it easier for non conforming ;;; implementations. ;;; [but a #+allegro case is no longer needed. -- rgr, 10-Sep-02.] (defun ilisp-readtable-case (readtable) (if (fboundp 'readtable-case) (readtable-case readtable) :upcase)) ;;; (defmacro ilisp-errors (form) "Handle errors when evaluating FORM." `(let ((*standard-output* *terminal-io*) (*error-output* *terminal-io*) #+cmu (ext:*gc-verbose* nil) ; cmulisp outputs "[GC ...]" which ; doesn't read well... ) (princ " ") ; Make sure we have output ;; 19990912 Martin Atzmueller ;; Gross CLisp HS hack so that the command-index stays the same ;; after an ILISP-command that has to use the inferior lisp ;; ;; 19990912 Marco Antoniotti ;; Put here since the change is very localized and not requiring ;; a separate init file. #+:clisp (setq system::*command-index* (max 0 (- system::*command-index* 2))) ;; [do the same gross hack for ACL. -- rgr, 27-Sep-02.] #+allegro (setq tpl::*this-command-number* (max 0 (- tpl::*this-command-number* 2))) (ilisp-handler-case ,form (error (error) (ilisp-message nil "~A" error))))) ;;; (defun ilisp-save () "Save the current state of the result history." (unless *ilisp-old-result* (setq *ilisp-old-result* (list /// // +++ ++ + /)))) ;;; (defun ilisp-restore () "Restore the old result history." (setq // (pop *ilisp-old-result*) ** (first //) / (pop *ilisp-old-result*) * (first /) ++ (pop *ilisp-old-result*) + (pop *ilisp-old-result*) - (pop *ilisp-old-result*)) ;; Martin Atzmueller 2000-01-26 (let ((new/ (pop *ilisp-old-result*))) (if (some #'(lambda (new+) (and (stringp new+) (search *ilisp-message-addon-string* new+))) new/) nil (values-list new/)))) ;;; ilisp-symbol-name -- ;;; ;;; ':capitalize' case added under suggestion by Rich Mallory. (defun ilisp-symbol-name (symbol-name) "Return SYMBOL-NAME with the appropriate case as a symbol." (ecase (ilisp-readtable-case *readtable*) (:upcase (string-upcase symbol-name)) (:downcase (string-downcase symbol-name)) (:capitalize (string-capitalize symbol-name)) ((:preserve :invert) symbol-name))) ;;; ilisp-find-package -- ;;; ;;; Notes: ;;; 19990806 Unknown Author (blame Marco Antoniotti for this) ;;; Added test for KEYWORD case. ;;; [now takes an error-p arg. -- rgr, 22-Aug-02.] (defun ilisp-find-package (package-name &key (error-p t)) "return package package-name or the current package." (cond ((string-equal package-name "nil") *package*) ((string-equal package-name "") (find-package (string :keyword))) ((find-package (ilisp-symbol-name package-name))) (error-p (error "package ~a not found" package-name)))) (defun extract-function-info-from-name (name) ;; [Note that this also handles (setf foo) specs. -- rgr, 11-Sep-02.] (cond ((and (symbolp name) (macro-function name)) (values (macro-function name) :macro)) ((fboundp name) (values (fdefinition name) :function)) (t (values nil nil)))) ;;; (defun ilisp-find-symbol (symbol-name package-name) "Return the symbol associated with SYMBOL-NAME in PACKAGE-NAME. The trick is to try to handle print case issues intelligently." (find-symbol (ilisp-symbol-name symbol-name) (ilisp-find-package package-name))) ;;; The following two functions were in version 5.5. ;;; They disappeared in version 5.6. I am putting them back in the ;;; distribution in order to make use of them later if the need ;;; arises. ;;; Marco Antoniotti: Jan 2 1995 #| (defun ilisp-filename-hack (filename) "Strip `/user@machine:' prefix from filename." ;; Ivan's hack for getting away with dumb /ivan@bu-conx:/foo/bar/baz ;; filenames... (let ((at-location (position #\@ filename)) (colon-location (position #\: filename))) (if (and at-location colon-location) (subseq filename (1+ colon-location)) filename))) (defun ilisp-read-form (form package) "Read string FORM in PACKAGE and return the resulting form." (let ((*package* (ilisp-find-package package))) (read-from-string form))) |# ;;; 2000-09-29 11:28:36 rurban ;;; I needed this for XEmacs/cmd.exe/cormanlisp which swallows all my backslashes. ;;; Slashes do work fine on NT. (defun ilisp-w32-fix-filename (filename) "Pathslash hack: replace all '\\' by '/' in filenames. Convert cygwin paths also. This will only work on Microsoft NT, not on a Win95 based OS." ;; (setq filename "r:\\gnu\\XEMACS~1.35\\lisp\\replace.elc") ;; (setq filename "/cygdrive/r/xx") => "r:/" (do ((pos (position #\\ filename) (position #\\ filename))) ((null pos) filename) (setf (aref filename pos) #\/)) (if (string-equal "/cygdrive/" (subseq filename 0 10)) (setf filename (concatenate 'string (subseq filename 10 11) ":" (subseq filename 11))) filename)) ;;; (defun ilisp-eval (form package filename) "Evaluate FORM in PACKAGE recording FILENAME as the source file." (princ " ") ;; Ivan's hack for getting away with dumb /ivan@bu-conx:/foo/bar/baz ;; filenames... (let* ((at-location (position #\@ filename)) (colon-location (position #\: filename)) (filename (if (and at-location colon-location) (subseq filename (1+ colon-location)) filename)) #+:cormanlisp (filename (ilisp-w32-fix-filename filename)) (*package* (ilisp-find-package package)) #+allegro (excl::*source-pathname* filename) #+allegro (excl::*redefinition-warnings* nil) #+lucid (lucid::*source-pathname* (if (probe-file filename) (truename filename) (merge-pathnames filename))) #+lucid (lucid::*redefinition-action* nil) #+lispworks (compiler::*input-pathname* (merge-pathnames filename)) #+lispworks (compiler::*warn-on-non-top-level-defun* nil) ;; The LW entries are a mix of Rich Mallory and Jason ;; Trenouth suggestions ;; Marco Antoniotti: Jan 2 1995. ) filename (eval (read-from-string form)))) ;;; (defun ilisp-compile (form package filename) "Compile FORM in PACKAGE recording FILENAME as the source file." (princ " ") ;; This makes sure that function forms are compiled ;; NOTE: Rich Mallory proposed a variation of the next piece of ;; code. for the time being we stick to the following simpler code. ;; Marco Antoniotti: Jan 2 1995. #-(or lucid cmu) (ilisp-eval (format nil "(funcall (compile nil '(lambda () ~A)))" form) package filename) #+lucid ;; Following form is a patch provided by Christopher Hoover ;; (let ((*package* (ilisp-find-package package)) (lcl:*source-pathname* (if (probe-file filename) (truename filename) (merge-pathnames filename))) (lcl:*redefinition-action* nil)) (with-input-from-string (s form) (lucid::compile-in-core-from-stream s) (values))) ;; Without this variant, CMUCL loses the source file information. Tested in ;; cmucl 18d, but it is likely to work in much older versions as well. #+cmu (let ((*package* (ilisp-find-package package)) (source-info (handler-case (c::make-file-source-info (c::verify-source-files filename)) ;; [this is a kludge to get around the fact that the file may not ;; yet exist. -- rgr, 23-Feb-03.] (file-error nil)))) (with-input-from-string (s form) (c::compile-from-stream s :source-info source-info ;; this shuts of the "Converted foo/Compiling foo" ;; messages, which are a bit much for a single ;; defun, though may be desirable for a region. :print nil ;; [if we don't shut this off too, the default of ;; :maybe gets turned into t for top-level forms. ;; -- rgr, 23-Aug-02.] :byte-compile nil) (values)))) ;;; (defun ilisp-describe (sexp package) "Describe SEXP in PACKAGE." (ilisp-errors (let ((*package* (ilisp-find-package package))) (let ((item-to-be-described (read-from-string sexp))) (if (atom item-to-be-described) (describe item-to-be-described) (describe (eval item-to-be-described))))))) ;;; (defun ilisp-inspect (sexp package) "Inspect SEXP in PACKAGE." (ilisp-errors (let ((*package* (ilisp-find-package package))) (let ((item-to-be-described (read-from-string sexp))) (if (atom item-to-be-described) (inspect item-to-be-described) (inspect (eval item-to-be-described))))))) ;;; (defun ilisp-arglist (symbol package) "Returns the argument list of SYMBOL from PACKAGE." (ilisp-errors (let ((fn (ilisp-find-symbol symbol package)) (*print-length* nil) (*print-pretty* t) (*package* (ilisp-find-package package))) (cond ((null fn) (format t "Symbol ~s not present in ~s." symbol package)) ((not (fboundp fn)) (format t "~s: undefined~%" fn)) (t (print-function-arglist fn))))) (values)) ;;; print-function-arglist -- ;;; This function is really invoked only by the #\Space binding of ;;; ILISP-PRINT-INFO-MESSAGE. ;;; 19991218 Marco Antoniotti ;;; Unfortunately the function GET-FUNCTION-ARGLIST may default to ;;; DOCUMENTATION, which returns a string. Hence the change. ;;; ;;; 19991218 Marco Antoniotti ;;; Using the arglist command bound to #\Space would probably be ;;; better. Anyway... (defun print-function-arglist (fn) "Pretty arglist printer" (let* ((arglist-doc (get-function-arglist fn)) (desc (ilisp-function-short-description fn))) (format t "~&~s~a" fn (or desc "")) (write-string ": ") (typecase arglist-doc (string (write-string arglist-doc)) (list (let ((arglist (ldiff arglist-doc (member '&aux arglist-doc)))) (if arglist (write arglist :case :downcase :escape nil) (write-string "()")))) (t (error "arglist doc very messed up [~S]." arglist-doc))) (terpri) (values))) (defun ilisp-generic-function-p (symbol) (let ((generic-p (find-symbol "GENERIC-FUNCTION-P" (or (find-package "PCL") *package*)))) (and generic-p (fboundp generic-p) (funcall generic-p symbol)))) (defun ilisp-function-short-description (symbol) (cond ((macro-function symbol) " (Macro)") ((special-form-p symbol) " (Special Form)") ((ilisp-generic-function-p symbol) " (Generic)"))) (defun get-function-arglist (symbol) (let ((fun (symbol-function symbol))) (cond ((ilisp-generic-function-p symbol) (funcall (find-symbol "GENERIC-FUNCTION-PRETTY-ARGLIST" (or (find-package "PCL") *package*)) fun)) (t #+allegro (excl::arglist symbol) #+(or ibcl kcl gcl) (help symbol) #+:ecl (si::help symbol) #+lucid (lucid::arglist symbol) #+lispworks (system::function-lambda-list symbol) #+clisp (arglist symbol) #+cmu (arglist symbol (symbol-package symbol)) #+:sbcl (arglist symbol (symbol-package symbol)) #+:openmcl (arglist symbol (symbol-package symbol)) #-(or allegro lucid kcl ibcl ecl gcl lispworks clisp cmu :sbcl :openmcl) (documentation symbol 'function))))) (defun ilisp-print-info-message (symbol package) "Returns the argument list or the value of SYMBOL from PACKAGE. Error messages are generated appropriately." (ilisp-errors (let ((real-symbol (ilisp-find-symbol symbol package)) (*print-length* nil) (*print-level* nil) (*package* (ilisp-find-package package))) (cond ((null real-symbol) (format t "") ;; (ilisp-message t "symbol ~S not present in ~S." symbol package) (values)) ((special-form-p real-symbol) (format t "~S: special-operator." real-symbol) (values)) ((fboundp real-symbol) (print-function-arglist real-symbol)) ((ignore-errors (boundp real-symbol)) (format t "~S is bound to ~S." real-symbol (symbol-value real-symbol)) (values)) (t (format t "Symbol ~S is unbound." real-symbol) (values)))))) ;;; (defun ilisp-documentation (symbol package type) "Return the TYPE documentation for SYMBOL in PACKAGE. If TYPE is \(qualifiers* (class ...)), the appropriate method will be found." (ilisp-errors (let* ((real-symbol (ilisp-find-symbol symbol package)) (type (if (and (not (zerop (length type))) (eq (elt type 0) #\()) (let ((*package* (ilisp-find-package package))) (read-from-string type)) (ilisp-find-symbol type package)))) (when (listp type) (setq real-symbol (funcall (find-symbol "FIND-METHOD" (or (find-package "CLOS") (find-package "PCL") *package*)) (symbol-function real-symbol) (reverse (let ((quals nil)) (dolist (entry type quals) (if (listp entry) (return quals) (setq quals (cons entry quals)))))) (reverse (let ((types nil)) (dolist (class (first (last type)) types) (setq types (cons (funcall (find-symbol "FIND-CLASS" (or (find-package "CLOS") (find-package "PCL") *package*)) class) types)))))))) (if real-symbol (if (symbolp real-symbol) (documentation real-symbol type) ;; Prevent compiler complaints (eval `(documentation ,real-symbol))) (format nil "~A has no ~A documentation" symbol type))))) ;;; (defun ilisp-macroexpand (expression package) "Macroexpand EXPRESSION as long as the top level function is still a macro." (ilisp-errors (let ((*print-length* nil) (*print-level* nil) (*package* (ilisp-find-package package))) (pprint (#-allegro macroexpand #+allegro excl::walk (read-from-string expression)))))) ;;; (defun ilisp-macroexpand-1 (expression package) "Macroexpand EXPRESSION once." (ilisp-errors (let ((*print-length* nil) (*print-level* nil) (*package* (ilisp-find-package package))) (pprint (macroexpand-1 (read-from-string expression)))))) (defun ilisp-trace (symbol package breakp) "Trace SYMBOL in PACKAGE." (declare (ignore breakp)) ; No way to do this in CL. (ilisp-errors (let ((real-symbol (ilisp-find-symbol symbol package))) (when real-symbol (eval `(trace ,real-symbol)))))) (defun ilisp-untrace (symbol package) "Untrace SYMBOL in PACKAGE." (ilisp-errors (let ((real-symbol (ilisp-find-symbol symbol package))) (when real-symbol (eval `(untrace ,real-symbol)))))) ;;; ilisp-compile-file-extension -- ;;; ;;; 19990806 Marco Antoniotti (defun ilisp-compile-file-extension () (pathname-type (compile-file-pathname "ilisp-foo"))) ;;; (defun ilisp-compile-file (file extension) "Compile FILE putting the result in FILE+EXTENSION." (ilisp-errors (compile-file file :output-file (merge-pathnames (make-pathname :type extension) file)))) ;;; (defun ilisp-casify (pattern string lower-p upper-p) "Return STRING with its characters converted to the case of PATTERN. It continues with the 'last case' beyond the end." (cond (lower-p (string-downcase string)) (upper-p (string-upcase string)) (t (let (case) (concatenate 'string (map 'string #'(lambda (p s) (setq case (if (upper-case-p p) #'char-upcase #'char-downcase)) (funcall case s)) pattern string) (map 'string case (subseq string (length pattern)))))))) ;;; (defun ilisp-words (string) "Return STRING broken up into words. Each word is (start end delimiter)." (do* ((length (length string)) (start 0) (end t) (words nil)) ((null end) (nreverse words)) (if (setq end (position-if-not #'alphanumericp string :start start)) (setq words (cons (list end (1+ end) t) (if (= start end) words (cons (list start end nil) words))) start (1+ end)) (setq words (cons (list start length nil) words))))) ;;; (defun ilisp-match-words (string pattern words) "Match STRING to PATTERN using WORDS." (do* ((strlen (length string)) (words words (cdr words)) (word (first words) (first words)) (start1 (first word) (first word)) (end1 (second word) (second word)) (delimiter (third word) (third word)) (len (- end1 start1) (and word (- end1 start1))) (start2 0) (end2 len)) ((or (null word) (null start2)) start2) (setq end2 (+ start2 len) start2 (if delimiter (position (elt pattern start1) string :start start2) (when (and (<= end2 strlen) (string= pattern string :start1 start1 :end1 end1 :start2 start2 :end2 end2)) (1- end2)))) (when start2 (incf start2)))) ;;; (defun ilisp-matching-symbols (string package &optional (function-p nil) (external-p nil) (prefix-p nil)) "Return a list of the symbols that have STRING as a prefix in PACKAGE. FUNCTION-P indicates that only symbols with a function value should be considered. EXTERNAL-P indicates that only external symbols should be considered. PREFIX-P means that partial matches should not be considered. The returned strings have the same case as the original string." (ilisp-errors (let* ((lower-p (notany #'upper-case-p string)) (upper-p (notany #'lower-case-p string)) (no-casify (eq (ilisp-readtable-case *readtable*) :preserve)) (symbol-string (ilisp-symbol-name string)) (length (length string)) (results nil) (*print-length* nil) (*package* (ilisp-find-package package))) (labels ( ;; Check SYMBOL against PATTERN (check-symbol (symbol pattern) (let ((name (symbol-name symbol))) (when (and (or (not function-p) (fboundp symbol)) (>= (length name) length) (string= pattern name :end2 length)) (push (list (if no-casify name (ilisp-casify pattern name lower-p upper-p))) results)))) ;; Check SYMBOL against PATTERN using WORDS (check-symbol2 (symbol pattern words) (let ((name (symbol-name symbol))) (when (and (or (not function-p) (fboundp symbol)) (ilisp-match-words name pattern words)) (push (list (if no-casify name (ilisp-casify pattern name lower-p upper-p))) results))))) (if external-p (do-external-symbols (symbol *package*) (check-symbol symbol symbol-string)) (progn ;; KCL does not go over used symbols. #+(or kcl ibcl ecl) (dolist (used-package (package-use-list *package*)) (do-external-symbols (symbol used-package) (check-symbol symbol symbol-string))) (do-symbols (symbol *package*) (check-symbol symbol symbol-string)))) (unless (or results prefix-p) (let ((words (ilisp-words symbol-string))) (if external-p (do-external-symbols (symbol *package*) (check-symbol2 symbol symbol-string words)) (progn ;; KCL does not go over used symbols. #+(or kcl ibcl ecl) (dolist (used-package (package-use-list *package*)) (do-external-symbols (symbol used-package) (check-symbol2 symbol symbol-string words))) (do-symbols (symbol *package*) (check-symbol2 symbol symbol-string words)))))) ;; 19990806 Unknown Author (blame Marco Antoniotti for this) ;; () doesn't depend on *PACKAGE* ;; ;; (prin1 results) (if results (prin1 results) (princ "()")) nil)))) #-(or sbcl :cormanlisp) (eval-when (load eval) (when #+(and :CMU (or :CMU17 :CMU18)) (eval:interpreted-function-p #'ilisp-matching-symbols) #-(and :CMU (or :CMU17 :CMU18)) (not (compiled-function-p #'ilisp-matching-symbols)) (ilisp-message *standard-output* "File is not compiled, use M-x ilisp-compile-inits"))) #+sbcl (eval-when (:load-toplevel :execute) (when #+(and :CMU (or :CMU17 :CMU18)) (eval:interpreted-function-p #'ilisp-matching-symbols) #-(and :CMU (or :CMU17 :CMU18)) (not (compiled-function-p #'ilisp-matching-symbols)) (ilisp-message *standard-output* "File is not compiled, use M-x ilisp-compile-inits"))) ;;; end of file -- cl-ilisp.lisp -- ilisp-5.12.0+cvs.2004.12.26/cmulisp.lisp0000600000175000001440000001473707660520172016142 0ustar mvelausers;;; -*- Mode: Lisp -*- ;;; cmulisp.lisp -- ;;; ILISP CMU Common Lisp dialect support definitions. ;;; Author: Todd Kaufmann May 1990 ;;; ;;; This file is part of ILISP. ;;; Please refer to the file COPYING for copyrights and licensing ;;; information. ;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list ;;; of present and past contributors. ;;; ;;; $Id: cmulisp.lisp,v 1.15 2003/05/14 20:00:58 kevinrosenberg Exp $ (in-package :ilisp) ;;;% Stream settings, when running connected to pipes. ;;; ;;; This fixes a problem when running piped: When CMU is running as a piped ;;; process, *terminal-io* really is a terminal; ie, /dev/tty. This means an ;;; error will cause lisp to stop and wait for input from /dev/tty, which it ;;; won't be able to grab, and you'll have to restart your lisp. But we want ;;; it to use the same input that the user is typing in, ie, the pipe (stdin). ;;; This fixes that problem, which only occurs in the CMU cores of this year. ;;; (defvar *Fix-pipe-streams* t "Set to Nil if you want them left alone. And tell me you don't get stuck.") (when (and *Fix-pipe-streams* (lisp::synonym-stream-p *terminal-io*) (eq (lisp::synonym-stream-symbol *terminal-io*) 'system::*tty*)) (setf *terminal-io* (make-two-way-stream system::*stdin* system::*stdout*)) ;; *query-io* and *debug-io* are synonym streams to this, so this fixes ;; everything. ) ;;;% Debugger extensions ;;;%% Implementation of a :pop command for CMU CL debugger ;;; ;;; Normally, errors which occur while in the debugger are just ignored, unless ;;; the user issues the "flush" command, which toggles this behavior. ;;; (setq debug:*flush-debug-errors* nil) ; allow multiple error levels. ;;; This implementation of "POP" simply looks for the first restart that says ;;; "Return to debug level n" or "Return to top level." and executes it. ;;; (debug::def-debug-command "POP" () ;; find the first "Return to ..." restart (if (not (boundp 'debug::*debug-restarts*)) (error "You're not in the debugger; how can you call this!?") (labels ((find-return-to (restart-list num) (let ((first (member-if #'(lambda (restart) (string= (with-output-to-string (s) (funcall (conditions::restart-report-function restart) s)) "Return to " :end1 10)) restart-list))) (cond ((zerop num) (car first)) ((cdr first) (find-return-to (cdr first) (1- num))))))) (let* ((level (debug::read-if-available 1)) (first-return-to (find-return-to debug::*debug-restarts* (1- level)))) (if (null first-return-to) (format *debug-io* "pop: ~d is too far" level) (debug::invoke-restart-interactively first-return-to) )))) ) ;;;%% arglist/source-file utils. (defun get-correct-fn-object (sym) "Deduce how to get the \"right\" function object and return it." (let ((fun (or (macro-function sym) (and (fboundp sym) (symbol-function sym))))) (unless fun (error "Unknown function ~a. Check package." sym)) (if (and (= (lisp::get-type fun) #.vm:closure-header-type) (not (eval:interpreted-function-p fun))) (lisp::%closure-function fun) fun))) ;;;%% arglist - return arglist of function ;;; ;;; This function is patterned after DESCRIBE-FUNCTION in the ;;; 'describe.lisp' file of CMUCL. (defun arglist (symbol package) (ilisp-errors (let ((x (if (symbolp symbol) symbol (ilisp-find-symbol symbol (if (packagep package) (package-name package) package))))) (flet ((massage-arglist (args) (typecase args (string args) (null "()") (t (format nil "~S" args))))) (multiple-value-bind (func kind) (extract-function-info-from-name x) ;; (print func *trace-output*) ;; (print kind *trace-output*) (if (and func kind) (case (lisp::get-type func) ((#.vm:closure-header-type #.vm:function-header-type #.vm:closure-function-header-type) (massage-arglist (the-function-if-defined ((#:%function-arglist :lisp) (#:%function-header-arglist :lisp)) func))) (#.vm:funcallable-instance-header-type (typecase func (kernel:byte-function "Byte compiled function or macro, no arglist available.") (kernel:byte-closure "Byte compiled closure, no arglist available.") ((or generic-function pcl:generic-function) (generic-function-pretty-arglist func)) (eval:interpreted-function (massage-arglist (eval::interpreted-function-arglist func))) (t (print 99 *trace-output*) "No arglist available."))) (t "No arglist available.")) "Unknown function - no arglist available." ; For the time ; being I just ; return this ; value. Maybe ; an error would ; be better. )))))) (defun cmulisp-trace (symbol package breakp) "Trace SYMBOL in PACKAGE." (ilisp-errors (let ((real-symbol (ilisp-find-symbol symbol package))) (setq breakp (read-from-string breakp)) (when real-symbol (eval `(trace ,real-symbol :break ,breakp)))))) (defun ilisp-callers (name package) #-(or cmu18e cmu19) (declare (ignore name package)) (ilisp-errors ;; [this reader conditionalization strategy fails if there's a cmu18f ;; release. -- rgr, 11-Apr-03.] #-(or cmu18e cmu19) (error "Finding callers is not supported in this version of CMUCL.") #+(or cmu18e cmu19) (let ((symbol (ilisp-find-symbol name package)) (callers nil)) (unless symbol (error "No such symbol '~A' in package '~A'." name package)) (dolist (caller (xref:who-calls symbol)) (let ((caller-name (xref:xref-context-name caller))) (when (and (consp caller-name) (eq (car caller-name) :method)) ;; standardize method name syntax. (setq caller-name (cons 'method (cdr caller-name)))) ;; must use pushnew, because the current release doesn't correctly ;; flush old definitions. -- rgr, 11-Apr-03. (pushnew caller-name callers :test #'equal))) ;; print callers afterwards, to minimize GC messages interference. bind ;; *package* so that all symbols are printed with a suitable prefix. (let ((*package* (find-package :ilisp)) (*print-pretty* nil) (*print-circle* nil)) (dolist (caller callers) (print caller))) t))) (defun generic-function-pretty-arglist (gf) (if (fboundp 'pcl::generic-function-lambda-list) (pcl::generic-function-lambda-list gf)) (mop:generic-function-lambda-list gf)) ;;; end of file -- cmulisp.lisp -- ilisp-5.12.0+cvs.2004.12.26/comint-ipc.el0000600000175000001440000010137510020674034016143 0ustar mvelausers;;; -*-Emacs-Lisp-*- ;;; ;;; ;;;%Header ;;; ;;; Rcs_Info: comint-ipc.el,v 1.20 1993/09/03 02:05:07 ivan Rel $ ;;; ;;; IPC extensions for comint ;;; Copyright (C) 1990 Chris McConnell, ccm@cs.cmu.edu. ;;; ;;; Send mail to ilisp@cons.org if you have problems. ;;; ;;; Send mail to majordomo@cons.org if you want to be on the ;;; ilisp mailing list. ;;; This file is part of GNU Emacs. ;;; GNU Emacs is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY. No author or distributor ;;; accepts responsibility to anyone for the consequences of using it ;;; or for whether it serves any particular purpose or works at all, ;;; unless he says so in writing. Refer to the GNU Emacs General Public ;;; License for full details. ;;; Everyone is granted permission to copy, modify and redistribute ;;; GNU Emacs, but only under the conditions described in the ;;; GNU Emacs General Public License. A copy of this license is ;;; supposed to have been given to you along with GNU Emacs so you ;;; can know your rights and responsibilities. It should be in a ;;; file named COPYING. Among other things, the copyright notice ;;; and this notice must be preserved on all copies. ;;; This file contains extensions to multiplex the single channel of ;;; an inferior process between multiple purposes. It provides both ;;; synchronous and asynchronous sends with error handling. ;;; USAGE: Load this file and call comint-setup-ipc in a comint ;;; buffer. This is not a standalone application. For an example of ;;; it being used see ilisp.el. ;;; CUSTOMIZATION: See the parameters and hooks below. ;;; INTERFACE. See the function documentation and code for more information. ;;; ;;; PROCESS INPUT: comint-send, comint-send-code, comint-default-send, ;;; comint-sync, comint-abort-sends ;;; ;;; PROCESS OUTPUT: comint-display-output, comint-display-error-output ;;;%Parameters (defvar comint-log nil "If T, then record all process input and output in a buffer. The name of the buffer is the process name.") (defvar comint-send-newline t "If T then add a newline to string in comint-default-send.") (defvar comint-always-scroll nil "If T then process output will always be visible in first window on buffer.") (defvar comint-fix-error nil "String to send to send to the command interpreter to fix errors.") (defvar comint-continue nil "String to send to continue an interrupted job.") (defvar comint-interrupt-regexp nil "Regular expression for the start of an interrupt in process output.") (defvar comint-error-regexp nil "Regular expression for setting comint-errorp if found in process output.") (defvar comint-output-buffer " *Output*" "Name of the output buffer.") (defvar comint-error-buffer " *Error Output*" "Name of the error output buffer.") (defvar comint-show-status t "Set to nil to inhibit status redisplay.") ;;;%%Hooks (defvar comint-output-filter (function identity) "Given the complete OUTPUT of a send, return the result of the send.") (defvar comint-interrupt-start 'comint-interrupt-start "Return the start in OUTPUT of the text printed by comint-interrupt-subjob in the inferior process.") (defvar comint-handler 'comint-error-popup "Default handler for sends. When a send completes, the handler is called with error-p, wait-p, message, output and prompt.") (defvar comint-update-status 'comint-update-status "Function to update the STATUS of the inferior process. It should set comint-status to a status string in addition to whatever else it does.") (defvar comint-prompt-status 'comint-prompt-status "Given the previous prompt and the last line output, return 'error if an error, T if a prompt and nil otherwise. If it is a prompt, also funcall comint-update-status to set the status. If old is nil, then just return T if last line is a prompt.") ;;; (defvar comint-abort-hook nil "List of hooks to run after sends are aborted.") ;;;%Globals (defvar comint-send-queue nil "List of currently pending IPC send requests. The first element in the queue is where output to the process will be stored. A send record is a list of: string -- The string sent to the process. no-insert -- nil to insert output into the process buffer. If this is being done, the results will only contain the very last line. wait-p -- nil if not waiting, non-nil if waiting. If it is a string, results are inserted in the buffer until a result matches the string as a regexp. status -- A symbol for the process status while the send is running. message -- A message to be displayed when an asynchronous send is popped up by the handler. handler -- A function that given error-p, wait-p, message, output and prompt decides if the user should be notified. If it is nil or returns nil, then no error processing will be done. running -- nil if a send is waiting, T if it is running, another send if interrupting and a string with pending output if the send was interrupted. old-prompt -- The prompt before the send was sent. If it is nil, then errors will not be detected. line -- The start of the last line in the results. result -- Cons of the output and the prompt after the send.") (defvar comint-end-queue nil "Pointer to the end of comint-send-queue.") (defvar comint-queue-emptied t "Set to T each time send queue empties.") (defvar comint-output nil "Set to the output of the last send. This is useful when ilisp code is put in the send stream.") (defvar comint-errorp nil "Set to T if the last send was an error.") (defvar comint-status " :run" "The current comint status.") (defvar comint-original-buffer nil "The original buffer when there was output to a comint buffer.") (defvar comint-last-send nil "Last send that was put in queue.") (defvar comint-aborting nil "Set to T if we are aborting commands.") ;;;%Utils ;;; (defun comint-remove-whitespace (string) "Remove leading and trailing whitespace in STRING." (if string (let* ((start (if (string-match "[^ \t\n]" string) (match-beginning 0) 0)) (end start)) (while (string-match "[ \t\n]*[^ \t\n]+" string end) (setq end (match-end 0))) (substring string start end)))) ;;; (defun comint-log (process string &optional output) "Log to PROCESS, STRING marking as optional OUTPUT." (if comint-log (save-excursion (set-buffer (get-buffer-create (process-name process))) (goto-char (point-max)) (if output (progn (insert "{") (insert string) (insert "}")) (insert string))))) ;;; v5.7b Removed by suggestion of erik@naggum.no (Erik Naggum). ;;; (defun comint-send-string (proc str) ;;; "Send PROCESS the contents of STRING as input. ;;; This is equivalent to process-send-string, except that long input strings ;;; are broken up into chunks of size comint-input-chunk-size. Processes ;;; are given a chance to output between chunks. This can help prevent ;;; processes from hanging when you send them long inputs on some OS's." ;;; (comint-log proc str) ;;; (let* ((len (length str)) ;;; (i (min len comint-input-chunk-size))) ;;; (process-send-string proc (substring str 0 i)) ;;; (while (< i len) ;;; (let ((next-i (+ i comint-input-chunk-size))) ;;; (accept-process-output) ;;; (process-send-string proc (substring str i (min len next-i))) ;;; (setq i next-i))))) ;;; v5.7b See above (defun comint-sender (process string) "Send to PROCESS STRING with newline if comint-send-newline." ;; (comint-send-string process string) (comint-log process string) (process-send-string process string) (if comint-send-newline (progn (comint-log process "\n") (process-send-string process "\n")))) ;;; (defun comint-interrupt-subjob () "Interrupt the current subjob." (interactive) (comint-log (get-buffer-process (current-buffer)) "") (interrupt-process nil comint-ptyp)) ;;; (defun comint-send-variables (send) "Return a pointer to the start of the variables for SEND. It returns \(running old-prompt line \(output . prompt))." (cdr (cdr (cdr (cdr (cdr (cdr send))))))) ;;; (defun comint-send-results (send) "Return the results of SEND which are \(output . prompt). If there is an error, the prompt will be a list." (car (cdr (cdr (cdr (comint-send-variables send)))))) ;;; (defun comint-send-description (send) "Return a description of SEND." (let* ((status (cdr (cdr (cdr send))))) (or (car (cdr status)) ;Message (and (stringp (car send)) (car send)) ;String (and (car status) (symbol-name (car status)))))) ;;; (defun comint-interrupted () "Return T if there is an interrupted send." (let ((send comint-send-queue) (done nil)) (while (and send (not done)) (if (stringp (car (comint-send-variables (car send)))) (setq done t) (setq send (cdr send)))) done)) ;;;%Default hooks (defun comint-process-sentinel (process status) "Update PROCESS STATUS by funcalling comint-update-status." (setq status (process-status process)) (save-excursion (if (buffer-name (process-buffer process)) (set-buffer (process-buffer process))) (funcall comint-update-status status))) ;;; (defun comint-interrupt-start (output) "Return the start of comint-interrupt-regexp in OUTPUT." (if (and comint-interrupt-regexp (string-match comint-interrupt-regexp output)) (match-beginning 0))) ;;; (defun comint-update-status (status) "Update the process STATUS of the current buffer." (setq comint-status (format " :%s" status)) (if comint-show-status (progn (save-excursion (set-buffer (other-buffer))) (sit-for 0)))) ;;; (defun comint-prompt-status (old line &optional equal) "Called by comint-process filter with OLD and LINE, return 'error if LINE is an error, T if it is a prompt as determined by comint-prompt-regexp or nil otherwise. Also set the status appropriately by funcalling comint-update-status. If specified EQUAL will be called with old and line and should return T if line is not an error. OLD will be nil for the first prompt." (if (string-match comint-prompt-regexp line) (let ((error (or (if equal (funcall equal old line) (or (null old) (string-equal old line))) 'error))) (funcall comint-update-status (if (eq error 'error) error 'ready)) error) nil)) ;;; (defun comint-insert (output) "Insert process OUTPUT into the current buffer." (if output (let* ((buffer (current-buffer)) (process (get-buffer-process buffer)) (mark (process-mark process)) (window (selected-window)) (at-end nil)) (if (eq (window-buffer window) buffer) (setq at-end (= (point) mark)) (setq window (get-buffer-window buffer))) (save-excursion (goto-char mark) (insert output) (set-marker mark (point))) (if window (progn (if (or at-end comint-always-scroll) (goto-char mark)) (if (not (pos-visible-in-window-p (point) window)) (let ((original (selected-window))) (save-excursion (select-window window) (recenter '(center)) (select-window original))))))))) ;;; (defun comint-handle-error (output prompt keys &optional delay) "Handle an error by beeping, displaying OUTPUT and then waiting for the user to pause. Once there is pause, PROMPT until one of the characters in KEYS is typed. If optional DELAY is specified, it is the number of seconds that the user must pause. The key found will be returned." (save-excursion (setq delay (or delay 1)) (beep t) (comint-display-error output) (set-buffer comint-original-buffer) (while (not (if (eq +ilisp-emacs-version-id+ 'xemacs) (sit-for delay nil) (sit-for delay 0 nil))) (execute-kbd-macro (read-key-sequence nil))) (if (not (get-buffer-window (get-buffer comint-error-buffer))) (comint-display-error output)) (let ((cursor-in-echo-area t) (echo-keystrokes 0) char) (while (progn (message prompt) (not (memq (setq char (downcase (read-char))) keys))) (if (= char ? ) (ilisp-scroll-output) (setq quit-flag nil) (beep))) char))) ;;; (defun comint-error-popup (error wait-p message output prompt) "If there is an ERROR pop up a window with MESSAGE and OUTPUT. Nothing is done with PROMPT or WAIT-P." (if error (save-excursion (with-output-to-temp-buffer comint-output-buffer (set-buffer comint-output-buffer) (if message (insert message)) (insert ?\n) (insert output) (beep t)))) t) ;;; (defun comint-process-filter (process output) "Filter PROCESS OUTPUT. See comint-send for more information. The first element of the comint-send-queue is the current send entry. If the entry has a nil no-insert flag, insert the results into the process buffer. If the send is an interrupt, comint-interrupt-start is funcalled on the output and should return the start of the output of an interrupt. comint-prompt-status is called with the old prompt and the last line. It should return 'error if the last line is an error, T if it is a prompt and nil otherwise. It should also update the process status by funcalling comint-update-status. If there is a send handler, it is called with \(error-p wait-p message output prompt) and should determine what sort of notification is appropriate and return T if errors should be fixed and NIL otherwise. If the prompt is an error, then comint-fix-error will be sent to fix the error. When there is a prompt in the output stream, the next send will be dispatched unless the wait flag for the send is a string. If it is a string, then results will be discarded until one matches the string as a regexp. Output to the process should only be done through the functions comint-send or comint-default-send, or results will be mixed up." (let* ((inhibit-quit t) (window (selected-window)) (comint-original-buffer (current-buffer)) (match-data (match-data))) (unwind-protect (progn (set-buffer (process-buffer process)) (let* ((send (car comint-send-queue)) (no-insert (cdr send)) (wait-p (cdr no-insert)) (messagep (cdr (cdr wait-p))) (handler (cdr messagep)) (running (cdr handler)) (old-prompt (cdr running)) (line (cdr old-prompt)) (result (car (cdr line))) (old-result (car result)) (no-insert (car no-insert)) (message (car messagep)) (wait-p (car wait-p)) (sync (stringp wait-p))) (comint-log process output t) ;; Remove leading whitespace (if (and (null old-result) (save-excursion (goto-char (process-mark process)) (bolp)) (eq (string-match "[ \t]*\n" output) 0)) (setq output (substring output (match-end 0)))) (rplaca result (concat old-result output)) (while (string-match "\n" (car result) (car line)) (rplaca line (match-end 0))) (if (not (or sync no-insert)) (progn (comint-insert output) ;; Throw away output if storing in buffer (rplaca result (substring (car result) (car line))) (rplaca line 0))) (if (consp (car running)) ;Waiting for interrupt (let ((split (funcall comint-interrupt-start (car result)))) (if split (let ((interrupted (car running))) ;; Store output to previous send (rplaca (comint-send-variables interrupted) (substring (car result) 0 split)) (rplaca result (substring (car result) (car line))) (rplaca line 0) (rplaca running t))))) (if (not (consp (car running))) ;Look for prompt (let* ((last (substring (car result) (car line))) (is-prompt (funcall comint-prompt-status (car old-prompt) last))) (if is-prompt (let* ((output (if (or no-insert sync) (funcall comint-output-filter (substring (car result) 0 (car line))))) (handler (car handler)) (error (eq is-prompt 'error))) (setq old-result (car result)) (rplaca result output) (rplacd result (if error (list last) last)) (setq comint-output (car result) comint-errorp (or error (and comint-error-regexp comint-output (string-match comint-error-regexp comint-output)))) (unwind-protect ;; (if handler ;; (setq handler ;; (funcall handler comint-errorp wait-p ;; message output last))) ;; v5.7b Patch suggested by fujieda@jaist.ac.jp ;; (Kazuhiro Fujieda). Here is his comment. ;; "When the 'handler' is called, the current ;; buffer may be changed. 'comint-process-filter' ;; accesses some buffer-local variables, for ;; example 'comint-send-queue' and ;; 'comint-end-queue'. If the current buffer is ;; changed in the 'handler', the entities of ;; these buffer-local variables is replaced, and ;; corrupt successive behaviors." ;; The code hereafter fixes the problem. (if handler (save-current-buffer (setq handler (funcall handler comint-errorp wait-p message output last)))) (if (and error handler no-insert comint-fix-error) (setq comint-send-queue (cons (list comint-fix-error t nil 'fix "Fixing error" nil nil nil 0 (cons nil nil)) ;; We may have aborted (or (cdr comint-send-queue) comint-send-queue)))) (if sync (let ((match (string-match wait-p old-result))) (if match (progn (rplaca (cdr (cdr (cdr (cdr (car comint-end-queue))))) "Done") (if (not no-insert) (comint-insert (concat (substring old-result 0 match) (substring old-result (match-end 0))))) (rplaca result (substring old-result match (car line))) (rplaca messagep "Done") (rplaca running nil) (comint-dispatch-send process)))) ;; Not waiting (rplaca messagep "Done") (rplaca running nil) (comint-dispatch-send process)))) (rplacd result nil)))))) (store-match-data match-data) (set-buffer comint-original-buffer)))) ;;; (defun comint-dispatch-send (process) "Dispatch the next send in PROCESS comint-send-queue, popping the current send if done." (let* ((send (car comint-send-queue)) (results (comint-send-results send)) (prompt (cdr results))) ;; Never pop the last record (cond ((and (null comint-send-queue) ; Catch a bug. (null comint-end-queue))) ((eq comint-send-queue comint-end-queue) (let ((init (car send)) (running (comint-send-variables send))) (setq comint-queue-emptied t) ;; Set old prompt to prompt (if prompt (rplaca (cdr (comint-send-variables send)) (if (consp prompt) (car prompt) prompt))) (rplaca send nil) (if init (funcall init) (if (stringp (car running)) ;; Continue if interrupted. There is no way to ;; sense if the interrupted command actually ;; started, so it is possible that a command will ;; get lost. (progn (funcall comint-update-status (car (cdr (cdr (cdr send))))) (comint-sender process comint-continue) (comint-process-filter process (car running)) (rplaca running t)))))) (t (if prompt ;; Pop (setq comint-send-queue (cdr comint-send-queue) send (car comint-send-queue)) ;; Set prompt to top-level prompt (setq prompt (cdr (comint-send-results (car comint-end-queue))))) (let* ((top-level (eq comint-send-queue comint-end-queue)) (string (car send)) (no-insert (cdr send)) (wait-p (cdr no-insert)) (status (cdr wait-p)) (message (cdr status)) (status (car status)) (no-insert (car no-insert)) (message (car message)) (running (comint-send-variables send))) (if top-level (rplaca send nil) (if (stringp string) (funcall comint-update-status status))) (if (and message (not no-insert) (not (stringp (car wait-p))) (not top-level)) ;; Display message on first output (comint-insert (concat comment-start comment-start comment-start message comment-end "\n"))) (if (and string (not (stringp string))) ;; Elisp code (progn (rplacd (comint-send-results (car comint-send-queue)) (if (consp prompt) (car prompt) prompt)) (funcall string) (comint-dispatch-send process)) (if (stringp (car running)) ;; Continue interrupted send (let ((output (car running))) (if (or top-level (car (comint-send-results send)) (not (string-equal output ""))) ;; Continue old command (progn (rplaca running t) (funcall comint-update-status status) (comint-sender process comint-continue) (comint-process-filter process output) ;; Send queued default sends (if (and top-level string) (comint-sender process string))) ;; Assume we have to restart the command since ;; there is no output. There is no way to ;; sense whether or not the inferior has ;; started processing the previous send. This ;; is a problem only if the original did start ;; and had side effects. (rplaca running nil) (setq comint-send-queue (cons (list comint-fix-error t nil 'fix "Fixing error" nil nil nil 0 (cons nil nil)) comint-send-queue)) (comint-dispatch-send process))) (if (not top-level) ;; New send, set old prompt to the prompt of previous (rplaca (cdr (comint-send-variables send)) (if (consp prompt) (car prompt) prompt))) (if string (progn (rplaca running t) (comint-sender process string)))))))))) ;;; (defun comint-interrupt (process send) "Interrupt PROCESS to send SEND if comint-continue is defined and the current send is not waiting. Otherwise, SEND will be the next send." (if (and comint-continue (not (car (cdr (cdr (car comint-send-queue)))))) (let* ((current (car comint-send-queue)) (interrupt ;; string no-insert wait-p status message handler (list nil t nil 'interrupt "Interrupt" nil ;; running old-prompt line (output . prompt) current nil 0 (cons nil nil)))) (setq comint-send-queue (cons interrupt (cons send comint-send-queue))) (funcall comint-update-status 'interrupt) (comint-interrupt-subjob)) (if (eq comint-send-queue comint-end-queue) (setq comint-send-queue (cons (car comint-send-queue) (cons send comint-send-queue))) (rplacd comint-send-queue (cons send (cdr comint-send-queue)))))) ;;;%Interface (defun comint-setup-ipc (&optional force) "Setup for IPC in the current buffer. If called interactively, force comint-send-queue to be initialized." (interactive "p") (make-local-variable 'comint-send-newline) (make-local-variable 'comint-always-scroll) (make-local-variable 'comint-fix-error) (make-local-variable 'comint-continue) (make-local-variable 'comint-interrupt-regexp) (make-local-variable 'comint-error-regexp) (make-local-variable 'comint-output-filter) (make-local-variable 'comint-interrupt-start) (make-local-variable 'comint-handler) (make-local-variable 'comint-update-status) (make-local-variable 'comint-prompt-status) (make-local-variable 'comint-send-queue) (make-local-variable 'comint-end-queue) (make-local-variable 'comint-queue-emptied) (make-local-variable 'comint-output) (make-local-variable 'comint-errorp) (make-local-variable 'comint-status) (make-local-variable 'comint-aborting) (if (or force (not comint-send-queue)) (setq comint-send-queue (list (list nil nil nil 'run "Top Level" nil t nil 0 (cons nil nil))) comint-end-queue comint-send-queue)) (let ((process (get-buffer-process (current-buffer)))) (set-process-filter process 'comint-process-filter) (set-process-sentinel process 'comint-process-sentinel)) (setq mode-line-process 'comint-status)) ;;;%%Input (defun comint-send (process string &optional no-insert wait status message handler after) "Do a send to PROCESS of STRING. Optionally specify NO-INSERT, WAIT, STATUS, MESSAGE, HANDLER and AFTER. Without optional arguments, this is just like process-send-string. If STRING is not a string, then it is assumed to be an elisp function and will be called when encountered in the send queue. The send will be the next one if WAIT, after the last send if AFTER, otherwise it will be put at the end of the queue. If WAIT is non-NIL or on the first send to a busy inferior, the inferior will be interrupted if possible, see comint-interrupt for more information. Once the send is sent, the process status will be STATUS or 'run. Output of the send will be inserted into the process buffer unless NO-INSERT. This function returns a list of \(result . prompt). If WAIT is a string, output will be inserted until one matches the string as a regexp. If WAIT is T, then PROMPT will have the prompt when finished and RESULT will have the output. If PROMPT is a list, then there was an error. If WAIT is not T, then the list returned will change when the send has been sent and is finished. If HANDLER is nil it will be set to comint-handler. If it is T, errors will be ignored. When a send is finished, it calls handler with \(error-p WAIT MESSAGE output prompt) which decides what to do with the output. VARIABLES: comint-always-scroll will cause all process output to be visible. comint-fix-error is the string used to fix errors. comint-continue is the string used to continue after an interrupt. comint-interrupt-regexp is the default regexp to use in finding the start of the interrupt text. comint-error-regexp will set comint-errorp if found in the process output. FUNCTIONS: Each of the functions in these variables is called with the buffer set to the appropriate process buffer and comint-original-buffer bound to the buffer current when the process filter was called. comint-update-status is a function \(status) that is called each time the process status changes. comint-prompt-status is called with the old prompt and the last line. It should return 'error if the last line is an error, T if it is a prompt and nil otherwise. It should also update the process status by funcalling comint-update-status. comint-output-filter is a function \(output) for sends with NO-INSERT. It should return the output string. comint-interrupt-start is a function \(output) that returns the start of the interrupt text in output using comint-interrupt-regexp to find it." (save-excursion (set-buffer (process-buffer process)) (let* ((inhibit-quit t) (send (list string no-insert wait (or status 'run) message (if (eq handler t) nil (or handler comint-handler)) ;; running, old-prompt, line nil nil 0 ;; (output . prompt) (cons nil nil))) (pointer (comint-send-results send)) (top-level (eq comint-send-queue comint-end-queue)) (end (car comint-end-queue)) (current (car comint-send-queue)) (prompt (cdr (comint-send-results current))) (ok nil)) (setq comint-aborting nil) (if (and top-level (or (stringp wait) prompt)) (progn (setq comint-send-queue (cons send comint-send-queue)) (comint-dispatch-send process)) (if (or (and wait (not after) (not prompt)) top-level) (comint-interrupt process send) (let ((looking t) (next comint-send-queue)) (if after (while (and looking next) (if (eq (car next) comint-last-send) (progn (rplacd next (cons send (cdr next))) (setq looking nil))) (setq next (cdr next)))) (if looking (progn (rplaca comint-end-queue send) (setq comint-end-queue (rplacd comint-end-queue (cons end nil)))))))) (setq comint-last-send send) (unwind-protect (let ((inhibit-quit nil)) (if (eq wait t) (while (not (cdr pointer)) (accept-process-output) (sit-for 0))) (setq ok pointer)) (if (not ok) (if (eq send (car comint-send-queue)) (let ((interrupt ;; string no-insert wait status message handler (list nil t nil 'interrupt "Interrupt" nil ;; running old-prompt line (output . prompt) send (car (cdr (comint-send-variables send))) nil (cons nil nil)))) (setq comint-send-queue (cons interrupt (cdr comint-send-queue))) (comint-interrupt-subjob)) (setq comint-send-queue (delq send comint-send-queue)))))))) ;;; (defun comint-send-code (process code) "Execute after the previous send in PROCESS queue CODE. You do not want to execute synchronous sends in the code or it will lock up. " (comint-send process code nil nil nil nil nil t)) ;;; (defun comint-default-send (process string) "Send to PROCESS top-level, STRING." (save-excursion (set-buffer (process-buffer process)) (let* ((top (car comint-end-queue)) (old (car top))) (rplaca (cdr (cdr (cdr (cdr (car comint-end-queue))))) string) (if (eq comint-send-queue comint-end-queue) (progn (funcall comint-update-status 'run) (rplaca (comint-send-variables (car comint-send-queue)) t) (rplacd (comint-send-results (car comint-send-queue)) nil) (comint-sender process string)) (rplaca top (if old (concat old (if comint-send-newline "\n") string) string)))))) ;;; (defun comint-sync (process start start-regexp end end-regexp) "Synchronize with PROCESS output stream. START will be sent with each prompt received until START-REGEXP shows up in the stream. Then END will be sent and all output will be discarded until END-REGEXP shows up in the output stream." (comint-send process start nil start-regexp 'sync "Start sync" (function (lambda (error-p wait message output prompt) (if (not (string-match wait output)) (comint-sender (get-buffer-process (current-buffer)) (car (car comint-send-queue)))) nil))) (comint-send process end t end-regexp 'sync "End sync" (function (lambda (&rest args) nil)))) ;;; (defun comint-abort-sends (&optional process) "Abort all of the pending sends for optional PROCESS and show their messages in *Aborted Commands*." (interactive) (save-excursion (setq process (or process (get-buffer-process (current-buffer)))) (set-buffer (process-buffer process)) (setq comint-aborting t) (if (not (eq comint-send-queue comint-end-queue)) (let* ((inhibit-quit t) (send (car comint-send-queue)) (vars (comint-send-variables send)) (pointer comint-send-queue) (new nil) (interrupt (and (car vars) (not (cdr (comint-send-results send)))))) (if interrupt (progn ;Sent, but no prompt (if (consp (car vars)) (progn (setq new (list send)) (rplaca (cdr (cdr (cdr (cdr (cdr send))))) (function (lambda (&rest args) t)))) (setq new (list (list nil t nil 'interrupt "Interrupt" (function (lambda (&rest args) t)) send (car (cdr (comint-send-variables send))) nil (cons nil nil)))) (comint-interrupt-subjob)))) ;Already interrupting (save-excursion (set-buffer (get-buffer-create "*Aborted Commands*")) (delete-region (point-min) (point-max))) (while (not (eq pointer comint-end-queue)) (let ((send (car pointer))) (if (car (cdr (cdr (cdr (cdr send))))) ;Message (save-excursion (set-buffer "*Aborted Commands*") (insert (comint-send-description send)) (insert "\n\n"))) (if (and comint-fix-error (stringp (car (comint-send-variables send)))) ;; Interrupted (setq new (cons (list comint-fix-error t nil 'fix "Fixing error" nil nil nil 0 (cons nil nil)) new))) (setq pointer (cdr pointer)))) (bury-buffer "*Aborted Commands*") (rplaca (car comint-end-queue) nil) (setq comint-send-queue (reverse (cons (car comint-end-queue) new)) comint-end-queue (let ((pointer comint-send-queue)) (while (cdr pointer) (setq pointer (cdr pointer))) pointer)) (run-hooks 'comint-abort-hook) (if (not interrupt) (comint-dispatch-send process)))))) ;;; (defun comint-current-send (showp) "Show the message of the current send in the minibuffer." (interactive "P") (if showp (with-output-to-temp-buffer comint-output-buffer (let ((send comint-send-queue)) (save-excursion (set-buffer comint-output-buffer) (insert "Pending commands:\n") (while send (let ((message (car (cdr (cdr (cdr (cdr (car send)))))))) (if message (insert (concat message "\n")))) (setq send (cdr send))))))) (message (concat "Command: " (or (comint-send-description (car comint-send-queue)) "Unknown")))) ;;; (defun comint-display-output (text &optional buffer) "Put TEXT in optional BUFFER and show it in a small temporary window." (setq buffer (or buffer comint-output-buffer)) (with-output-to-temp-buffer buffer (save-excursion (set-buffer buffer) (insert text) (set-buffer-modified-p nil))) text) ;; Perhaps this should use ilisp-display-output. ;;; (defun comint-display-error (text) "Put TEXT in the comint-error-buffer and display it." (comint-display-output text comint-error-buffer)) (provide 'comint-ipc) ilisp-5.12.0+cvs.2004.12.26/comint-v18.el0000600000175000001440000011755707556156172016041 0ustar mvelausers;;; -*-Emacs-Lisp-*- General command interpreter in a window stuff ;;; Copyright Olin Shivers (1988). ;;; Please imagine a long, tedious, legalistic 5-page gnu-style copyright ;;; notice appearing here to the effect that you may use this code any ;;; way you like, as long as you don't charge money for it, remove this ;;; notice, or hold me liable for its results. ;;; This hopefully generalises shell mode, lisp mode, tea mode, soar mode,... ;;; Hacked from tea.el and shell.el by Olin Shivers (shivers@cs.cmu.edu). 8/88 ;;; This file defines a general command-interpreter-in-a-buffer package ;;; (comint mode). The idea is that you can build specific process-in-a-buffer ;;; modes on top of comint mode -- e.g., lisp, shell, scheme, T, soar, .... ;;; This way, all these specific packages share a common base functionality, ;;; and a common set of bindings, which makes them easier to use (and ;;; saves code, implementation time, etc., etc.). ;;; ;;; Several packages are already defined using comint mode: ;;; - The file cmushell.el defines cmushell and cmulisp mode. ;;; Cmushell and cmulisp mode are similar to, and intended to replace, ;;; their counterparts in the standard gnu emacs release (in shell.el). ;;; These replacements are more featureful, robust, and uniform than the ;;; released versions. The key bindings in lisp mode are also more compatible ;;; with the bindings of Hemlock and Zwei (the Lisp Machine emacs). ;;; ;;; - The file cmuscheme.el defines inferior-scheme mode. ;;; - The file tea.el tunes scheme and inferior-scheme modes for T. ;;; - The file soar.el tunes lisp and inferior-lisp modes for Soar. ;;; For documentation on the functionality provided by comint mode, and ;;; the hooks available for customising it, see the comments below. ;;; For further information on the standard derived modes (shell, ;;; inferior-lisp, inferior-scheme, ...), see the relevant source files. ;;; Please send me bug reports, bug fixes, and extensions, so that I can ;;; merge them into the master source. ;;; For hints on converting existing process modes (e.g., tex-mode, ;;; background, dbx, gdb, kermit, prolog, telnet) to use comint-mode ;;; instead of shell-mode, see the notes at the end of this file. (provide 'comint) ;;; Brief Command Documentation: ;;;============================================================================ ;;; Comint Mode Commands: (common to all derived modes, like cmushell & cmulisp ;;; mode) ;;; ;;; m-p comint-previous-input Cycle backwards in input history ;;; m-n comint-next-input Cycle forwards ;;; c-c r comint-previous-input-matching Search backwards in input history ;;; return comint-send-input ;;; c-a comint-bol Beginning of line; skip prompt. ;;; c-d comint-delchar-or-maybe-eof Delete char unless at end of buff. ;;; c-c c-u comint-kill-input ^u ;;; c-c c-w backward-kill-word ^w ;;; c-c c-c comint-interrupt-subjob ^c ;;; c-c c-z comint-stop-subjob ^z ;;; c-c c-\ comint-quit-subjob ^\ ;;; c-c c-o comint-kill-output Delete last batch of process output ;;; c-c c-r comint-show-output Show last batch of process output ;;; ;;; Not bound by default in comint-mode ;;; send-invisible Read a line w/o echo, and send to proc ;;; (These are bound in shell-mode) ;;; comint-dynamic-complete Complete filename at point. ;;; comint-dynamic-list-completions List completions in help buffer. ;;; comint-replace-by-expanded-filename Expand and complete filename at point; ;;; replace with expanded/completed name. ;;; comint-kill-subjob No mercy. ;;; comint-continue-subjob Send CONT signal to buffer's process ;;; group. Useful if you accidentally ;;; suspend your process (with C-c C-z). ;;; ;;; Bound for RMS -- I prefer the input history stuff, but you might like 'em. ;;; m-P comint-msearch-input Search backwards for prompt ;;; m-N comint-psearch-input Search forwards for prompt ;;; C-cR comint-msearch-input-matching Search backwards for prompt & string ;;; comint-mode-hook is the comint mode hook. Basically for your keybindings. ;;; comint-load-hook is run after loading in this package. ;;; Buffer Local Variables: ;;;============================================================================ ;;; Comint mode buffer local variables: ;;; comint-prompt-regexp - string comint-bol uses to match prompt. ;;; comint-last-input-end - marker For comint-kill-output command ;;; input-ring-size - integer For the input history ;;; input-ring - ring mechanism ;;; input-ring-index - marker ... ;;; comint-last-input-match - string ... ;;; comint-get-old-input - function Hooks for specific ;;; comint-input-sentinel - function process-in-a-buffer ;;; comint-input-filter - function modes. (defvar comint-prompt-regexp "^" "Regexp to recognise prompts in the inferior process. Defaults to \"^\", the null string at BOL. Good choices: Canonical Lisp: \"^[^> ]*>+:? *\" (Lucid, franz, kcl, T, cscheme, oaklisp) Lucid Common Lisp: \"^\\(>\\|\\(->\\)+\\) *\" franz: \"^\\(->\\|<[0-9]*>:\\) *\" kcl: \"^>+ *\" shell: \"^[^#$%>]*[#$%>] *\" T: \"^>+ *\" This is a good thing to set in mode hooks.") (defvar input-ring-size 30 "Size of input history ring.") ;;; Here are the per-interpreter hooks. (defvar comint-get-old-input (function comint-get-old-input-default) "Function that submits old text in comint mode. This function is called when return is typed while the point is in old text. It returns the text to be submitted as process input. The default is comint-get-old-input-default, which grabs the current line, and strips off leading text matching comint-prompt-regexp") (defvar comint-input-sentinel (function ignore) "Called on each input submitted to comint mode process by comint-send-input. Thus it can, for instance, track cd/pushd/popd commands issued to the csh.") (defvar comint-input-filter (function (lambda (str) (not (string-match "\\`\\s *\\'" str)))) "Predicate for filtering additions to input history. Only inputs answering true to this function are saved on the input history list. Default is to save anything that isn't all whitespace") (defvar comint-mode-hook '() "Called upon entry into comint-mode") (defvar comint-mode-map nil) ;; Added for ILISP (defvar comint-input-chunk-size 512) (defun comint-mode () "Major mode for interacting with an inferior interpreter. Interpreter name is same as buffer name, sans the asterisks. Return at end of buffer sends line as input. Return not at end copies rest of line to end and sends it. This mode is typically customised to create inferior-lisp-mode, shell-mode, etc.. This can be done by setting the hooks comint-input-sentinel, comint-input-filter, and comint-get-old-input to appropriate functions, and the variable comint-prompt-regexp to the appropriate regular expression. An input history is maintained of size input-ring-size, and can be accessed with the commands comint-next-input [\\[comint-next-input]] and comint-previous-input [\\[comint-previous-input]]. Commands not keybound by default are send-invisible, comint-dynamic-complete, and comint-list-dynamic-completions. \\{comint-mode-map} If you accidentally suspend your process, use \\[comint-continue-subjob] to continue it. Entry to this mode runs the hooks on comint-mode-hook" (interactive) (let ((old-ring (and (assq 'input-ring (buffer-local-variables)) (boundp 'input-ring) input-ring))) (kill-all-local-variables) (setq major-mode 'comint-mode) (setq mode-name "Comint") (setq mode-line-process '(": %s")) (use-local-map comint-mode-map) (make-local-variable 'comint-last-input-end) (setq comint-last-input-end (make-marker)) (make-local-variable 'comint-last-input-match) (setq comint-last-input-match "") (make-variable-buffer-local 'comint-prompt-regexp) ; Don't set; default (make-variable-buffer-local 'input-ring-size) ; ...to global val. (make-local-variable 'input-ring) (make-local-variable 'input-ring-index) (setq input-ring-index 0) (make-variable-buffer-local 'comint-get-old-input) (make-variable-buffer-local 'comint-input-sentinel) (make-variable-buffer-local 'comint-input-filter) (run-hooks 'comint-mode-hook) ;Do this after the hook so the user can mung INPUT-RING-SIZE w/his hook. ;The test is so we don't lose history if we run comint-mode twice in ;a buffer. (setq input-ring (if (ring-p old-ring) old-ring (make-ring input-ring-size))))) (if comint-mode-map nil (setq comint-mode-map (make-sparse-keymap)) (define-key comint-mode-map "\ep" 'comint-previous-input) (define-key comint-mode-map "\en" 'comint-next-input) (define-key comint-mode-map "\C-m" 'comint-send-input) (define-key comint-mode-map "\C-d" 'comint-delchar-or-maybe-eof) (define-key comint-mode-map "\C-a" 'comint-bol) (define-key comint-mode-map "\C-c\C-u" 'comint-kill-input) (define-key comint-mode-map "\C-c\C-w" 'backward-kill-word) (define-key comint-mode-map "\C-c\C-c" 'comint-interrupt-subjob) (define-key comint-mode-map "\C-c\C-z" 'comint-stop-subjob) (define-key comint-mode-map "\C-c\C-\\" 'comint-quit-subjob) (define-key comint-mode-map "\C-c\C-o" 'comint-kill-output) (define-key comint-mode-map "\C-cr" 'comint-previous-input-matching) (define-key comint-mode-map "\C-c\C-r" 'comint-show-output) ;;; Here's the prompt-search stuff I installed for RMS to try... (define-key comint-mode-map "\eP" 'comint-msearch-input) (define-key comint-mode-map "\eN" 'comint-psearch-input) (define-key comint-mode-map "\C-cR" 'comint-msearch-input-matching)) ;;; This function is used to make a full copy of the comint mode map, ;;; so that client modes won't interfere with each other. This function ;;; isn't necessary in emacs 18.5x, but we keep it around for 18.4x versions. (defun full-copy-sparse-keymap (km) "Recursively copy the sparse keymap KM" (cond ((consp km) (cons (full-copy-sparse-keymap (car km)) (full-copy-sparse-keymap (cdr km)))) (t km))) (defun comint-check-proc (buffer-name) "True if there is a process associated w/buffer BUFFER-NAME, and it is alive (status RUN or STOP)." (let ((proc (get-buffer-process buffer-name))) (and proc (memq (process-status proc) '(run stop))))) ;;; Note that this guy, unlike shell.el's make-shell, barfs if you pass it () ;;; for the second argument (program). (defun make-comint (name program &optional startfile &rest switches) (let* ((buffer (get-buffer-create (concat "*" name "*"))) (proc (get-buffer-process buffer))) ;; If no process, or nuked process, crank up a new one and put buffer in ;; comint mode. Otherwise, leave buffer and existing process alone. (cond ((or (not proc) (not (memq (process-status proc) '(run stop)))) (comint-exec buffer name program startfile switches) (save-excursion (set-buffer buffer) (comint-mode)))) ; Install local vars, mode, keymap, ... buffer)) (defun comint-exec (buffer name command startfile switches) "Fires up a process in buffer for comint modes. Blasts any old process running in the buffer. Doesn't set the buffer mode. You can use this to cheaply run a series of processes in the same comint buffer." (save-excursion (set-buffer buffer) (let ((proc (get-buffer-process buffer))) ; Blast any old process. (if proc (delete-process proc))) ;; Crank up a new process (let ((proc (apply 'start-process name buffer (concat exec-directory "env") (format "TERMCAP=emacs:co#%d:tc=unknown:" (screen-width)) "TERM=emacs" "EMACS=t" "-" command switches))) ;; Feed it the startfile. (cond (startfile ;;This is guaranteed to wait long enough ;;but has bad results if the comint does not prompt at all ;; (while (= size (buffer-size)) ;; (sleep-for 1)) ;;I hope 1 second is enough! (sleep-for 1) (goto-char (point-max)) (insert-file-contents startfile) (setq startfile (buffer-substring (point) (point-max))) (delete-region (point) (point-max)) (process-send-string proc startfile))) ;; Jump to the end, and set the process mark. (goto-char (point-max)) (set-marker (process-mark proc) (point))) buffer)) ;;; Ring Code ;;;============================================================================ ;;; This code defines a ring data structure. A ring is a ;;; (hd-index tl-index . vector) ;;; list. You can insert to, remove from, and rotate a ring. When the ring ;;; fills up, insertions cause the oldest elts to be quietly dropped. ;;; ;;; HEAD = index of the newest item on the ring. ;;; TAIL = index of the oldest item on the ring. ;;; ;;; These functions are used by the input history mechanism, but they can ;;; be used for other purposes as well. (defun ring-p (x) "T if X is a ring; NIL otherwise." (and (consp x) (integerp (car x)) (consp (cdr x)) (integerp (car (cdr x))) (vectorp (cdr (cdr x))))) (defun make-ring (size) "Make a ring that can contain SIZE elts" (cons 1 (cons 0 (make-vector (+ size 1) nil)))) (defun ring-plus1 (index veclen) "INDEX+1, with wraparound" (let ((new-index (+ index 1))) (if (= new-index veclen) 0 new-index))) (defun ring-minus1 (index veclen) "INDEX-1, with wraparound" (- (if (= 0 index) veclen index) 1)) (defun ring-length (ring) (let ((hd (car ring)) (tl (car (cdr ring))) (siz (length (cdr (cdr ring))))) (let ((len (if (<= hd tl) (+ 1 (- tl hd)) (+ 1 tl (- siz hd))))) (if (= len siz) 0 len)))) (defun ring-empty-p (ring) (= 0 (ring-length ring))) (defun ring-insert (ring item) "Insert a new item onto the ring. If the ring is full, dump the oldest item to make room." (let* ((vec (cdr (cdr ring))) (len (length vec)) (new-hd (ring-minus1 (car ring) len))) (setcar ring new-hd) (aset vec new-hd item) (if (ring-empty-p ring) ;overflow -- dump one off the tail. (setcar (cdr ring) (ring-minus1 (car (cdr ring)) len))))) (defun ring-remove (ring) "Remove the oldest item retained on the ring." (if (ring-empty-p ring) (error "Ring empty") (let ((tl (car (cdr ring))) (vec (cdr (cdr ring)))) (set-car (cdr ring) (ring-minus1 tl (length vec))) (aref vec tl)))) ;;; This isn't actually used in this package. I just threw it in in case ;;; someone else wanted it. If you want rotating-ring behavior on your history ;;; retrieval (analagous to kill ring behavior), this function is what you ;;; need. I should write the yank-input and yank-pop-input-or-kill to go with ;;; this, and not bind it to a key by default, so it would be available to ;;; people who want to bind it to a key. But who would want it? Blech. (defun ring-rotate (ring n) (if (not (= n 0)) (if (ring-empty-p ring) ;Is this the right error check? (error "ring empty") (let ((hd (car ring)) (tl (car (cdr ring))) (vec (cdr (cdr ring)))) (let ((len (length vec))) (while (> n 0) (setq tl (ring-plus1 tl len)) (aset ring tl (aref ring hd)) (setq hd (ring-plus1 hd len)) (setq n (- n 1))) (while (< n 0) (setq hd (ring-minus1 hd len)) (aset vec hd (aref vec tl)) (setq tl (ring-minus1 tl len)) (setq n (- n 1)))) (set-car ring hd) (set-car (cdr ring) tl))))) (defun comint-mod (n m) "Returns N mod M. M is positive. Answer is guaranteed to be non-negative, and less than m." (let ((n (% n m))) (if (>= n 0) n (+ n (if (>= m 0) m (- m)))))) ; (abs m) (defun ring-ref (ring index) (let ((numelts (ring-length ring))) (if (= numelts 0) (error "indexed empty ring") (let* ((hd (car ring)) (tl (car (cdr ring))) (vec (cdr (cdr ring))) (index (comint-mod index numelts)) (vec-index (comint-mod (+ index hd) (length vec)))) (aref vec vec-index))))) ;;; Input history retrieval commands ;;; M-p -- previous input M-n -- next input ;;; C-c r -- previous input matching ;;; =========================================================================== (defun comint-previous-input (arg) "Cycle backwards through input history." (interactive "*p") (let ((len (ring-length input-ring))) (cond ((<= len 0) (message "Empty input ring") (ding)) ((not (comint-after-pmark-p)) (message "Not after process mark") (ding)) (t (cond ((eq last-command 'comint-previous-input) (delete-region (mark) (point)) (set-mark (point))) (t (setq input-ring-index (if (> arg 0) -1 (if (< arg 0) 1 0))) (push-mark (point)))) (setq input-ring-index (comint-mod (+ input-ring-index arg) len)) (message "%d" (1+ input-ring-index)) (insert (ring-ref input-ring input-ring-index)) (setq this-command 'comint-previous-input)) (t (ding))))) (defun comint-next-input (arg) "Cycle forwards through input history." (interactive "*p") (comint-previous-input (- arg))) (defvar comint-last-input-match "" "Last string searched for by comint input history search, for defaulting. Buffer local variable.") (defun comint-previous-input-matching (str) "Searches backwards through input history for substring match" (interactive (let ((s (read-from-minibuffer (format "Command substring (default %s): " comint-last-input-match)))) (list (if (string= s "") comint-last-input-match s)))) ; (interactive "sCommand substring: ") (setq comint-last-input-match str) ; update default (let ((str (regexp-quote str)) (len (ring-length input-ring)) (n 0)) (while (and (<= n len) (not (string-match str (ring-ref input-ring n)))) (setq n (+ n 1))) (cond ((<= n len) (comint-previous-input (+ n 1))) (t (error "Not found."))))) ;;; These next three commands are alternatives to the input history commands -- ;;; comint-next-input, comint-previous-input and ;;; comint-previous-input-matching. They search through the process buffer ;;; text looking for occurrences of the prompt. RMS likes them better; ;;; I don't. Bound to M-P, M-N, and C-c R (uppercase P, N, and R) for ;;; now. Try'em out. Go with what you like... ;;; comint-msearch-input-matching prompts for a string, not a regexp. ;;; This could be considered to be the wrong thing. I decided to keep it ;;; simple, and not make the user worry about regexps. This, of course, ;;; limits functionality. (defun comint-psearch-input () "Search forwards for next occurrence of prompt and skip to end of line. \(prompt is anything matching regexp comint-prompt-regexp)" (interactive) (if (re-search-forward comint-prompt-regexp (point-max) t) (end-of-line) (error "No occurrence of prompt found"))) (defun comint-msearch-input () "Search backwards for previous occurrence of prompt and skip to end of line. Search starts from beginning of current line." (interactive) (let ((p (save-excursion (beginning-of-line) (cond ((re-search-backward comint-prompt-regexp (point-min) t) (end-of-line) (point)) (t nil))))) (if p (goto-char p) (error "No occurrence of prompt found")))) (defun comint-msearch-input-matching (str) "Search backwards for occurrence of prompt followed by STRING. STRING is prompted for, and is NOT a regular expression." (interactive (let ((s (read-from-minibuffer (format "Command (default %s): " comint-last-input-match)))) (list (if (string= s "") comint-last-input-match s)))) ; (interactive "sCommand: ") (setq comint-last-input-match str) ; update default (let* ((r (concat comint-prompt-regexp (regexp-quote str))) (p (save-excursion (beginning-of-line) (cond ((re-search-backward r (point-min) t) (end-of-line) (point)) (t nil))))) (if p (goto-char p) (error "No match")))) (defun comint-send-input () "Send input to process. After the process output mark, sends all text from the process mark to point as input to the process. Before the process output mark, calls value of variable comint-get-old-input to retrieve old input, copies it to the end of the buffer, and sends it. A terminal newline is also inserted into the buffer and sent to the process. In either case, value of variable comint-input-sentinel is called on the input before sending it. The input is entered into the input history ring, if value of variable comint-input-filter returns T when called on the input. comint-get-old-input, comint-input-sentinel, and comint-input-filter are chosen according to the command interpreter running in the buffer. E.g., If the interpreter is the csh, comint-get-old-input is the default: take the current line, discard any initial string matching regexp comint-prompt-regexp. comint-input-sentinel monitors input for \"cd\", \"pushd\", and \"popd\" commands. When it sees one, it cd's the buffer. comint-input-filter is the default: returns T if the input isn't all white space. If the comint is Lucid Common Lisp, comint-get-old-input snarfs the sexp ending at point. comint-input-sentinel does nothing. comint-input-filter returns NIL if the input matches input-filter-regexp, which matches (1) all whitespace (2) :a, :c, etc. Similarly for Soar, Scheme, etc.." (interactive) ;; Note that the input string does not include its terminal newline. (let ((proc (get-buffer-process (current-buffer)))) (if (not proc) (error "Current buffer has no process") (let* ((pmark (process-mark proc)) (pmark-val (marker-position pmark)) (input (if (>= (point) pmark-val) (buffer-substring pmark (point)) (let ((copy (funcall comint-get-old-input))) (goto-char pmark) (insert copy) copy)))) (insert ?\n) (if (funcall comint-input-filter input) (ring-insert input-ring input)) (funcall comint-input-sentinel input) (process-send-string proc input) (process-send-string proc "\n") (set-marker (process-mark proc) (point)) (set-marker comint-last-input-end (point)))))) (defun comint-get-old-input-default () "Default for comint-get-old-input: take the current line, and discard any initial text matching comint-prompt-regexp." (save-excursion (beginning-of-line) (comint-skip-prompt) (let ((beg (point))) (end-of-line) (buffer-substring beg (point))))) (defun comint-skip-prompt () "Skip past the text matching regexp comint-prompt-regexp. If this takes us past the end of the current line, don't skip at all." (let ((eol (save-excursion (end-of-line) (point)))) (if (and (looking-at comint-prompt-regexp) (<= (match-end 0) eol)) (goto-char (match-end 0))))) (defun comint-after-pmark-p () "Is point after the process output marker?" ;; Since output could come into the buffer after we looked at the point ;; but before we looked at the process marker's value, we explicitly ;; serialise. This is just because I don't know whether or not emacs ;; services input during execution of lisp commands. (let ((proc-pos (marker-position (process-mark (get-buffer-process (current-buffer)))))) (<= proc-pos (point)))) (defun comint-bol (arg) "Goes to the beginning of line, then skips past the prompt, if any. If a prefix argument is given (\\[universal-argument]), then no prompt skip -- go straight to column 0. The prompt skip is done by skipping text matching the regular expression comint-prompt-regexp, a buffer local variable. If you don't like this command, reset c-a to beginning-of-line in your hook, comint-mode-hook." (interactive "P") (beginning-of-line) (if (null arg) (comint-skip-prompt))) ;;; These two functions are for entering text you don't want echoed or ;;; saved -- typically passwords to ftp, telnet, or somesuch. ;;; Just enter m-x send-invisible and type in your line. (defun comint-read-noecho (prompt) "Prompt the user with argument PROMPT. Read a single line of text without echoing, and return it. Note that the keystrokes comprising the text can still be recovered (temporarily) with \\[view-lossage]. This may be a security bug for some applications." (let ((echo-keystrokes 0) (answ "") tem) (if (and (stringp prompt) (not (string= (message prompt) ""))) (message prompt)) (while (not(or (= (setq tem (read-char)) ?\^m) (= tem ?\n))) (setq answ (concat answ (char-to-string tem)))) (message "") answ)) (defun send-invisible (str) "Read a string without echoing, and send it to the process running in the current buffer. A new-line is additionally sent. String is not saved on comint input history list. Security bug: your string can still be temporarily recovered with \\[view-lossage]." ; (interactive (list (comint-read-noecho "Enter non-echoed text"))) (interactive "P") ; Defeat snooping via C-x esc (let ((proc (get-buffer-process (current-buffer)))) (if (not proc) (error "Current buffer has no process") (process-send-string proc (if (stringp str) str (comint-read-noecho "Enter non-echoed text"))) (process-send-string proc "\n")))) ;;; Random input hackage (defun comint-kill-output () "Kill all output from interpreter since last input." (interactive) (let ((pmark (process-mark (get-buffer-process (current-buffer))))) (kill-region comint-last-input-end pmark) (goto-char pmark) (insert "*** output flushed ***\n") (set-marker pmark (point)))) (defun comint-show-output () "Display start of this batch of interpreter output at top of window. Also put cursor there." (interactive) (goto-char comint-last-input-end) (backward-char) (beginning-of-line) (set-window-start (selected-window) (point)) (end-of-line)) (defun comint-interrupt-subjob () "Interrupt the current subjob." (interactive) (interrupt-process nil t)) (defun comint-kill-subjob () "Send kill signal to the current subjob." (interactive) (kill-process nil t)) (defun comint-quit-subjob () "Send quit signal to the current subjob." (interactive) (quit-process nil t)) (defun comint-stop-subjob () "Stop the current subjob. WARNING: if there is no current subjob, you can end up suspending the top-level process running in the buffer. If you accidentally do this, use \\[comint-continue-subjob] to resume the process. (This is not a problem with most shells, since they ignore this signal.)" (interactive) (stop-process nil t)) (defun comint-continue-subjob () "Send CONT signal to process buffer's process group. Useful if you accidentally suspend the top-level process." (interactive) (continue-process nil t)) (defun comint-kill-input () "Kill all text from last stuff output by interpreter to point." (interactive) (let* ((pmark (process-mark (get-buffer-process (current-buffer)))) (p-pos (marker-position pmark))) (if (> (point) p-pos) (kill-region pmark (point))))) (defun comint-delchar-or-maybe-eof (arg) "Delete ARG characters forward, or send an EOF to lisp if at end of buffer." (interactive "p") (if (eobp) (process-send-eof) (delete-char arg))) ;;; Support for source-file processing commands. ;;;============================================================================ ;;; Many command-interpreters (e.g., Lisp, Scheme, Soar) have ;;; commands that process files of source text (e.g. loading or compiling ;;; files). So the corresponding process-in-a-buffer modes have commands ;;; for doing this (e.g., lisp-load-file). The functions below are useful ;;; for defining these commands. ;;; ;;; Alas, these guys don't do exactly the right thing for Lisp, Scheme ;;; and Soar, in that they don't know anything about file extensions. ;;; So the compile/load interface gets the wrong default occasionally. ;;; The load-file/compile-file default mechanism could be smarter -- it ;;; doesn't know about the relationship between filename extensions and ;;; whether the file is source or executable. If you compile foo.lisp ;;; with compile-file, then the next load-file should use foo.bin for ;;; the default, not foo.lisp. This is tricky to do right, particularly ;;; because the extension for executable files varies so much (.o, .bin, ;;; .lbin, .mo, .vo, .ao, ...). ;;; COMINT-SOURCE-DEFAULT -- determines defaults for source-file processing ;;; commands. ;;; ;;; COMINT-CHECK-SOURCE -- if FNAME is in a modified buffer, asks you if you ;;; want to save the buffer before issuing any process requests to the command ;;; interpreter. ;;; ;;; COMINT-GET-SOURCE -- used by the source-file processing commands to prompt ;;; for the file to process. ;;; (COMINT-SOURCE-DEFAULT previous-dir/file source-modes) ;;;============================================================================ ;;; This function computes the defaults for the load-file and compile-file ;;; commands for tea, soar, cmulisp, and cmuscheme modes. ;;; ;;; - PREVIOUS-DIR/FILE is a pair (directory . filename) from the last ;;; source-file processing command. NIL if there hasn't been one yet. ;;; - SOURCE-MODES is a list used to determine what buffers contain source ;;; files: if the major mode of the buffer is in SOURCE-MODES, it's source. ;;; Typically, (lisp-mode) or (scheme-mode). ;;; ;;; If the command is given in a file buffer whose major modes is in ;;; SOURCE-MODES, then the the filename is the default file, and the ;;; file's directory is the default directory. ;;; ;;; If the buffer isn't a source file buffer (e.g., it's the process buffer), ;;; then the default directory & file are what was used in the last source-file ;;; processing command (i.e., PREVIOUS-DIR/FILE). If this is the first time ;;; the command has been run (PREVIOUS-DIR/FILE is nil), the default directory ;;; is the cwd, with no default file. (\"no default file\" = nil) ;;; ;;; SOURCE-REGEXP is typically going to be something like (tea-mode) ;;; for T programs, (lisp-mode) for Lisp programs, (soar-mode lisp-mode) ;;; for Soar programs, etc. ;;; ;;; The function returns a pair: (default-directory . default-file). (defun comint-source-default (previous-dir/file source-modes) (cond ((and buffer-file-name (memq major-mode source-modes)) (cons (file-name-directory buffer-file-name) (file-name-nondirectory buffer-file-name))) (previous-dir/file) (t (cons default-directory nil)))) ;;; (COMINT-CHECK-SOURCE fname) ;;;============================================================================ ;;; Prior to loading or compiling (or otherwise processing) a file (in the CMU ;;; process-in-a-buffer modes), this function can be called on the filename. ;;; If the file is loaded into a buffer, and the buffer is modified, the user ;;; is queried to see if he wants to save the buffer before proceeding with ;;; the load or compile. (defun comint-check-source (fname) (let ((buff (get-file-buffer fname))) (if (and buff (buffer-modified-p buff) (y-or-n-p (format "Save buffer %s first? " (buffer-name buff)))) ;; save BUFF. (let ((old-buffer (current-buffer))) (set-buffer buff) (save-buffer) (set-buffer old-buffer))))) ;;; (COMINT-GET-SOURCE prompt prev-dir/file source-modes mustmatch-p) ;;;============================================================================ ;;; COMINT-GET-SOURCE is used to prompt for filenames in command-interpreter ;;; commands that process source files (like loading or compiling a file). ;;; It prompts for the filename, provides a default, if there is one, ;;; and returns the result filename. ;;; ;;; See COMINT-SOURCE-DEFAULT for more on determining defaults. ;;; ;;; PROMPT is the prompt string. PREV-DIR/FILE is the (directory . file) pair ;;; from the last source processing command. SOURCE-MODES is a list of major ;;; modes used to determine what file buffers contain source files. (These ;;; two arguments are used for determining defaults). If MUSTMATCH-P is true, ;;; then the filename reader will only accept a file that exists. ;;; ;;; A typical use: ;;; (interactive (comint-get-source "Compile file: " prev-lisp-dir/file ;;; "\\.lisp\\'" t)) (defun comint-get-source (prompt prev-dir/file source-regexp mustmatch-p) (let* ((def (comint-source-default prev-dir/file source-regexp)) (defdir (car def)) (deffile (cdr def)) (ans (read-file-name (if deffile (format "%s(default %s) " prompt deffile) prompt) defdir (concat defdir deffile) mustmatch-p))) (list (expand-file-name (substitute-in-file-name ans))))) ;;; Filename completion in a buffer ;;; =========================================================================== ;;; Useful completion functions, courtesy of the Ergo group. ;;; M- will complete the filename at the cursor as much as possible ;;; M-? will display a list of completions in the help buffer. ;;; Three commands: ;;; comint-dynamic-complete Complete filename at point. ;;; comint-dynamic-list-completions List completions in help buffer. ;;; comint-replace-by-expanded-filename Expand and complete filename at point; ;;; replace with expanded/completed name. ;;; These are not installed in the comint-mode keymap. But they are ;;; available for people who want them. Shell-mode installs them: ;;; (define-key cmushell-mode-map "\M-\t" 'comint-dynamic-complete) ;;; (define-key cmushell-mode-map "\M-?" 'comint-dynamic-list-completions))) ;;; ;;; Commands like this are fine things to put in load hooks if you ;;; want them present in specific modes. Example: ;;; (setq cmushell-load-hook ;;; '((lambda () (define-key lisp-mode-map "\M-\t" ;;; 'comint-replace-by-expanded-filename)))) ;;; (defun comint-match-partial-pathname () "Returns the string of an existing filename or causes and error." (if (save-excursion (backward-char 1) (looking-at "\\s ")) "" (save-excursion (re-search-backward "[^~/A-Za-z0-9---_.$#,]+") (re-search-forward "[~/A-Za-z0-9---_.$#,]+") (substitute-in-file-name (buffer-substring (match-beginning 0) (match-end 0)))))) (defun comint-replace-by-expanded-filename () "Replace filename at point with expanded, completed name" (interactive) (let* ((pathname (comint-match-partial-pathname)) (pathdir (file-name-directory pathname)) (pathnondir (file-name-nondirectory pathname)) (completion (file-name-completion pathnondir (or pathdir default-directory)))) (cond ((null completion) (message "No completions of %s." pathname) (ding)) ((eql completion t) (message "Unique completion.")) (t ; this means a string was returned. (delete-region (match-beginning 0) (match-end 0)) (insert pathdir completion))))) (defun comint-dynamic-complete () "Dynamically complete the filename at point." (interactive) (let* ((pathname (comint-match-partial-pathname)) (pathdir (file-name-directory pathname)) (pathnondir (file-name-nondirectory pathname)) (completion (file-name-completion pathnondir (or pathdir default-directory)))) (cond ((null completion) (message "No completions of %s." pathname) (ding)) ((eql completion t) (message "Unique completion.")) (t ; this means a string was returned. (insert (substring completion (length pathnondir))))))) (defun comint-dynamic-list-completions () "List in help buffer all possible completions of the filename at point." (interactive) (let* ((pathname (comint-match-partial-pathname)) (pathdir (file-name-directory pathname)) (pathnondir (file-name-nondirectory pathname)) (completions (file-name-all-completions pathnondir (or pathdir default-directory)))) (cond ((null completions) (message "No completions of %s." pathname) (ding)) (t (with-output-to-temp-buffer "*Help*" (display-completion-list completions)))))) ; Ergo bindings ; (global-set-key "\M-\t" 'comint-replace-by-expanded-filename) ; (global-set-key "\M-?" 'comint-dynamic-list-completions) ; (define-key shell-mode-map "\M-\t" 'comint-dynamic-complete) ;;; Log the user, so I know who's using the package during the beta test ;;; period. This just inserts the user's name and current time into a ;;; central file. (defun comint-log-user () (interactive) (if (file-writable-p "/afs/cs/user/shivers/lib/emacs/logdir/comint.log") (let ((u (getenv "USER")) (old-buff (current-buffer))) (message "logging user in beta test database...") (find-file "/afs/cs/user/shivers/lib/emacs/logdir/comint.log") (cond ((search-forward u nil 'to-end) (search-forward "| ") (kill-line 1)) (t (insert (format "%s\t%s\t| " u (current-time-string))))) (insert (format "%s\n" (current-time-string))) (let ((make-backup-files nil)) (save-buffer)) (kill-buffer (current-buffer)) (set-buffer old-buff)))) (comint-log-user) ;;; Converting process modes to use comint mode ;;; =========================================================================== ;;; Several gnu packages (tex-mode, background, dbx, gdb, kermit, prolog, ;;; telnet are some) use the shell package as clients. Most of them would ;;; be better off using the comint package, but they predate it. ;;; ;;; Altering these packages to use comint mode should greatly ;;; improve their functionality, and is fairly easy. ;;; ;;; Renaming variables ;;; Most of the work is renaming variables and functions. These are the common ;;; ones: ;;; Local variables: ;;; last-input-end comint-last-input-end ;;; last-input-start ;;; shell-prompt-pattern comint-prompt-regexp ;;; shell-set-directory-error-hook ;;; Miscellaneous: ;;; shell-set-directory ;;; shell-mode-map comint-mode-map ;;; Commands: ;;; shell-send-input comint-send-input ;;; shell-send-eof comint-delchar-or-maybe-eof ;;; kill-shell-input comint-kill-input ;;; interrupt-shell-subjob comint-interrupt-subjob ;;; stop-shell-subjob comint-stop-subjob ;;; quit-shell-subjob comint-quit-subjob ;;; kill-shell-subjob comint-kill-subjob ;;; kill-output-from-shell comint-kill-output ;;; show-output-from-shell comint-show-output ;;; copy-last-shell-input Use comint-previous-input/comint-next-input ;;; ;;; LAST-INPUT-START is no longer necessary because inputs are stored on the ;;; input history ring. SHELL-SET-DIRECTORY is gone, its functionality taken ;;; over by SHELL-DIRECTORY-TRACKER, the shell mode's comint-input-sentinel. ;;; Comint mode does not provide functionality equivalent to ;;; shell-set-directory-error-hook; it is gone. ;;; ;;; If you are implementing some process-in-a-buffer mode, called foo-mode, do ;;; *not* create the comint-mode local variables in your foo-mode function. ;;; This is not modular. Instead, call comint-mode, and let *it* create the ;;; necessary comint-specific local variables. Then create the ;;; foo-mode-specific local variables in foo-mode. Set the buffer's keymap to ;;; be foo-mode-map, and it's mode to be foo-mode. Set the comint-mode hooks ;;; (comint-prompt-regexp, comint-input-filter, comint-input-sentinel, ;;; comint-get-old-input) that need to be different from the defaults. Call ;;; foo-mode-hook, and you're done. Don't run the comint-mode hook yourself; ;;; comint-mode will take care of it. The following example, from cmushell.el, ;;; is typical: ;;; ;;; (defun shell-mode () ;;; (interactive) ;;; (comint-mode) ;;; (setq comint-prompt-regexp shell-prompt-pattern) ;;; (setq major-mode 'shell-mode) ;;; (setq mode-name "Shell") ;;; (cond ((not shell-mode-map) ;;; (setq shell-mode-map (full-copy-sparse-keymap comint-mode-map)) ;;; (define-key shell-mode-map "\M-\t" 'comint-dynamic-complete) ;;; (define-key shell-mode-map "\M-?" ;;; 'comint-dynamic-list-completions))) ;;; (use-local-map shell-mode-map) ;;; (make-local-variable 'shell-directory-stack) ;;; (setq shell-directory-stack nil) ;;; (setq comint-input-sentinel 'shell-directory-tracker) ;;; (run-hooks 'shell-mode-hook)) ;;; ;;; ;;; Note that make-comint is different from make-shell in that it ;;; doesn't have a default program argument. If you give make-shell ;;; a program name of NIL, it cleverly chooses one of explicit-shell-name, ;;; $ESHELL, $SHELL, or /bin/sh. If you give make-comint a program argument ;;; of NIL, it barfs. Adjust your code accordingly... ;;; ;;; Do the user's customisation... (defvar comint-load-hook nil "This hook is run when comint is loaded in. This is a good place to put keybindings.") (run-hooks 'comint-load-hook) ilisp-5.12.0+cvs.2004.12.26/completer.el0000600000175000001440000011604407731123411016075 0ustar mvelausers;;; -*- Mode: Emacs-Lisp -*- ;;;%Header ;;; ;;; Rcs_Info: completer.el,v 3.23 1993/09/03 02:05:07 ivan Rel $ ;;; ;;; Partial completion mechanism for GNU Emacs and XEmacs. Version 3.05 ;;; Copyright (C) 1990, 1991, 1992 Chris McConnell, ccm@cs.cmu.edu. ;;; Copyright (C) 2000 Ben Wing. ;;; Copyright (C) 2002 Marco Antoniotti and the ILISP Maintainers ;;; ;;; Author: Chris Mcconnell ;;; Latest XEmacs Author: Ben Wing ;;; Maintainer: The ILISP Maintainers ;;; Keywords: minibuffer, completion ;;; Thanks to Bjorn Victor for suggestions, testing, and patches for ;;; file completion. ;;; This file should be part of GNU Emacs and XEmacs. ;;; GNU Emacs and XEmacs are distributed in the hope that they will be useful, ;;; but WITHOUT ANY WARRANTY. No author or distributor ;;; accepts responsibility to anyone for the consequences of using it ;;; or for whether it serves any particular purpose or works at all, ;;; unless he says so in writing. Refer to the GNU Emacs General Public ;;; License for full details. ;;; Everyone is granted permission to copy, modify and redistribute ;;; GNU Emacs and XEmacs, but only under the conditions described in the ;;; GNU Emacs and XEmacs General Public License. A copy of this license is ;;; supposed to have been given to you along with GNU Emacs or XEmacs so you ;;; can know your rights and responsibilities. It should be in a ;;; file named COPYING. Among other things, the copyright notice ;;; and this notice must be preserved on all copies. ;;; When loaded, this file extends the standard completion mechanisms ;;; so that they perform pattern matching completions. There is also ;;; an interface that allows it to be used by other programs. The ;;; completion rules are: ;;; ;;; 1) If what has been typed matches any possibility, do normal ;;; completion. ;;; ;;; 2) Otherwise, generate a regular expression such that ;;; completer-words delimit words and generate all possible matches. ;;; The variable completer-any-delimiter can be set to a character ;;; that matches any delimiter. If it were " ", then "by d" would be ;;; byte-recompile-directory. If completer-use-words is T, a match is ;;; unique if it is the only one with the same number of words. If ;;; completer-use-words is NIL, a match is unique if it is the only ;;; possibility. If you ask the completer to use its best guess, it ;;; will be the shortest match of the possibilities unless ;;; completer-exact is T. ;;; ;;; 3) For filenames, if completer-complete-filenames is T, each ;;; pathname component will be individually completed, otherwise only ;;; the final component will be completed. If you are using a ;;; distributed file system like afs, you may want to set up a ;;; symbolic link in your home directory or add pathname components to ;;; completer-file-skip so that the pathname components that go across ;;; machines do not get expanded. ;;; ;;; SPACE, TAB, LFD, RET, and ? do normal completion if possible ;;; otherwise they do partial completion. In addition, C-DEL will ;;; undo the last partial expansion or contraction. M-RET will always ;;; complete to the current match before returning. This is useful ;;; when any string is possible, but you want to complete to a string ;;; as when calling find-file. The bindings can be changed by using ;;; completer-load-hook. ;;; ;;; Modes that use comint-dynamic-complete (like cmushell and ilisp) ;;; will also do partial completion as will M-tab in Emacs LISP. ;;; ;;; Examples: ;;; a-f auto-fill-mode ;;; b--d *beginning-of-defun or byte-recompile-directory ;;; by d *byte-recompile-directory if completer-any-delimiter is " " ;;; ~/i.e *~/ilisp.el or ~/il-el.el or ~/ilisp.elc ;;; /u/mi/ /usr/misc/ ;;; (require 'cl) ;; Necessary when loading completer.el, but have not yet loaded ilisp (require 'ilcompat) ;;;%Globals ;;;%%Switches (defvar completer-load-hook nil "Hook called when minibuffer partial completion is loaded.") (defvar completer-disable nil "*If T, turn off partial completion. Use the command \\[completer-toggle] to set this.") (defvar completer-complete-filenames t "*If T, then each component of a filename will be completed, otherwise just the final component will be completed.") (defvar completer-use-words nil ; jwz: this is HATEFUL! "*If T, then prefer completions with the same number of words as the pattern.") (defvar completer-words "---. <" "*Delimiters used in partial completions. It should be a set of characters suitable for inclusion in a [] regular expression.") (defvar completer-any-delimiter nil "*If a character, then a delimiter in the pattern that matches the character will match any delimiter in completer-words.") (defvar completer-file-skip "^cs/$\\|@sys\\|.edu/$\\|.gov/$\\|.com/$\\|:/$" "*Regular expression for pathname components to not complete.") (defvar completer-exact nil "*If T, then you must have an exact match. Otherwise, the shortest string that matches the pattern will be used.") (defvar completer-cache-size 100 "*Size of cache to use for partially completed pathnames.") (defvar completer-use-cache t "*Set to nil to disable the partially completed pathname cache.") ;;;%%Internal (defvar completer-last-pattern "" "The last pattern expanded.") (defvar completer-message nil "T if temporary message was just displayed.") (defvar completer-path-cache nil "Cache of (path . choices) for completer.") (defvar completer-path-separator-string (if (eq system-type 'windows-nt) "\\" "/")) (defvar completer-path-separator-regexp (if (eq system-type 'windows-nt) "[/\\]" "/")) (defvar completer-path-delimiter-list (if (eq system-type 'windows-nt) '(?\\ ?/) '(?/))) (defvar completer-path-separator-regexp-inside-brackets (if (eq system-type 'windows-nt) "/\\" "/")) (defvar completer-dot-dot-list (if (eq system-type 'windows-nt) '("../" "..\\") '("../"))) (defvar completer-string nil "Last completer string.") (defvar completer-table nil "Last completer table.") (defvar completer-pred nil "Last completer pred.") (defvar completer-mode nil "Last completer mode.") (defvar completer-result nil "Last completer result.") (eval-when (eval load compile) (if (not (fboundp 'completion-display-completion-list-function)) (setf completion-display-completion-list-function 'display-completion-list))) (unless (fboundp 'minibuffer-prompt-end) (defun minibuffer-prompt-end () "Return the buffer position of the end of the minibuffer prompt. Return (point-min) if current buffer is not a mini-buffer." (point-min))) ;;;%Utilities (defun completer-message (message &optional point) "Display MESSAGE at optional POINT for two seconds." (setq point (or point (point-max)) completer-message t) (let ((end (save-excursion (goto-char point) (insert message) (point))) (inhibit-quit t)) (sit-for 2) (delete-region point end) (if (and quit-flag ;; (not (eq 'lucid-19 ilisp-emacs-version-id)) ;; (not (string-match "Lucid" emacs-version)) (not (memq +ilisp-emacs-version-id+ '(xemacs lucid-19 lucid-19-new))) ) (setq quit-flag nil unread-command-char 7)))) ;;; (defun completer-deleter (regexp choices &optional keep) "Destructively remove strings that match REGEXP in CHOICES. Return the modified list. If optional KEEP, then keep entries that match regexp." (let* ((choiceb choices) choicep) (if keep (progn (while (and choiceb (not (string-match regexp (car choiceb)))) (setq choiceb (cdr choiceb))) (setq choicep choiceb) (while (cdr choicep) (if (string-match regexp (car (cdr choicep))) (setq choicep (cdr choicep)) (rplacd choicep (cdr (cdr choicep)))))) (while (and choiceb (string-match regexp (car choiceb))) (setq choiceb (cdr choiceb))) (setq choicep choiceb) (while (cdr choicep) (if (string-match regexp (car (cdr choicep))) (rplacd choicep (cdr (cdr choicep))) (setq choicep (cdr choicep))))) choiceb)) ;;;%%Regexp (defun completer-regexp (string delimiters any) "Convert STRING into a regexp with words delimited by chars in DELIMITERS. Any delimiter in STRING that is the same as ANY will match any delimiter." (let* ((delimiter-reg (concat "[" delimiters "]")) (limit (length string)) (pos 0) (regexp "^")) (while (and (< pos limit) (string-match delimiter-reg string pos)) (let* ((begin (match-beginning 0)) (end (match-end 0)) (delimiter (substring string begin end)) (anyp (eq (elt string begin) any))) (setq regexp (format "%s%s[^%s]*%s" regexp (regexp-quote (substring string pos begin)) (if anyp delimiters delimiter) (if anyp delimiter-reg (regexp-quote delimiter))) pos end))) (if (<= pos limit) (setq regexp (concat regexp (regexp-quote (substring string pos limit))))))) ;;; (defun completer-words (regexp string &optional limit) "Return the number of words matching REGEXP in STRING up to LIMIT." (setq limit (or limit 1000)) (let ((count 1) (pos 0)) (while (and (string-match regexp string pos) (<= count limit)) (setq count (1+ count) pos (match-end 0))) count)) ;;;%Matcher (defun completer-matches (string choices delimiters any) "Return STRING's matches in CHOICES. DELIMITERS and the wildcard ANY are used to segment the strings." (let* ((regexp (concat "[" delimiters "]")) (from nil) (to 0) (pattern nil) (len (length string)) (matches nil) sub sublen choice word wordlen pat) ;; Segment pattern (while (< (or from 0) len) (setq to (or (string-match regexp string (if from (1+ from))) len)) (if (eq (elt string (or from 0)) completer-any-delimiter) (setq sub (substring string (if from (1+ from) 0) to) sublen (- (length sub))) (setq sub (substring string (or from 0) to) sublen (length sub))) (setq pattern (cons (cons sub sublen) pattern) from to)) (setq pattern (reverse pattern)) ;; Find choices that match patterns (setq regexp (concat "[" delimiters "]")) (while choices (setq choice (car choices) word pattern from 0) (while (and word from (let* (begin end) (if (< (setq wordlen (cdr (setq pat (car word)))) 0) (setq begin (1+ from) end (+ begin (- wordlen))) (setq begin from end (+ begin wordlen))) (and (<= end (length choice)) (or (zerop wordlen) (string-equal (car pat) (substring choice begin end)))))) (setq from (string-match regexp choice (if (and (zerop from) (zerop wordlen)) from (1+ from))) word (cdr word))) (if (not word) (setq matches (cons choice matches))) (setq choices (cdr choices))) matches)) ;;; (defun completer-choice (string choices delimiters use-words) "Return a list with best match of STRING in CHOICES and T if it is unique. DELIMITERS are used to separate words. A match is unique if it is the only possibility or when USE-WORDS the only possibility with the same number of words. The shortest string of multiple possibilities will be the best match." (or (if (null (cdr choices)) (cons (car choices) t)) (let* ((regexp (concat "[^" delimiters "]*[" delimiters "]")) (words (if use-words (completer-words regexp string))) (choice choices) (unique-p nil) (match nil) (match-count nil) (match-len 1000)) (while choice (let* ((current (car choice)) (length (length current))) (if match-count (if (= (completer-words regexp current words) words) (progn (setq unique-p nil) (if (< length match-len) (setq match current match-len length)))) (if (and use-words (= (completer-words regexp current words) words)) (setq match current match-len length match-count t unique-p t) (if (< length match-len) (setq match current match-len length))))) (setq choice (cdr choice))) (cons match unique-p)))) ;;;%Completer ;;;%%Utilities (defun completer-region (delimiters) "Return the completion region bounded by characters in DELIMITERS. The search is for the current buffer assuming that point is in it." (cons (save-excursion (skip-chars-backward delimiters (minibuffer-prompt-end)) (point)) (save-excursion (skip-chars-forward delimiters) (point)))) ;;; (defun completer-last-component (string) "Return the start of the last filename component in STRING." (let ((last (1- (length string))) (match 0) (end 0)) (while (and (setq match (string-match completer-path-separator-regexp string end)) (< match last)) (setq end (1+ match))) end)) ;;; (defun completer-match-record (string matches delimiters any dir mode) "Return (match lcs choices unique) for STRING in MATCHES. DELIMITERS or ANY wildcards and DIR if a filename when in MODE." (let ((pattern (if dir (substring string (completer-last-component string)) string)) match) (setq matches (completer-matches pattern matches delimiters any) match (try-completion pattern (mapcar 'list matches))) ;; If try-completion produced an exact match for an element in 'matches', ;; then remove any partial matches from 'matches' and set the unique ;; match flag. (and (stringp match) (member match matches) (setq matches (list match))) (if (cdr matches) (let ((lcs (concat dir (try-completion "" (mapcar 'list matches))))) (setq match (if (not completer-exact) (completer-choice pattern matches delimiters completer-use-words))) (list (if match (concat dir (car match))) lcs matches (cdr match))) (if matches (progn (setq match (concat dir (car matches))) (list match match matches t)) (list nil nil nil nil))))) ;;;%%Complete file (defun completer-extension-regexp (extensions) "Return a regexp that matches a string ending with any string in EXTENSIONS." (concat "\\(" (mapconcat 'regexp-quote extensions "\\|") "\\)\\'")) ;;; (defun completer-flush () "Flush completer's pathname cache." (interactive) (setq completer-path-cache nil)) ;;; (defun completer-cache (path pred words any mode) "Check to see if PATH is in path cache with PRED, WORDS, ANY and MODE." (let* ((last nil) (ptr completer-path-cache) (size 0) (result nil)) (if completer-use-cache (while ptr (let ((current (car (car ptr)))) (if (string-equal current path) (progn (if last (progn (rplacd last (cdr ptr)) (rplacd ptr completer-path-cache) (setq completer-path-cache ptr))) (setq result (cdr (car ptr)) ptr nil)) (if (cdr ptr) (setq last ptr)) (setq size (1+ size) ptr (cdr ptr)))))) (or result (let* ((choices (completer path 'read-file-name-internal pred words any mode t))) (if (and (or (car (cdr (cdr (cdr choices)))) (string= path (car choices))) (memq (elt (car choices) (1- (length (car choices)))) completer-path-delimiter-list)) (progn (if (>= size completer-cache-size) (rplacd last nil)) (setq completer-path-cache (cons (cons path choices) completer-path-cache)))) choices)))) (defun completer-file (string pred words any mode) "Return (match common-substring matches unique-p) for STRING. It uses 'READ-FILE-NAME-INTERNAL' for choices that pass PRED using WORDS to delimit words. Optional ANY is a delimiter that matches any of the delimiters in WORD. If optional MODE is nil or 'help then possible matches will always be returned." ;; Canonicalize slashes under windows-nt for proper completion (when (and (eq system-type 'windows-nt) (featurep 'xemacs)) (setq string (replace-in-string string "/" "\\\\"))) (let* ((case-fold-search completion-ignore-case) (last (and (eq mode 'exit-ok) (completer-last-component string))) (position ;; Original ;; Special hack for CMU RFS filenames ;; (if (string-match "^/\\.\\./[^/]*/" string) ;; (match-end 0) ;; (string-match "[^~/]" string)) ;; 2002-05-23 ;; New by Ben Wing ;; Find beginning of first directory component. (cond ((string-match "^/\\.\\./[^/]*/" string) ;; CMU RFS filenames like /../computername/foo/bar.c (match-end 0)) ((and (memq system-type '(windows-nt cygwin32)) (string-match "[/\\][/\\][^/\\]*[/\\]" string)) ;; windows-nt filenames like \\computername\foo\bar.c, or ;; cygwin filenames like //d/foo/bar.c (match-end 0)) ((and (eq system-type 'windows-nt) (string-match "[A-Za-z]:[/\\]?" string)) ;; windows-nt filenames like c:\foo\bar.c or c:bar.c (match-end 0)) (t ;; normal absolute or relative names, or names beginning ;; with ~/ (string-match (concat "[^~" completer-path-separator-regexp-inside-brackets "]") string))) ) (new (substring string 0 position)) (user (if (string= new "~") (setq new (file-name-directory (expand-file-name new))))) (words (concat words completer-path-separator-regexp-inside-brackets)) (len (length string)) (choices nil) (end nil) (old-choices (list nil nil nil nil))) (while position (let* ((begin (string-match completer-path-separator-regexp string position)) (exact-p nil)) (setq end (when begin (match-end 0)) choices ;; Ends with a /, so check files in directory (if (and (memq mode '(nil help)) (= position len)) (completer-match-record "" ;; This assumes that .. and . come at the end (let* ((choices (all-completions new 'read-file-name-internal)) (choicep choices)) (if (member* (first choicep) completer-dot-dot-list :test #'string=) (cdr (cdr choicep)) (while (cdr choicep) (if (member* (second choicep) completer-dot-dot-list :test #'string=) (rplacd choicep nil)) (setq choicep (cdr choicep))) choices)) words any new mode) (if (eq position last) (let ((new (concat new (substring string position)))) (list new new nil t)) (let ((component (substring string position end))) (if (and end (string-match completer-file-skip component)) ;; Assume component is complete (list (concat new component) (concat new component) nil t) (completer-cache (concat new component) pred words any mode)))))) ;; Keep going if unique or we match exactly (if (or (car (cdr (cdr (cdr choices)))) (setq exact-p (string= (concat new (substring string position end)) (car choices)))) (setq old-choices (let* ((lcs (car (cdr choices))) (matches (car (cdr (cdr choices)))) ;; (slash (and lcs (string-match "/$" lcs)))) (slash (and lcs (string-match (concat completer-path-separator-regexp "$") lcs)))) (list nil (if slash (substring lcs 0 slash) lcs) (if (and (cdr matches) (or (eq mode 'help) (not exact-p))) matches) nil)) new (car choices) position end) ;; Its ok to not match user names because they may be in ;; different root directories (if (and (= position 1) (= (elt string 0) ?~)) (setq new (substring string 0 end) choices (list new new (list new) t) user nil position end) (setq position nil))))) (if (not (car choices)) (setq choices old-choices)) (if (and (car choices) (not (eq mode 'help)) (not (car (cdr (cdr (cdr choices)))))) ;; Try removing completion ignored extensions (let* ((extensions (completer-extension-regexp completion-ignored-extensions)) (choiceb (car (cdr (cdr choices)))) (choicep choiceb) (isext nil) (noext nil)) (while choicep (if (string-match extensions (car choicep)) (setq isext t) (setq noext t)) (if (and isext noext) ;; There are matches besides extensions (setq choiceb (completer-deleter extensions choiceb) choicep nil) (setq choicep (cdr choicep)))) (if (and isext noext) (setq choices (completer-match-record (if end (substring string end) "") choiceb words any (file-name-directory (car (cdr choices))) mode))))) (if user (let ((match (car choices)) (lcs (car (cdr choices))) (len (length user))) (setq choices (cons (if match (concat "~" (substring match len))) (cons (if lcs (concat "~" (substring lcs len))) (cdr (cdr choices))))))) choices)) ;;;%Exported program interface ;;;%%Completer (defun completer (string table pred words &optional any mode file-p) "Return (match common-substring matches unique-p) for STRING in TABLE. The choices must also pass PRED using WORDS to delimit words. If the flag 'COMPLETER-COMPLETE-FILENAMES' is T and the table is 'READ-FILE-NAME-INTERNAL', then filename components will be individually expanded. Optional ANY is a delimiter that can match any delimiter in WORDS. Optional MODE is nil for complete, 'help for help and 'exit for exit." (if (and (stringp completer-string) (string= string completer-string) (eq table completer-table) (eq pred completer-pred) (not file-p) (or (eq mode completer-mode) (not (memq table '(read-file-name-internal read-directory-name-internal))))) completer-result (setq completer-string "" completer-table table completer-pred pred completer-mode mode completer-result (if (and completer-complete-filenames (not file-p) (memq table '(read-file-name-internal read-directory-name-internal))) (completer-file string pred words any mode) (let* ((file-p (or file-p (memq table '(read-file-name-internal read-directory-name-internal)))) (case-fold-search completion-ignore-case) (pattern (concat "[" words "]")) (component (if file-p (completer-last-component string))) (dir (if component (substring string 0 component))) (string (if dir (substring string component) string)) (has-words (or (string-match pattern string) (length string)))) (if (and file-p (string-match "^\\$" string)) ;; Handle environment variables (let ((match (getenv (substring string 1 ;; (string-match "/" string)))) ; old (string-match completer-path-separator-regexp string)))) ) ;; (if match (setq match (concat match "/"))) ; old (when match (setq match (concat match completer-path-separator-string))) (list match match (list match) match)) (let* ((choices (all-completions (concat dir (substring string 0 has-words)) table pred)) (regexp (completer-regexp string words any))) (if choices (completer-match-record string (completer-deleter regexp choices t) words any dir mode) (list nil nil nil nil)))))) completer-string string) completer-result)) ;;;%%Display choices (defun completer-display-choices (choices &optional match message end display) "Display the list of possible CHOICES. MATCH, MESSAGE, END and DISPLAY are used optionally. If MATCH is non-nil, it will be flagged as the best guess. If there are no choices, display MESSAGE. END is where to put temporary messages. If DISPLAY is present then it will be called on each possible completion and should return a string." (if choices (with-output-to-temp-buffer "*Completions*" (if (cdr choices) (funcall completion-display-completion-list-function (sort (if display (let ((old choices) (new nil)) (while old (setq new (cons (funcall display (car old)) new) old (cdr old))) new) (copy-sequence choices)) (function (lambda (x y) (string-lessp (or (car-safe x) x) (or (car-safe y) y))))))) (if match (save-excursion (set-buffer "*Completions*") (goto-char (point-min)) (let ((buffer-read-only nil)) (insert "Guess = " match (if (cdr choices) ", " "") "\n"))))) (beep) (completer-message (or message " (No completions)") end))) ;;;%%Goto (defun completer-goto (match lcs choices unique delimiters words &optional mode display) "Go to the part of the string that disambiguates CHOICES. MATCH is the best match, LCS is the longest common substring of all of the matches. CHOICES is a list of the possibilities, UNIQUE indicates if MATCH is unique. DELIMITERS are possible bounding characters for the completion region. WORDS are the characters that delimit the words for partial matches. Replace the region bounded by delimiters with the match if unique and the lcs otherwise unless optional MODE is 'help. Then go to the part of the string that disambiguates CHOICES using WORDS to separate words and display the possibilities if the string was not extended. If optional DISPLAY is present then it will be called on each possible completion and should return a string." (setq completer-message nil) (let* ((region (completer-region delimiters)) (start (car region)) (end (cdr region)) (string (buffer-substring start end)) ;; (file-p (string-match "[^ ]*\\(~\\|/\\|$\\)" string)) (file-p (string-match (if (eq system-type 'windows-nt) "[^ ]*\\(~\\|/\\|\\\\\\|\\|$\\)" "[^ ]*\\(~\\|/\\|$\\)") string)) (no-insert (eq mode 'help)) (message t) (new (not (string= (buffer-substring start (point)) lcs)))) (if unique (if no-insert (progn (goto-char end) (completer-display-choices choices match nil end display)) (if (string= string match) (if (not file-p) (progn (goto-char end) (completer-message " (Sole completion)" end))) (completer-insert match delimiters))) ;;Not unique (if lcs (let* ((regexp ;; (concat "[" words (if file-p "/") "]") (concat "[" words (and file-p completer-path-separator-regexp-inside-brackets) "]") ) (words (completer-words regexp lcs)) (point nil)) ;; Go to where its ambiguous (goto-char start) (unless no-insert (insert lcs) (setq completer-last-pattern (list string delimiters (current-buffer) start) start (point) end (+ end (length lcs)))) ;; Skip to the first delimiter in the original string ;; beyond the ambiguous point and keep from there on (if (re-search-forward regexp end 'move words) (progn (if (and (not no-insert) match) (let ((delimiter (progn (string-match (regexp-quote lcs) match) (substring match (match-end 0) (1+ (match-end 0)))))) (if (string-match regexp delimiter) (insert delimiter)))) (forward-char -1))) (unless no-insert (setq end (- end (- (point) start))) (delete-region start (point))))) (if choices (when (or no-insert (not new)) (completer-display-choices choices match nil end display)) (when file-p (when (not (= (point) end)) (forward-char 1)) (unless (save-excursion (re-search-forward completer-path-separator-regexp end t)) (goto-char end))) (when message (beep) (completer-message (if no-insert " (No completions)" " (No match)") end)))))) ;;;%Exported buffer interface ;;;%%Complete and go (defun completer-complete-goto (delimiters words table pred &optional no-insert display) "Complete the string bound by DELIMITERS using WORDS to bound words for partial matches in TABLE with PRED and then insert the longest common substring unless optional NO-INSERT and go to the point of ambiguity. If optional DISPLAY, it will be called on each match when possible completions are shown and should return a string." (let* ((region (completer-region delimiters))) (apply 'completer-goto (append (completer (buffer-substring (car region) (cdr region)) table pred words completer-any-delimiter no-insert) (list delimiters words no-insert display))))) ;;;%%Undo (defun completer-insert (match delimiters &optional buffer undo) "Replace the region bounded with characters in DELIMITERS by MATCH. Then save it so that it can be restored by completer-undo." (let* ((region (completer-region delimiters)) (start (car region)) (end (cdr region))) (if (and undo (or (not (= start undo)) (not (eq (current-buffer) buffer)))) (error "No previous pattern") (setq completer-last-pattern (list (buffer-substring start end) delimiters (current-buffer) start)) (delete-region start end) (goto-char start) (insert match)))) ;;; (defun completer-undo () "Swap the last expansion and the last match pattern." (interactive) (if completer-last-pattern (apply 'completer-insert completer-last-pattern) (error "No previous pattern"))) ;;;%Minibuffer specific code ;;;%%Utilities (defun completer-minibuf-string () "Remove dead filename specs from the minibuffer. Dead filename should be delimited by // or ~ or $ and return the resulting string." (save-excursion (goto-char (point-max)) (if (and (memq minibuffer-completion-table '(read-file-name-internal read-directory-name-internal)) (re-search-backward ;; "//\\|/~\\|.\\$" (if (memq system-type '(windows-nt cygwin32)) ;; // is meaningful "/~\\|.\\$" "//\\|/~\\|.\\$") (minibuffer-prompt-end) t)) (delete-region (minibuffer-prompt-end) (1+ (point)))) (buffer-substring (minibuffer-prompt-end) (point-max)))) ;;; (defun completer-minibuf-exit () "Exit the minibuffer and clear completer-last-pattern." (interactive) (setq completer-last-pattern nil) (exit-minibuffer)) ;;; (defun completer-new-cmd (cmd) "Return T if we can't execute the old minibuffer version of CMD." (if (or completer-disable (let ((string (completer-minibuf-string))) (or (not (string-match (concat "[" completer-words completer-path-separator-regexp-inside-brackets "~]") string)) (condition-case () (let ((completion (try-completion string minibuffer-completion-table minibuffer-completion-predicate))) (if (memq minibuffer-completion-table '(read-file-name-internal read-directory-name-internal)) ;; Directories complete as themselves (and completion (or (not (string= string completion)) (file-exists-p completion))) completion)) (error nil))))) (progn (funcall cmd) nil) t)) ;;; (defun completer-minibuf (&optional mode) "Partial completion of minibuffer expressions. Optional MODE is (quote help) for help and (quote exit) for exit. If what has been typed so far matches any possibility normal completion will be done. Otherwise, the string is considered to be a pattern with words delimited by the characters in completer-words. If completer-exact is T, the best match will be the shortest one with the same number of words as the pattern if possible and otherwise the shortest matching expression. If called with a prefix, caching will be temporarily disabled. Examples: a-f auto-fill-mode r-e rmail-expunge b--d *beginning-of-defun or byte-recompile-directory by d *byte-recompile-directory if completer-any-delimiter is \" \" ~/i.e *~/ilisp.el or ~/il-el.el or ~/ilisp.elc /u/mi/ /usr/misc/" (interactive) (append (let ((completer-use-cache (not (or (not completer-use-cache) current-prefix-arg)))) (completer (completer-minibuf-string) minibuffer-completion-table minibuffer-completion-predicate completer-words completer-any-delimiter mode)) (list "^" completer-words mode))) ;;;%%Commands (defun completer-toggle () "Turn partial completion on or off." (interactive) (setq completer-disable (not completer-disable)) (message (if completer-disable "Partial completion OFF" "Partial completion ON"))) ;;; (defvar completer-old-help (lookup-key minibuffer-local-must-match-map "?") "Old binding of ? in minibuffer completion map.") (defun completer-help () "Partial completion minibuffer-completion-help. See completer-minibuf for more information." (interactive) (if (completer-new-cmd completer-old-help) (apply 'completer-goto (completer-minibuf 'help)))) ;;; (defvar completer-old-completer (lookup-key minibuffer-local-must-match-map "\t") "Old binding of TAB in minibuffer completion map.") (defun completer-complete () "Partial completion minibuffer-complete. See completer-minibuf for more information." (interactive) (if (completer-new-cmd completer-old-completer) (apply 'completer-goto (completer-minibuf)))) ;;; (defvar completer-old-word (lookup-key minibuffer-local-must-match-map " ") "Old binding of SPACE in minibuffer completion map.") (defun completer-word () "Partial completion minibuffer-complete. See completer-minibuf for more information." (interactive) (if (eq completer-any-delimiter ?\ ) (insert ?\ ) (if (completer-new-cmd completer-old-word) (apply 'completer-goto (completer-minibuf))))) ;;; (defvar completer-old-exit (lookup-key minibuffer-local-must-match-map "\n") "Old binding of RET in minibuffer completion map.") (defun completer-exit () "Partial completion minibuffer-complete-and-exit. See completer-minibuf for more information." (interactive) (if (completer-new-cmd completer-old-exit) (let* ((completions (completer-minibuf 'exit)) (match (car completions)) (unique-p (car (cdr (cdr (cdr completions)))))) (apply 'completer-goto completions) (if unique-p (completer-minibuf-exit) (if match (progn (completer-insert match "^") (if minibuffer-completion-confirm (completer-message " (Confirm)") (completer-minibuf-exit))) (if (not completer-message) (beep))))))) ;;; (defun completer-match-exit () "Exit the minibuffer with the current best match." (interactive) (let* ((completions (completer-minibuf 'exit)) (guess (car completions))) (if (not guess) ;; OK if last filename component doesn't match (setq completions (completer-minibuf 'exit-ok) guess (car completions))) (if guess (progn (goto-char (minibuffer-prompt-end)) (insert guess) (delete-region (point) (point-max)) (exit-minibuffer)) (apply 'completer-goto completions)))) ;;;%%Keymaps ;this interferes with normal undo. ;(define-key minibuffer-local-completion-map "\C-_" 'completer-undo) (define-key minibuffer-local-completion-map "\t" 'completer-complete) (define-key minibuffer-local-completion-map " " 'completer-word) (define-key minibuffer-local-completion-map "?" 'completer-help) (define-key minibuffer-local-completion-map "\n" 'completer-minibuf-exit) (define-key minibuffer-local-completion-map "\r" 'completer-minibuf-exit) (define-key minibuffer-local-completion-map "\M-\n" 'completer-match-exit) (define-key minibuffer-local-completion-map "\M-\r" 'completer-match-exit) ;this interferes with normal undo. ;(define-key minibuffer-local-must-match-map "\C-_" 'completer-undo) (define-key minibuffer-local-must-match-map "\t" 'completer-complete) (define-key minibuffer-local-must-match-map " " 'completer-word) (define-key minibuffer-local-must-match-map "\n" 'completer-exit) (define-key minibuffer-local-must-match-map "\r" 'completer-exit) (define-key minibuffer-local-must-match-map "?" 'completer-help) (define-key minibuffer-local-must-match-map "\M-\n" 'completer-match-exit) (define-key minibuffer-local-must-match-map "\M-\r" 'completer-match-exit) ;;;%comint (defun completer-comint-dynamic-list-completions (completions) "List in help buffer sorted COMPLETIONS. Typing SPC flushes the help buffer." (completer-comint-dynamic-complete-1 nil 'help)) (defun completer-comint-dynamic-complete-filename () "Dynamically complete the filename at point." (interactive) (completer-comint-dynamic-complete-1 nil t)) ;;; (defun completer-comint-dynamic-complete-1 (&optional undo mode) "Complete the previous filename or display possibilities if done twice in a row. If called with a prefix, undo the last completion." (interactive "P") (if undo (completer-undo) ;; added by jwz: don't cache completions in shell buffer! (setq completer-string nil) (let ((conf (current-window-configuration)));; lemacs change (completer-complete-goto "^ \t\n\"" completer-words 'read-file-name-internal default-directory mode) ;; lemacs change (when (eq mode 'help) (comint-restore-window-config conf)) ))) ;(fset 'comint-dynamic-complete 'completer-comint-dynamic-complete) (fset 'comint-dynamic-complete-filename 'completer-comint-dynamic-complete-filename) (fset 'comint-dynamic-list-completions 'completer-comint-dynamic-list-completions) ;;; Set the functions again if comint is loaded. (setq comint-load-hook (cons (function (lambda () ;; (fset 'comint-dynamic-complete ;; 'completer-comint-dynamic-complete) (fset 'comint-dynamic-complete-filename 'completer-comint-dynamic-complete-filename) (fset 'comint-dynamic-list-completions 'completer-comint-dynamic-list-completions))) (when (and (boundp 'comint-load-hook) comint-load-hook) (if (consp comint-load-hook) (if (eq (car comint-load-hook) 'lambda) (list comint-load-hook) comint-load-hook) (list comint-load-hook))))) ;;;%lisp-complete-symbol (defun lisp-complete-symbol (&optional mode) "Perform partial completion on Lisp symbol preceding point. That symbol is compared against the symbols that exist and any additional characters determined by what is there are inserted. If the symbol starts just after an open-parenthesis, only symbols with function definitions are considered. Otherwise, all symbols with function definitions, values or properties are considered. If called with a negative prefix, the last completion will be undone." (interactive "P") (if (< (prefix-numeric-value mode) 0) (completer-undo) (let* ((end (save-excursion (skip-chars-forward "^ \t\n)]}\"") (point))) (beg (save-excursion (backward-sexp 1) (while (= (char-syntax (following-char)) ?\') (forward-char 1)) (point))) (pattern (buffer-substring beg end)) (predicate (if (eq (char-after (1- beg)) ?\() 'fboundp (function (lambda (sym) (or (boundp sym) (fboundp sym) (symbol-plist sym)))))) (completion (try-completion pattern obarray predicate))) (cond ((eq completion t)) ((null completion) (completer-complete-goto "^ \t\n\(\)[]{}'`" completer-words obarray predicate nil (if (not (eq predicate 'fboundp)) (function (lambda (choice) (if (fboundp (intern choice)) (list choice " ") choice)))))) ((not (string= pattern completion)) (delete-region beg end) (insert completion)) (t (message "Making completion list...") (let ((list (all-completions pattern obarray predicate))) (or (eq predicate 'fboundp) (let (new) (while list (setq new (cons (if (fboundp (intern (car list))) (list (car list) " ") (car list)) new)) (setq list (cdr list))) (setq list (nreverse new)))) (with-output-to-temp-buffer "*Help*" (funcall completion-display-completion-list-function (sort list (function (lambda (x y) (string-lessp (or (car-safe x) x) (or (car-safe y) y)))))))) (message "Making completion list...%s" "done")))))) ;;;%Hooks (provide 'completer) (run-hooks 'completer-load-hook) ;;; end of file -- completer.el -- ilisp-5.12.0+cvs.2004.12.26/cormanlisp.lisp0000600000175000001440000001062507531601216016621 0ustar mvelausers;;; -*- Mode: Lisp; tab-width: 4 -*- ;;; cormanlisp.lisp -- ;;; This file is part of ILISP. ;;; Version: 5.8 - 5.10 ;;; ;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell ;;; 1993, 1994 Ivan Vasquez ;;; 1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker ;;; 1996 Marco Antoniotti and Rick Campbell ;;; 2000 Reini Urban ;;; ;;; Other authors' names for which this Copyright notice also holds ;;; may appear later in this file. ;;; ;;; ILISP is freely redistributable under the terms found in the file ;;; COPYING. ;;; ;;; Cormanlisp initializations ;;; Author: Reini Urban ;;; (in-package :ilisp) (defun ilisp-source-files (symbol package type) "Print each file for PACKAGE:SYMBOL's TYPE definition on a line and return T if successful." (declare (ignore type)) (ilisp-errors (let* ((symbol (ilisp-find-symbol symbol package)) (type t) ;;(type (if (equal type "any") t (ilisp-find-symbol type "keyword"))) (paths (when symbol (debug::function-source-file symbol)))) (if paths (progn (if (eq type t) (dolist (path (remove-duplicates paths :key #'cdr :test #'equal)) (print (namestring (cdr path)))) (print (namestring paths))) t) nil)))) (export '(ilisp-source-files)) ;;; ILISP Patches for cormanlisp <= 2.0 (in-package :common-lisp) (defun inspect (symbol) (describe symbol)) ;; not really needed with my cl-ilisp.lisp patch, but for legacy sake (defun special-form-p (symbol) (special-operator-p symbol)) (unless (fboundp 'compile-file-pathname) (defvar fasl-file-extension ".fasl") ;;; ;;; Common Lisp COMPILE-FILE-PATHNAME function. ;;; ;;; CLtL2: "If an implementation supports additional keyword arguments to ;;; compile-file, compile-file-pathname must accept the same arguments." ;;; (defun compile-file-pathname (input-file &key (output-file nil) (verbose *compile-verbose*) (print *compile-print*) (external-format :default)) (create-pathname-from-string (compile-file-name (namestring (pathname input-file)) :output-file output-file :verbose verbose :print print :external-format external-format))) (defun compile-file-name (input-file &key (output-file nil) (verbose *compile-verbose*) (print *compile-print*) (external-format :default)) "Returns the compiled filename string for the input-file string" (declare (ignore verbose external-format print)) (if (null output-file) (if (string-equal (subseq input-file (- (length input-file)(length lisp-file-extension)) (length input-file)) lisp-file-extension) (concatenate 'string (subseq input-file 0 (- (length input-file) (length lisp-file-extension))) fasl-file-extension) (concatenate 'string input-file fasl-file-extension)) (namestring (pathname output-file)))) ) ; eof compile-file-pathname patch (unless (fboundp 'readtable-case) ;;; ;;; Common Lisp READTABLE-CASE accessor ;;; ;;; Note: at booting check-type,warn,defun setf are not defined ;;; (defun readtable-case (readtbl) (if (macro-function 'check-type) ; booting (check-type readtbl readtable) ;; else (if (not (readtablep readtbl)) (error "Argument is no valid readtable: ~A" readtbl))) (uref readtbl readtable-case-offset)) (defun set-readtable-case (readtbl value) "For compatibility only. All values except :UPCASE are ignored." (let ((valid-case '(:upcase)) (ignored-case '(:downcase :preserve :invert))) (if (macro-function 'check-type) ; booting (progn (check-type readtbl readtable) (check-type value symbol))) (cond ((member value valid-case) (setf (uref readtbl readtable-case-offset) value)) ((member value ignored-case) (error "SET-READTABLE-CASE: only :UPCASE supported: ~A" value)) (T (error "Argument is no valid readtable-case: ~A, expected ~A" value valid-case))))) ;;; bootstrapping (set-readtable-case *readtable* ':upcase) (set-readtable-case *common-lisp-readtable* ':upcase) (defsetf readtable-case set-readtable-case) ) ; eof readtable-case patch (in-package :ilisp) ilisp-5.12.0+cvs.2004.12.26/custom-ilisp.el0000600000175000001440000000224407277332355016545 0ustar mvelausers;;; -*- Mode: Emacs-Lisp -*- ;;; custom-ilisp.el -- ;;; ILISP Customization. ;;; WARNING! This file is not loaded yet. Loading it may cause some ;;; problems. ;;; ;;; This file is part of ILISP. ;;; Please refer to the file COPYING for copyrights and licensing ;;; information. ;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list ;;; of present and past contributors. ;;; ;;; $Id: custom-ilisp.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $ (defgroup ILisp nil "The ILisp Inferior Lisp System." :group 'programming :group 'lisp) (defgroup ILisp-interaction nil "ILisp interaction customization." :group 'ILisp) (defcustom ilisp-*prefix* "\C-z" "Prefix sequence for ILisp commands." :group 'ILisp-interaction ) (defcustom lisp-no-popper 'message "*T if all output goes to the inferior LISP rather than in a pop-up window. Use 'message' if you want output of one line to go to the echo area (usually the Minibuffer) or to a pop-up window if more. You should probably also set 'comint-always-scroll' to T as well so that output is always visible." :group 'ILisp-interaction :options '(nil t message) ) ;;; end of file -- custom-ilisp.el -*- ilisp-5.12.0+cvs.2004.12.26/debian/0000700000175000001440000000000010324774601015000 5ustar mvelausersilisp-5.12.0+cvs.2004.12.26/debian/README.Debian0000600000175000001440000000071407574045626017060 0ustar mvelausersThe default initialization file for ILISP is installed in /etc/ilisp/ilisp.el. However, if you wish to override the global initialization file with a local initialization file, you can install that file as .ilisp in your home directory. If ~/.ilisp exists, then the system-wide default file will not be read at all. Thus, a warning, if you have a .ilisp file in your homn directory, you are completely on your own to ensure that ilisp is properly configured. ilisp-5.12.0+cvs.2004.12.26/debian/changelog0000600000175000001440000004727010324774601016666 0ustar mvelausersilisp (5.12.0+cvs.2004.12.26) unstable; urgency=low * QA upload. * debian/po/sv.po: Add translation by Daniel Nylander. Closes: #334190. -- Matej Vela Mon, 17 Oct 2005 21:20:33 +0200 ilisp (5.12.0+cvs.2004.12.25) unstable; urgency=low * QA upload. * Add missing build dependency on csh. * Update debconf dependency to allow for cdebconf. * debian/ilisp.config: Remove unnecessary call to db_reset. * debian/ilisp.preinst: Fix bashism. * debian/ilisp-doc.doc-base: Change section to Apps/Programming. * debian/rules: - Use binary-indep rather than binary-arch. - Install ChangeLog as the upstream changelog. * Conforms to Standards version 3.6.2. -- Matej Vela Tue, 27 Sep 2005 12:55:01 +0200 ilisp (5.12.0+cvs.2004.12.24) unstable; urgency=low * QA Upload. * Bug fix: "INTL:vi", thanks to Clytie Siddall (Closes: #311931). * Bug fix: "typo in ilisp.templates", thanks to Clytie Siddall (Closes: #311932). Also unfuzzy translations -- Frank Lichtenheld Sat, 11 Jun 2005 06:01:32 +0200 ilisp (5.12.0+cvs.2004.12.23) unstable; urgency=low * Orphan -- as described in bug #284376 -- Kevin M. Rosenberg Thu, 23 Dec 2004 21:34:02 -0700 ilisp (5.12.0+cvs.2004.10.29) unstable; urgency=low * Add Czech translation (closes:278785) -- Kevin M. Rosenberg Fri, 29 Oct 2004 11:24:09 -0600 ilisp (5.12.0+cvs.2004.08.24) unstable; urgency=low * Delete bogus symlink -- Kevin M. Rosenberg Tue, 24 Aug 2004 02:59:46 -0600 ilisp (5.12.0+cvs.2004.08.11) unstable; urgency=low * Fix for sbcl from Christophe Rhodes -- Kevin M. Rosenberg Wed, 11 Aug 2004 13:12:25 -0600 ilisp (5.12.0+cvs.2004.08.03) unstable; urgency=low * Enable GCL avoid defsystem hack (closes:241541) -- Kevin M. Rosenberg Tue, 3 Aug 2004 06:30:44 -0600 ilisp (5.12.0+cvs.2004.08.02.2) unstable; urgency=low * Add German translation (closes:263028) * More common-lisp-controller v4 changes -- Kevin M. Rosenberg Mon, 2 Aug 2004 13:38:45 -0600 ilisp (5.12.0+cvs.2004.08.02.1) unstable; urgency=low * Convert to common-lisp-controller v4 -- Kevin M. Rosenberg Mon, 2 Aug 2004 04:28:28 -0600 ilisp (5.12.0+cvs.2004.08.02) unstable; urgency=low * Apply patch from Daniel Skarda for Guile (closes:262503) -- Kevin M. Rosenberg Mon, 2 Aug 2004 04:13:51 -0600 ilisp (5.12.0+cvs.2004.03.19) unstable; urgency=low * Update french translation (closes:238933) -- Kevin M. Rosenberg Fri, 19 Mar 2004 12:46:15 -0700 ilisp (5.12.0+cvs.2004.03.11) unstable; urgency=low * Apply patch for gettext (closes:237461) -- Kevin M. Rosenberg Thu, 11 Mar 2004 11:50:06 -0700 ilisp (5.12.0+cvs.2003.12.04) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Thu, 4 Dec 2003 22:13:01 -0700 ilisp (5.12.0+cvs.2003.10.24) unstable; urgency=low * Use : as separator between user and group names (closes:217397) -- Kevin M. Rosenberg Fri, 24 Oct 2003 09:03:27 -0600 ilisp (5.12.0+cvs.2003.10.04) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sat, 4 Oct 2003 15:35:44 -0600 ilisp (5.12.0+cvs.2003.09.14) unstable; urgency=low * Have completer.el require ilcompat (closes:210836) -- Kevin M. Rosenberg Sun, 14 Sep 2003 11:37:43 -0600 ilisp (5.12.0+cvs.2003.09.04) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Thu, 4 Sep 2003 23:57:12 -0600 ilisp (5.12.0+cvs.2003.07.20) unstable; urgency=low * Remove any preexisting C-c C-v keybinding (closes: 202225) -- Kevin M. Rosenberg Sun, 20 Jul 2003 21:31:36 -0600 ilisp (5.12.0+cvs.2003.07.04) unstable; urgency=low * New upstream * Fixed hang with spacebar (closes:186936) -- Kevin M. Rosenberg Fri, 4 Jul 2003 15:32:29 -0600 ilisp (5.12.0+cvs.2003.06.05) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Thu, 5 Jun 2003 00:09:14 -0600 ilisp (5.12.0+cvs.2003.05.27.3) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Tue, 27 May 2003 19:20:46 -0600 ilisp (5.12.0+cvs.2003.05.27.1) unstable; urgency=low * Add symlinks for .lisp and .scm files if they don't exist -- Kevin M. Rosenberg Tue, 27 May 2003 11:58:46 -0600 ilisp (5.12.0+cvs.2003.05.27) unstable; urgency=low * new upstream * Remove bashism from maintainer scripts * avoid deleting symlinks (closes: 194919) -- Kevin M. Rosenberg Tue, 27 May 2003 11:42:13 -0600 ilisp (5.12.0+cvs.2003.05.26) unstable; urgency=low * new upstream -- Kevin M. Rosenberg Mon, 26 May 2003 15:46:01 -0600 ilisp (5.12.0+cvs.2003.05.21) unstable; urgency=low * New upstream * move links to rules file (closes: 194095) * new upstream key bindings (closes: 194097) * use compat file rather than DH_COMPAT -- Kevin M. Rosenberg Tue, 20 May 2003 10:48:25 -0600 ilisp (5.12.0+cvs.2003.05.19) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Tue, 20 May 2003 10:35:11 -0600 ilisp (5.12.0+cvs.2003.05.18) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Mon, 19 May 2003 12:15:14 -0600 ilisp (5.12.0+cvs.2003.05.17) unstable; urgency=low * Improved documentation -- Kevin M. Rosenberg Sat, 17 May 2003 01:37:34 -0600 ilisp (5.12.0+cvs.2003.05.14) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Wed, 14 May 2003 13:47:09 -0600 ilisp (5.12.0+cvs.2003.05.12) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sun, 11 May 2003 22:34:27 -0600 ilisp (5.12.0+cvs.2003.05.11) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sun, 11 May 2003 16:07:15 -0600 ilisp (5.12.0+cvs.2003.05.09) unstable; urgency=low * New uptream -- Kevin M. Rosenberg Fri, 9 May 2003 09:00:51 -0600 ilisp (5.12.0+cvs.2003.04.20) unstable; urgency=low * Link .scm files to /usr/lib/ilisp (closes:189821) -- Kevin M. Rosenberg Sun, 20 Apr 2003 08:08:34 -0600 ilisp (5.12.0+cvs.2003.04.14) unstable; urgency=low * New upstream * Correct spelling error in templates (closes:188958) -- Kevin M. Rosenberg Mon, 14 Apr 2003 08:11:39 -0600 ilisp (5.12.0+cvs.2003.04.02) unstable; urgency=low * New upstream * Add support for sbcl-mt dialect -- Kevin M. Rosenberg Thu, 3 Apr 2003 01:23:28 -0700 ilisp (5.12.0+cvs.2003.03.29) unstable; urgency=low * Use clc-autobuild-library to turn on autobuilding for all CL implementations. -- Kevin M. Rosenberg Sat, 29 Mar 2003 05:04:20 -0700 ilisp (5.12.0+cvs.2003.03.23) unstable; urgency=low * New upstream -- Kevin M. Rosenberg Sun, 23 Mar 2003 09:35:02 -0700 ilisp (5.12.0+cvs.2003.03.05c) unstable; urgency=low * Spell Pre-Depends correctly (closes: 183578) -- Kevin M. Rosenberg Wed, 5 Mar 2003 15:46:44 -0700 ilisp (5.12.0+cvs.2003.03.05b) unstable; urgency=low * Remove /usr/lib/ilisp and /usr/lib/ilisp in preinst on an upgrade * Make sure symlink from an ancient version of ilisp is remove in preinst -- Kevin M. Rosenberg Tue, 4 Mar 2003 22:20:55 -0700 ilisp (5.12.0+cvs.2003.03.05) unstable; urgency=low * Remove bashisms from maintainer scripts -- Kevin M. Rosenberg Tue, 4 Mar 2003 22:02:33 -0700 ilisp (5.12.0+cvs.2003.03.04) unstable; urgency=low * Add force option to creating symlinks with CLC compilation -- Kevin M. Rosenberg Tue, 4 Mar 2003 21:59:34 -0700 ilisp (5.12.0+cvs.2003.03.03) unstable; urgency=low * Add support for SBCL aclrepl in version 0.7.13. -- Kevin M. Rosenberg Mon, 3 Mar 2003 18:40:19 -0700 ilisp (5.12.0+cvs.2003.03.02c) unstable; urgency=low * Ensure that /usr/lib/ilisp exists on installation -- Kevin M. Rosenberg Sat, 2 Mar 2003 06:50:00 -0700 ilisp (5.12.0+cvs.2003.03.02b) unstable; urgency=low * Symlink source .lisp files into /usr/lib/ilisp/ for implementations that don't have CLC auto-building set -- Kevin M. Rosenberg Sat, 1 Mar 2003 18:11:15 -0700 ilisp (5.12.0+cvs.2003.03.02) unstable; urgency=low * New upstream * Move .scm files to /usr/share/ilisp/, move .lisp files to /usr/share/common-lisp/source/ilisp/ * Use Common Lisp Controller to compile Common Lisp code (closes: 182963) -- Kevin M. Rosenberg Sat, 1 Mar 2003 10:39:16 -0700 ilisp (5.12.0+cvs.2003.02.23) unstable; urgency=low * New upstream (closes: 182116) -- Kevin M. Rosenberg Sun, 23 Feb 2003 21:18:48 -0700 ilisp (5.12.0+cvs.2003.02.22) unstable; urgency=low * Remove /etc/ilisp on purge -- Kevin M. Rosenberg Sat, 22 Feb 2003 22:44:02 -0700 ilisp (5.12.0+cvs.2003.02.16) unstable; urgency=low * New upstream version -- Kevin M. Rosenberg Mon, 17 Feb 2003 00:54:51 -0700 ilisp (5.12.0+cvs.2003.01.31) unstable; urgency=low * debian/copyright: Remove speculation about future GPL licensing -- Kevin M. Rosenberg Wed, 5 Feb 2003 23:56:34 -0700 ilisp (5.12.0+cvs.2003.01.30) unstable; urgency=low * New upstream (closes: 179037) -- Kevin M. Rosenberg Thu, 30 Jan 2003 08:08:07 -0700 ilisp (5.12.0+cvs.2003.01.11) unstable; urgency=low * Don't remove .el files from elc directory since upstream ilisp-mak.el does not compile all .el files. (closes: 175663) -- Kevin M. Rosenberg Sat, 11 Jan 2003 14:55:29 -0700 ilisp (5.12.0+cvs.2003.01.02) unstable; urgency=low * Happy New Year * New upstream version -- Kevin M. Rosenberg Thu, 2 Jan 2003 11:42:03 -0700 ilisp (5.12.0+cvs.2002.12.22.1) unstable; urgency=low * Policy says it's okay to have contrib packages be suggestions -- Kevin M. Rosenberg Sun, 22 Dec 2002 02:03:05 -0700 ilisp (5.12.0+cvs.2002.12.22) unstable; urgency=low * Remove Recommends that are in contrib section -- Kevin M. Rosenberg Sun, 22 Dec 2002 00:32:29 -0700 ilisp (5.12.0+cvs.2002.12.21) unstable; urgency=low * Change license to in accordance with ILISP Developer Questionnaire of Nov 20, 2002. * Move section from non-free/devel to devel now that license is DFSG-compatibile. -- Kevin M. Rosenberg Sat, 21 Dec 2002 09:55:32 -0700 ilisp (5.12.0+cvs.2002.12.12) unstable; urgency=low * Change short description (closes: 172820) -- Kevin M. Rosenberg Thu, 12 Dec 2002 13:00:43 -0700 ilisp (5.12.0+cvs.2002.12.11) unstable; urgency=low * Remove reference to common lisp controller (closes: 172559) -- Kevin M. Rosenberg Tue, 10 Dec 2002 15:24:47 -0700 ilisp (5.12.0+cvs.2002.12.10) unstable; urgency=low * Change where common-lisp-hyperspec-root is set (closes: 172557) -- Kevin M. Rosenberg Tue, 10 Dec 2002 14:26:54 -0700 ilisp (5.12.0+cvs.2002.12.05) unstable; urgency=low * Add README.Debian file -- Kevin M. Rosenberg Fri, 6 Dec 2002 00:03:28 -0700 ilisp (5.12.0+cvs.2002.12.03) unstable; urgency=low * New upstream (closes: 171001) -- Kevin M. Rosenberg Tue, 3 Dec 2002 13:41:01 -0700 ilisp (5.12.0+cvs.2002.11.12) unstable; urgency=low * New upstream (see upstream ChangeLog) -- Kevin M. Rosenberg Tue, 12 Nov 2002 09:18:06 -0700 ilisp (5.12.0+cvs.2002.11.10) unstable; urgency=low * Change program name for guile -- Kevin M. Rosenberg Mon, 10 Nov 2002 23:17:20 -0700 ilisp (5.12.0+cvs.2002.11.04) unstable; urgency=low * New upstream * Change permissions on install log (closes: 167724) -- Kevin M. Rosenberg Mon, 4 Nov 2002 08:03:51 -0700 ilisp (5.12.0+cvs.2002.10.25b) unstable; urgency=low * Rework handling of buffer-substring -- Kevin M. Rosenberg Fri, 25 Oct 2002 06:01:37 -0600 ilisp (5.12.0+cvs.2002.10.25a) unstable; urgency=low * ilxemacs.el: Call buffer-substring instead for xemacs20 compatibility. -- Kevin M. Rosenberg Fri, 25 Oct 2002 00:24:55 -0600 ilisp (5.12.0+cvs.2002.10.25) unstable; urgency=low * change buffer-substring to buffer-substring-no-properties (closes: 166232) * Make FSF-compliant keybindings user selectable -- Kevin M. Rosenberg Thu, 24 Oct 2002 20:51:16 -0600 ilisp (5.12.0+cvs.2002.09.27) unstable; urgency=low * Add support for openmcl to ilisp.el -- Kevin M. Rosenberg Fri, 27 Sep 2002 00:30:53 -0600 ilisp (5.12.0+cvs.2002.09.25) unstable; urgency=high * New upstream version * Fixes critical bug with using lispworks with emacs -- Kevin M. Rosenberg Wed, 25 Sep 2002 13:46:23 -0600 ilisp (5.12.0+cvs.2002.09.22) unstable; urgency=low * Add upstream's ChangeLog. -- Kevin M. Rosenberg Sun, 22 Sep 2002 14:22:44 -0600 ilisp (5.12.0+cvs.2002.09.20) unstable; urgency=low * Fix duplicated line in ilisp.el -- Kevin M. Rosenberg Sat, 21 Sep 2002 12:50:02 -0600 ilisp (5.12.0+cvs.2002.09.19) unstable; urgency=low * Remove user compiled files from /usr/lib/ilisp/ when package is purged. -- Kevin M. Rosenberg Thu, 19 Sep 2002 11:18:57 -0600 ilisp (5.12.0+cvs.2002.09.17) unstable; urgency=low * Latest CVS updates * Remove Common Lisp Controller functionality (closes: 161267) -- Kevin M. Rosenberg Tue, 17 Sep 2002 23:22:30 -0600 ilisp (5.12.0+cvs.2002.08.31) unstable; urgency=low * Sync to latest CVS changes -- Kevin M. Rosenberg Sun, 1 Sep 2002 00:18:01 -0600 ilisp (5.12.0+cvs.2002.08.23-3) unstable; urgency=low * Change ilisp.el startup sequence, improves autoloading with opening a lisp file. -- Kevin M. Rosenberg Sat, 31 Aug 2002 14:43:26 -0600 ilisp (5.12.0+cvs.2002.08.23-1) unstable; urgency=low * Newest CVS checkout -- Kevin M. Rosenberg Tue, 20 Aug 2002 15:21:14 -0600 ilisp (5.12.0-6) unstable; urgency=low * Move ilisp keybinding setting to toplevel of ilisp.el -- Kevin M. Rosenberg Tue, 20 Aug 2002 15:20:57 -0600 ilisp (5.12.0-5) unstable; urgency=low * Add preinst script to remove symlinks from older versions of ilisp -- Kevin M. Rosenberg Wed, 14 Aug 2002 15:08:49 -0600 ilisp (5.12.0-4) unstable; urgency=low * Add multiprocessing option to lispworks -- Kevin M. Rosenberg Wed, 14 Aug 2002 07:14:58 -0600 ilisp (5.12.0-3) unstable; urgency=low * Make new binary package, ilisp-doc, for PDF and HTML documentation. * Add to Build-Depends-Indep to support ilisp-docs * Fix name of file referenced in control file description -- Kevin M. Rosenberg Tue, 13 Aug 2002 12:23:32 -0600 ilisp (5.12.0-2) unstable; urgency=low * Add aliases for clisp. Now, names of all lisp interpreters have exact aliases (closes: 101924). * Clean rules files * Fix installation of info files * Add Build-Depends-Indep for texinfo * Change "make ilisp.info" to "make info" in rules file * Change from setting prefix to C-c to setting ilisp-*use-fsf-compliant-keybindings* to t -- Kevin M. Rosenberg Tue, 13 Aug 2002 10:47:03 -0600 ilisp (5.12.0-1) unstable; urgency=low * New Maintainer * New upstream version 5.12.0 (closes: 150397) * Update upstream's debian directory (closes: 150398) * Add ilisp.system (closes: 141881) * Fix compatibility with SBCL (closes: 151060) * Use default hyperspec directory (closes: 153124) * Update Standards-version in control file * Use Debhelper V4 and add Build-Depends-Indep record to control file * Add suggests field for hyperspec and cltl in control file * Change Common Lisp Controller from Suggests to Depends in control file * Change Depends from emacsen to emacsen-common in control file * Modify upstream to use Common Lisp Controller locations * Extend Craig's ilisp.system to support Lispworks and AllegroCL * Set more default paths in ilisp.el, including cltl and hyperspec paths * Add functions to ilisp.el to handle various CMUCL and AllegroCL flavors * Rework rules file to use debhelper functions to dh_install, dh_installdirs * Use dh_installinfo rather than manually installing, registering, and unregistering * Remove *.el files from /usr/share/${flavor}/site-lisp/ilisp/extra directory * Move .lisp and .system files to Common Lisp Controller locations * Add missing options to postrm * Added "changes compared to upstream" in copyright file to comply with Debian policy * Change upstream sources to CVS tree, remove URL that does not exist -- Kevin M. Rosenberg Mon, 12 Aug 2002 09:44:52 -0600 ilisp (5.11.1-7) unstable; urgency=low * well 125744 was fixed, but I put the files in the old place on accident. * Fixed 140049 - bad symlinks * Fixed 138669 - typo in ilisp-cmu * Fixed 137011 - ilisp-pkg issues -- Craig Brozefsky Mon, 25 Feb 2002 12:26:21 -0500 ilisp (5.11.1-6) unstable; urgency=low * common-lisp-controller support finally. This is the official interface for ILISP maintenance of source and compiled files for it's various CL based backends. * upstream updates, fresh baked from HEAD * closed 125744 ilisp-mak.el turn on * closed 98132 (use c-l-c now) take up with clisp maintainer * closed 128856 (use c-l-c now) cleanup is really cmucl's problem * closed 129980 (use c-l-c now) * closed 87652 (use c-l-c now) * closed 123631 (remaining changes are to be taken care of upstream) -- Craig Brozefsky Fri, 22 Feb 2002 12:26:21 -0500 ilisp (5.11.1-5) unstable; urgency=low * compile/install ilisp-imenu -- Craig Brozefsky Mon, 26 Nov 2001 12:26:21 -0500 ilisp (5.11.1-4) unstable; urgency=low * closed bug 121266 -- Craig Brozefsky Mon, 26 Nov 2001 12:26:21 -0500 ilisp (5.11.1-3) unstable; urgency=low * closed bug 98130 * closed bug 87751 -- Craig Brozefsky Fri, 23 Nov 2001 12:26:21 -0500 ilisp (5.11.1-2) unstable; urgency=low * closed bug 120767, includes cltl2.elc * fixed minor emacsen-install problem -- Craig Brozefsky Fri, 23 Nov 2001 11:26:21 -0500 ilisp (5.11.1-1) unstable; urgency=low * New upstream minor version * closed bug 85592, actually last version did. * closed bug 119931 with upstream fix. * closed bug 18825 -- Craig Brozefsky Thu, 22 Apr 2001 03:26:21 -0500 ilisp (5.11-1) unstable; urgency=low * New upstream version * closed bug 87752 -- Craig Brozefsky Tue, 17 Apr 2001 03:26:21 -0500 ilisp (5.10.1-1) unstable; urgency=low * New upstream version * Added a system defaults file in /etc/ilisp/ilisp.el which is loaded by the emacsen-startup code for ilisp only if ~/.ilisp is not readable. This is to allow users to customize ilisp fully, while allowing administrators to provide useful defaults * Craig Brozefsky takes over as maintainer from the original packager, Jesse Bouwman -- Craig Brozefsky Wed, 27 Dec 2000 03:26:21 -0500 ilisp (5.9.4-2) unstable; urgency=low * Add Karl Fogel's FSF keybindings, make them the default. -- Jesse L. Bouwman Fri, 4 Feb 2000 23:26:44 -0600 ilisp (5.9.4-1) unstable; urgency=low * Initial Release. -- Jesse L. Bouwman Wed, 2 Feb 2000 23:26:44 -0600 ilisp-5.12.0+cvs.2004.12.26/debian/compat0000600000175000001440000000000207662552613016210 0ustar mvelausers4 ilisp-5.12.0+cvs.2004.12.26/debian/control0000600000175000001440000000165110316221661016402 0ustar mvelausersSource: ilisp Section: devel Priority: optional Maintainer: Debian QA Group Build-Depends-Indep: debhelper (>= 4.1.16), csh, texinfo, tetex-bin, gs-common, texi2html Standards-Version: 3.6.2 Package: ilisp Architecture: all Depends: emacsen-common, ${misc:Depends} Pre-Depends: common-lisp-controller (>= 3.42) Recommends: ilisp-doc Suggests: hyperspec, cltl Description: Emacs interface to LISP implementations ILISP is a powerful GNU Emacs interface to many dialects of Lisp, including Lucid, Allegro, Harlequin LispWorks, GCL, KCL, AKCL, ECL, IBCL, and CMUCL. Also some Scheme implementations are supported as well as a preliminary version of Xlisp/XlispStat. Package: ilisp-doc Architecture: all Recommends: ilisp Description: Documentation for ILISP package This package supplies PDF and HTML documentation for the ILISP package. ILISP is a powerful GNU Emacs interface to many dialects of Lisp. ilisp-5.12.0+cvs.2004.12.26/debian/copyright0000600000175000001440000000673707620365612016755 0ustar mvelausersDebian Copyright File for ILISP package ======================================= This package was originally Debianized by Jesse Bouwman on Wed, 2 Feb 2000 23:26:44 -0600. It was later updated by Craig Brozefsky and Kevin M. Rosenberg . The home page for ILISP is http://www.sourceforge.net/projects/ilisp Upstream source was downloaded from the ILISP CVS tree. You can checkout the source with: cvs -d:pserver:anonymous@cvs.ilisp.sourceforge.net:/cvsroot/ilisp login cvs -d:pserver:anonymous@cvs.ilisp.sourceforge.net:/cvsroot/ilisp co ILISP Upstream Authors: Marco Antoniotti, Rick Campbell, Rick Busdiecker Ivan Vasquez, Chriss McConnell, and Many Contributors Original Upstream Copyright =========================== COPYING -- TERMS AND LICENSING AGREEMENT FOR ILISP ------------------------------------------------------------------------------- This file is part of ILISP. Version: 5.10.1 Date: 15 June 1999 Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell 1993, 1994 Ivan Vasquez 1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker 1996-2000 Marco Antoniotti and Rick Campbell Other authors' names for which this Copyright notice also holds may appear later in this file. GENERAL LICENSE AGREEMENT AND LACK OF WARRANTY This software is distributed in the hope that it will be useful (both in and of itself and as an example of lisp programming), but WITHOUT ANY WARRANTY. The author(s) do not accept responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all. No warranty is made about the software or its performance. Use and copying of this software and the preparation of derivative works based on this software are permitted, so long as the following conditions are met: o The copyright notice and this entire notice are included intact and prominently carried on all copies and supporting documentation. o If you modify this software, you must cause the modified file(s) to carry prominent notices (a Change Log) describing the changes, who made the changes, and the date of those changes. o Any work distributed or published that in whole or in part contains or is a derivative of this software or any part thereof is subject to the terms of this agreement. The aggregation of another unrelated program with this software or its derivative on a volume of storage or distribution medium does not bring the other program under the scope of these terms. o Permission is granted to manufacturers and distributors of lisp compilers and interpreters to include this software with their distribution. This software is made available AS IS, and is distributed without warranty of any kind, either expressed or implied. In no event will the author(s) or their institutions be liable to you for damages, including lost profits, lost monies, or other special, incidental or consequential damages arising out of or in connection with the use or inability to use (including but not limited to loss of data or data being rendered inaccurate or losses sustained by third parties or a failure of the program to operate as documented) the program, even if you have been advised of the possibility of such damanges, or for any claim by any other party, whether in an action of contract, negligence, or other tortious action. January 4th, 1995 # end of file -- COPYING -- ilisp-5.12.0+cvs.2004.12.26/debian/emacsen-install0000600000175000001440000000302207662455627020020 0ustar mvelausers#! /bin/sh set -e # Written by Jim Van Zandt , borrowing heavily # from the install scripts for gettext by Santiago Vila # and octave by Dirk Eddelbuettel . FLAVOR=$1 PACKAGE=ilisp if [ ${FLAVOR} = emacs ]; then exit 0; fi echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} HYPERSPEC=hyperspec.el #FLAVORTEST=`echo $FLAVOR | cut -c-6` #if [ ${FLAVORTEST} = xemacs ] ; then # SITEFLAG="-no-site-file" #else # SITEFLAG="--no-site-file" #fi FLAGS="${SITEFLAG} -q -batch -l path.el" ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} # Install-info-altdir does not actually exist. # Maybe somebody will write it. if test -x /usr/sbin/install-info-altdir; then echo install/${PACKAGE}: install Info links for ${FLAVOR} install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz fi install -m 755 -d ${ELCDIR} install -m 755 -d ${ELCDIR}/extra cd ${ELDIR} cp `echo *.el` ${ELCDIR} cd ${ELDIR}/extra cp ${HYPERSPEC} ${ELCDIR}/extra/hyperspec.el cp cltl2.el ${ELCDIR}/extra/cltl2.el cd ${ELCDIR} LOG=`tempfile`; trap "test -f $LOG && mv -f $LOG $ELCDIR/install.log > /dev/null 2>&1 && chmod 644 $ELCDIR/install.log" exit cat << EOF > path.el (setq load-path (cons "." load-path) byte-compile-warnings nil) (load "ilisp-mak.el") EOF ${FLAVOR} ${FLAGS} >> $LOG 2>&1; # Don't remove .el files since ilisp-mak.el does not compile all files # rm -f *.el path.el extra/*.el exit 0 ilisp-5.12.0+cvs.2004.12.26/debian/emacsen-remove0000600000175000001440000000071307526726210017637 0ustar mvelausers#!/bin/sh -e # /usr/lib/emacsen-common/packages/remove/ilisp FLAVOR=$1 PACKAGE=ilisp if [ ${FLAVOR} != emacs ]; then if test -x /usr/sbin/install-info-altdir; then echo remove/${PACKAGE}: removing Info links for ${FLAVOR} install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/ilisp.info.gz fi echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} fi ilisp-5.12.0+cvs.2004.12.26/debian/emacsen-startup0000600000175000001440000000162407526726210020046 0ustar mvelausers;; -*-emacs-lisp-*- ;; ;; Emacs startup file for the Debian GNU/Linux ilisp package ;; ;; Originally contributed by Nils Naumann ;; Modified by Dirk Eddelbuettel ;; Adapted for dh-make by Jim Van Zandt ;; The ilisp package follows the Debian/GNU Linux 'emacsen' policy and ;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, ;; xemacs19, emacs20, xemacs20...). The compiled code is then ;; installed in a subdirectory of the respective site-lisp directory. ;; We have to add this to the load-path: (setq load-path (nconc load-path (list (concat "/usr/share/" (if (boundp 'flavor) (symbol-name flavor) "emacs") "/site-lisp/ilisp")))) (if (file-readable-p "~/.ilisp") (load "~/.ilisp") (load "/etc/ilisp/ilisp.el")) ilisp-5.12.0+cvs.2004.12.26/debian/ilisp-doc.doc-base0000600000175000001440000000051010316217541020254 0ustar mvelausersDocument: ilisp Title: ILISP Author: ILISP Project Abstract: This manual describes the use of ILISP, an Emacs interface to Lisp environments. Section: Apps/Programming Format: PDF Files: /usr/share/doc/ilisp-doc/ilisp.pdf Format: HTML Index: /usr/share/doc/ilisp-doc/ilisp.html Files: /usr/share/doc/ilisp-doc/ilisp.html ilisp-5.12.0+cvs.2004.12.26/debian/ilisp-keybindings.el0000600000175000001440000000000007556150313020737 0ustar mvelausersilisp-5.12.0+cvs.2004.12.26/debian/ilisp.asd0000600000175000001440000000426707664723127016636 0ustar mvelausers;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: ilisp.asd ;;;; Purpose: ASDF system definition file for ilisp package ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: March 2003 ;;;; ;;;; $Id: ilisp.asd,v 1.7 2003/05/27 17:42:31 kevinrosenberg Exp $ ;;;; ;;;; UFFI users are granted the rights to distribute and use this software ;;;; as governed by the terms of the ILISP license. ;;;; ************************************************************************* (defpackage #:ilisp-system (:use #:cl #:asdf)) (in-package #:ilisp-system) (defun symlink-ilisp-fasls () (let ((fasls-path (merge-pathnames (make-pathname :directory '(:relative "ilisp")) c-l-c::*fasl-root*)) (dest-path (make-pathname :directory '(:absolute "usr" "lib" "ilisp")))) (format *trace-output* "~&Symlinking fasls~%") (dolist (fasl (directory (make-pathname :defaults fasls-path :name :wild :type :wild))) (format t "~S~%" fasl) (when (pathname-type fasl) ;; Crude check to avoid matching a directory (let ((symlink (make-pathname :directory (pathname-directory dest-path) :name (pathname-name fasl) :type (pathname-type fasl)))) (when (probe-file symlink) (delete-file symlink)) (let ((cmd (format nil "ln -sf ~A ~A" (namestring fasl) (namestring symlink)))) (run-shell-command cmd)) ))))) #+(or allegro clisp lispworks cmu openmcl sbcl) (defsystem :ilisp :name "ilisp" :maintainer "Kevin M. Rosenberg " :licence "ILISP license" :description "System loader for ILISP inferior-mode lisp interface" :perform (compile-op :after (op ilisp) (symlink-ilisp-fasls)) :components ((:file "ilisp-pkg") (:file "cl-ilisp" :depends-on ("ilisp-pkg")) #+allegro (:file "allegro" :depends-on ("cl-ilisp")) #+clisp (:file "cl-chs-init" :depends-on ("cl-ilisp")) #+cmu (:file "cmulisp" :depends-on ("cl-ilisp")) #+lispworks (:file "lispworks" :depends-on ("cl-ilisp")) #+openmcl (:file "openmcl" :depends-on ("cl-ilisp")) #+sbcl (:file "sbcl" :depends-on ("cl-ilisp")) )) ilisp-5.12.0+cvs.2004.12.26/debian/ilisp.config0000700000175000001440000000146010316217142017304 0ustar mvelausers#!/bin/sh # This is part of the scl-installer program: # http://b9.com/scl-installer.html # # Copyright (c) 2002 Kevin M. Rosenberg # # scl-installer is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License (version 2) as # published by the Free Software Foundation. # # scl-installer is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have a copy of the GNU General Public License on your # Debian system in the file /usr/share/common-licenses/GPL-2 set -e . /usr/share/debconf/confmodule db_input high ilisp/fsf-compliant || true db_go || true ilisp-5.12.0+cvs.2004.12.26/debian/ilisp.el0000600000175000001440000000751407706657334016470 0ustar mvelausers;;; -*- Mode: Emacs-Lisp -*- ;;; ;;; Copyright (c) 2002 Kevin Rosenberg GNU License (defvar ilisp-*directory* "/usr/lib/ilisp/") (require 'completer) (setq ilisp-*use-fsf-compliant-keybindings* t) (when (file-exists-p "/etc/ilisp/ilisp-keybindings.el") (load "/etc/ilisp/ilisp-keybindings.el")) (setq ilisp-*use-frame-for-output* nil) (setq ilisp-*use-frame-for-arglist-output-p* nil) (setq ilisp-motd nil) (autoload 'run-ilisp "ilisp" "Select a new inferior LISP." t) (autoload 'clisp-hs "ilisp" "Inferior CLISP Common LISP." t) (autoload 'allegro "ilisp" "Inferior Allegro Common Lisp." t) (autoload 'lispworks "ilisp" "Inferior Lispworks Common Lisp." t) (autoload 'openmcl "ilisp" "Inferior OpenMCL Common Lisp." t) (autoload 'scheme "ilisp" "Inferior generic Scheme." t) (autoload 'guile "ilisp" "Inferior Guile Scheme." t) (defun alisp () (interactive) (setq allegro-program "/usr/bin/alisp") (allegro)) (defun alisp8 () (interactive) (setq allegro-program "/usr/bin/alisp8") (allegro)) (defun mlisp () (interactive) (setq allegro-program "/usr/bin/mlisp") (allegro)) (defun mlisp8 () (interactive) (setq allegro-program "/usr/bin/mlisp8") (allegro)) (defun cmucl-normal () "Inferior CMU Common LISP -- normal core." (interactive) (setq cmulisp-program "/usr/bin/lisp -core /usr/lib/cmucl/lisp-normal.core") (cmulisp)) (defun cmucl-small () "Inferior CMU Common LISP -- small core." (interactive) (setq cmulisp-program "/usr/bin/lisp -core /usr/lib/cmucl/lisp-small.core") (cmulisp)) (defun cmucl-safe () "Inferior CMU Common LISP -- safe core." (interactive) (setq cmulisp-program "/usr/bin/lisp -core /usr/lib/cmucl/lisp-safe.core") (cmulisp)) (defun sbcl-mt () "SBCL multithreading." (interactive) (setq sbcl-program "/usr/bin/sbcl-mt --noinform") (sbcl)) (autoload 'sbcl "ilisp" "Inferior Steel Bank Common LISP." t) (autoload 'cmulisp "ilisp" "Inferior CMU Common LISP." t) (setq common-lisp-hyperspec-root "/usr/share/doc/hyperspec/") (setq cltl2-root-url "file:///usr/share/doc/cltl/") (setq ilisp-site-hook '(lambda () ;; delete any keybindings that start with this sequence, such ;; as oo-browser's bindings (global-unset-key [(control c) (control v)]) (setq clisp-hs-progam "clisp -a -I") (setq allegro-program "/usr/bin/acl") (setq lispworks-program "/usr/bin/lw-console -multiprocessing") (setq openmcl-program "/usr/bin/openmcl") (setq cmulisp-program "/usr/bin/lisp") (setq guile-program "/usr/bin/guile1.4") (setq cmulisp-local-source-directory "/usr/src/cmucl/") )) (add-hook 'ilisp-mode-hook '(lambda ())) ;; Loading lisp files starts ilisp (set-default 'auto-mode-alist (append '(("\\.lisp$" . lisp-mode) ("\\.lsp$" . lisp-mode) ("\\.cl$" . lisp-mode)) auto-mode-alist)) (add-hook 'lisp-mode-hook (function (lambda () (require 'ilisp)))) ;;; Load hooks (add-hook 'scheme-mode-hook (function (lambda () (require 'ilisp)))) (add-hook 'ilisp-load-hook '(lambda () (when ilisp-*use-fsf-compliant-keybindings* (setq ilisp-*prefix* "\C-c")) (setq lisp-no-popper t) ;; Make sure that you don't keep popping up the 'inferior ;; Lisp' buffer window when this is already visible in ;; another frame. Actually this variable has more impact ;; than that. Watch out. ; (setq pop-up-frames t) ;;(message "Running ilisp-load-hook") ;; Define LispMachine-like key bindings, too. ; (ilisp-lispm-bindings) Sample initialization hook. ;; Set the inferior Lisp directory to the directory of ;; the buffer that spawned it on the first prompt. (add-hook 'ilisp-init-hook '(lambda () (default-directory-lisp ilisp-last-buffer))) )) ilisp-5.12.0+cvs.2004.12.26/debian/ilisp.postinst0000600000175000001440000000417310140476616017735 0ustar mvelausers#! /bin/sh # postinst script for ilisp set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # # for details, see /usr/doc/packaging-manual/ # # quoting from the policy: # Any necessary prompting should almost always be confined to the # post-installation script, and should be protected with a conditional # so that unnecessary prompting doesn't happen if a package's # installation fails and the `postinst' is called with `abort-upgrade', # `abort-remove' or `abort-deconfigure'. pkg=ilisp conf_file=/etc/ilisp/ilisp-keybindings.el if [ -e /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule else exit 1 fi set_keybindings() { db_get $pkg/fsf-compliant if [ "$RET" = "true" ]; then echo "(setq ilisp-*use-fsf-compliant-keybindings* t)" > $conf_file else echo "(setq ilisp-*use-fsf-compliant-keybindings* nil)" > $conf_file fi } # Needed to work around version 5.12.0+cvs.2003.05.21 which # erroreously deleted symlinks in postrm. Thus, upgrades would not # work from that version without this work-around ensure_symlinks() { source=/usr/share/common-lisp/source/ilisp dest=/usr/lib/ilisp for i in $source/*.lisp ; do b=`basename $i` if [ ! -h "$dest/$b" ]; then ln -s $i $dest fi done source=/usr/share/ilisp for i in $source/*.scm ; do b=`basename $i` if [ ! -h "$dest/$b" ]; then ln -s $i $dest fi done } case "$1" in configure) set_keybindings chmod 777 /usr/lib/ilisp # Required so that users can build .fasl files /usr/sbin/register-common-lisp-source ilisp ensure_symlinks ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 0 ;; esac #DEBHELPER# exit 0 ilisp-5.12.0+cvs.2004.12.26/debian/ilisp.postrm0000600000175000001440000000145507664722553017411 0ustar mvelausers#!/bin/sh # postrm script for ilisp set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' overwrit>r> # for details, see /usr/doc/packaging-manual/ case "$1" in upgrade) ;; failed-upgrade|abort-upgrade) ;; remove|abort-install) rm -rf /usr/lib/ilisp/ ;; purge|disappear) rm -rf /usr/lib/ilisp/ /etc/ilisp ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 0 ;; esac #DEBHELPER# ilisp-5.12.0+cvs.2004.12.26/debian/ilisp.preinst0000600000175000001440000000133410316222046017521 0ustar mvelausers#! /bin/sh set -e # summary of how this script can be called: # * `install' # * `install' # * `upgrade' # * `abort-upgrade' case "$1" in install) ;; upgrade) set +e rm -f '/usr/lib/ilisp/*.scm' # remove bogus symlink for i in /usr/lib/ilisp/*; do b=`basename $i` # Don't delete symlinks with .lisp or .scm extension if [ `basename $b .lisp` = $b ] && [ `basename $b .scm` = $b ]; then #echo "Removing $i" rm $i fi done ;; abort-upgrade) ;; *) echo "preinst called with unknown argument \`$1'" >&2 exit 0 ;; esac #DEBHELPER# exit 0 ilisp-5.12.0+cvs.2004.12.26/debian/ilisp.prerm0000600000175000001440000000135207664721607017205 0ustar mvelausers#!/bin/sh # prerm script for ilisp set -e # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # * `deconfigure' `in-favour' # `removing' # # for details, see /usr/doc/packaging-manual/ case "$1" in remove|upgrade|deconfigure) /usr/sbin/unregister-common-lisp-source ilisp ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 0 ;; esac #DEBHELPER# exit 0 ilisp-5.12.0+cvs.2004.12.26/debian/ilisp.templates0000600000175000001440000000112010252460675020037 0ustar mvelausersTemplate: ilisp/fsf-compliant Type: boolean Default: true _Description: Use FSF-compliant keybindings? ILISP allows the choice of using FSF-compliant keybindings which start with a Control-C character. The older ILISP keybindings use a Control-Z character as the prefix. . In general, the non-FSF compliant keybindings are easier to use: the ILISP manual in the Debian package ilisp-doc uses the non-FSF compliant keybindings and these keybindings often use fewer keystrokes. . If you change your mind later, you can run dpkg-reconfigure ilisp and change your keybinding selection. ilisp-5.12.0+cvs.2004.12.26/debian/rules0000711000175000001440000000436310316221103016051 0ustar mvelausers#!/usr/bin/make -f # GNU copyright 1997 to 1999 by Joey Hess. # GNU copyright 2002 to 2003 Kevin Rosenberg pkg := ilisp pkg-doc := ilisp-doc emacs_dir := usr/share/emacs/site-lisp/$(pkg) ilisp_etc_dir := etc/ilisp ilisp_share := usr/share/ilisp cl_dir := usr/share/common-lisp/source/ilisp clc_systems := usr/share/common-lisp/systems compiled_dir := usr/lib/ilisp info_dir := usr/share/info doc_dir := usr/share/doc/$(pkg-doc) build: build-stamp build-stamp: dh_testdir # Add here commands to compile the package. $(MAKE) -C docs info pdf ilisp.html touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp # Add here commands to clean up after the build process. $(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs -p $(pkg) $(info_dir) $(emacs_dir) $(emacs_dir)/extra \ $(ilisp_etc_dir) $(ilisp_share) $(info_dir) dh_installdirs -p $(pkg-doc) $(doc_dir) $(cl_dir) dh_install -p $(pkg) $(wildcard *.el) $(emacs_dir) dh_install -p $(pkg) $(wildcard extra/*.el) $(emacs_dir)/extra dh_install -p $(pkg) $(wildcard *.lisp) debian/ilisp.asd $(cl_dir) dh_link $(cl_dir)/ilisp.asd $(clc_systems)/ilisp.asd dh_install -p $(pkg) $(wildcard *.scm) $(ilisp_share) dh_install -p $(pkg) debian/ilisp.el $(ilisp_etc_dir) dh_install -p $(pkg) debian/ilisp-keybindings.el $(ilisp_etc_dir) dh_installinfo -p $(pkg) docs/ilisp.info dh_installdirs -p $(pkg) $(compiled_dir) for i in debian/$(pkg)/$(cl_dir)/*.lisp; do \ l=`echo $$i | sed -e "s|^debian/$(pkg)/$(cl_dir)/||;"` ;\ dh_link -p $(pkg) $(cl_dir)/$$l $(compiled_dir)/$$l ; \ done for i in debian/$(pkg)/$(ilisp_share)/*.scm; do \ l=`echo $$i | sed -e "s|^debian/$(pkg)/$(ilisp_share)/||;"` ;\ dh_link -p $(pkg) $(ilisp_share)/$$l $(compiled_dir)/$$l ; \ done dh_install -p $(pkg-doc) docs/ilisp.pdf docs/ilisp.html $(doc_dir) binary-indep: build install dh_testdir dh_testroot dh_installchangelogs ChangeLog dh_installdocs README dh_installemacsen dh_installdebconf dh_compress dh_fixperms dh_installdeb dh_gencontrol dh_md5sums dh_builddeb # Build architecture-dependent files here. binary-arch: build install binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install ilisp-5.12.0+cvs.2004.12.26/debian/po/0000700000175000001440000000000010324774524015422 5ustar mvelausersilisp-5.12.0+cvs.2004.12.26/debian/po/POTFILES.in0000600000175000001440000000005210024131444017157 0ustar mvelausers[type: gettext/rfc822deb] ilisp.templates ilisp-5.12.0+cvs.2004.12.26/debian/po/fr.po0000600000175000001440000000503010252461123016355 0ustar mvelausers# translation of fr.new.po to French # # Translators, if you are not familiar with the PO format, gettext # documentation is worth reading, especially sections dedicated to # this format, e.g. by running: # info -n '(gettext)PO Files' # info -n '(gettext)Header Entry' # Some information specific to po-debconf are available at # /usr/share/doc/po-debconf/README-trans # or http://www.debian.org/intl/l10n/po-debconf/README-trans# # Developers do not need to manually edit POT or PO files. # Emmanuel le Chevoir , 2004. # msgid "" msgstr "" "Project-Id-Version: ilisp-5.12.0+cvs.2004.03.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2005-06-11 06:01+0200\n" "PO-Revision-Date: 2004-03-17 12:15+0100\n" "Last-Translator: Emmanuel le Chevoir \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.3.1\n" #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "Use FSF-compliant keybindings?" msgstr "Utiliser des associations de touches conformes aux normes FSF ?" #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "ILISP allows the choice of using FSF-compliant keybindings which start with " "a Control-C character. The older ILISP keybindings use a Control-Z character " "as the prefix." msgstr "" "ILISP vous permet d'utiliser des associations de touches (« keybindings ») " "conformes aux normes de la FSF pour les combinaisons basées sur Ctrl-C. Les " "anciennes associations de touches d'ILISP utilisent la séquence Ctrl-Z comme " "préfixe." #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "In general, the non-FSF compliant keybindings are easier to use: the ILISP " "manual in the Debian package ilisp-doc uses the non-FSF compliant " "keybindings and these keybindings often use fewer keystrokes." msgstr "" "En général, les associations de touches non conformes aux normes FSF sont " "plus simples à utiliser : le manuel ILISP du paquet debian ilisp-doc utilise " "ces associations de touches, qui sont souvent composées de séquences de " "touches plus courtes." #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "If you change your mind later, you can run dpkg-reconfigure ilisp and change " "your keybinding selection." msgstr "" "Si vous changez d'avis ultérieurement, vous pourrez utiliser la commande " "« dpkg-reconfigure ilisp » pour modifier le type d'association de touches." ilisp-5.12.0+cvs.2004.12.26/debian/po/templates.pot0000644000175000001440000000326110252461065020151 0ustar mvelausers# # Translators, if you are not familiar with the PO format, gettext # documentation is worth reading, especially sections dedicated to # this format, e.g. by running: # info -n '(gettext)PO Files' # info -n '(gettext)Header Entry' # # Some information specific to po-debconf are available at # /usr/share/doc/po-debconf/README-trans # or http://www.debian.org/intl/l10n/po-debconf/README-trans # # Developers do not need to manually edit POT or PO files. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2005-06-11 06:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "Use FSF-compliant keybindings?" msgstr "" #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "ILISP allows the choice of using FSF-compliant keybindings which start with " "a Control-C character. The older ILISP keybindings use a Control-Z character " "as the prefix." msgstr "" #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "In general, the non-FSF compliant keybindings are easier to use: the ILISP " "manual in the Debian package ilisp-doc uses the non-FSF compliant " "keybindings and these keybindings often use fewer keystrokes." msgstr "" #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "If you change your mind later, you can run dpkg-reconfigure ilisp and change " "your keybinding selection." msgstr "" ilisp-5.12.0+cvs.2004.12.26/debian/po/cs.po0000600000175000001440000000416110252461110016353 0ustar mvelausers# # Translators, if you are not familiar with the PO format, gettext # documentation is worth reading, especially sections dedicated to # this format, e.g. by running: # info -n '(gettext)PO Files' # info -n '(gettext)Header Entry' # # Some information specific to po-debconf are available at # /usr/share/doc/po-debconf/README-trans # or http://www.debian.org/intl/l10n/po-debconf/README-trans # # Developers do not need to manually edit POT or PO files. # msgid "" msgstr "" "Project-Id-Version: ilisp\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2005-06-11 06:01+0200\n" "PO-Revision-Date: 2004-10-29 12:06+0200\n" "Last-Translator: Miroslav Kure \n" "Language-Team: Czech \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-2\n" "Content-Transfer-Encoding: 8bit\n" #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "Use FSF-compliant keybindings?" msgstr "Pou¾ít klávesové zkratky podle FSF?" #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "ILISP allows the choice of using FSF-compliant keybindings which start with " "a Control-C character. The older ILISP keybindings use a Control-Z character " "as the prefix." msgstr "" "Mù¾ete si vybrat, zda má ILISP pou¾ívat klávesové zkratky kompatibilní s FSF " "(zaèínají Control-C), nebo zda má pou¾ít star¹í konvenci (prefix je Control-" "Z)." # zaèíná #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "In general, the non-FSF compliant keybindings are easier to use: the ILISP " "manual in the Debian package ilisp-doc uses the non-FSF compliant " "keybindings and these keybindings often use fewer keystrokes." msgstr "" "Obecnì jsou ne-FSF zkratky jednodu¹¹í na pou¾ití a èasto vy¾adují ménì " "kláves. ILISPový manuál v balíku ilisp-doc také pou¾ívá tuto konvenci." #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "If you change your mind later, you can run dpkg-reconfigure ilisp and change " "your keybinding selection." msgstr "" "Pokud se pozdìji rozhodnete jinak, mù¾ete kdykoliv spustit pøíkaz 'dpkg-" "reconfigure ilisp'." ilisp-5.12.0+cvs.2004.12.26/debian/po/de.po0000600000175000001440000000453310252461134016347 0ustar mvelausers# # Translators, if you are not familiar with the PO format, gettext # documentation is worth reading, especially sections dedicated to # this format, e.g. by running: # info -n '(gettext)PO Files' # info -n '(gettext)Header Entry' # Some information specific to po-debconf are available at # /usr/share/doc/po-debconf/README-trans # or http://www.debian.org/intl/l10n/po-debconf/README-trans# # Developers do not need to manually edit POT or PO files. # Erik Schanze , 2004. # msgid "" msgstr "" "Project-Id-Version: ilisp_5.12.0+cvs.2004.03.19_templates\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2005-06-11 06:01+0200\n" "PO-Revision-Date: 2004-08-02 08:53+0200\n" "Last-Translator: Erik Schanze \n" "Language-Team: German \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.3.1\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "Use FSF-compliant keybindings?" msgstr "FSF-konforme Tastenkürzel benutzen?" #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "ILISP allows the choice of using FSF-compliant keybindings which start with " "a Control-C character. The older ILISP keybindings use a Control-Z character " "as the prefix." msgstr "" "Sie haben die Wahl zwischen FSF-konformen Tastenkürzeln, die mit STRG-c " "beginnen, oder den alten ILISP-Tastenkürzeln, die mit STRG-z anfangen. " #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "In general, the non-FSF compliant keybindings are easier to use: the ILISP " "manual in the Debian package ilisp-doc uses the non-FSF compliant " "keybindings and these keybindings often use fewer keystrokes." msgstr "" "Die alten ILISP-Tastenkürzel sind allgemein einfacher zu benutzen, das " "ILISP- Handbuch im Debian-Paket ilisp-doc verwendet diese auch und diese " "Tastenkürzel erfordern meist weniger Tastenanschläge." #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "If you change your mind later, you can run dpkg-reconfigure ilisp and change " "your keybinding selection." msgstr "" "Wenn Sie das später andern wollen, starten Sie dpkg-reconfigure ilisp und " "ändern die Einstellung der Tastenkürzel." ilisp-5.12.0+cvs.2004.12.26/debian/po/vi.po0000644000175000001440000000413710252461144016406 0ustar mvelausers# Vietnamese Translation for ilisp. # Copyright © 2005 Free Software Foundation, Inc. # Clytie Siddall , 2005. # msgid "" msgstr "" "Project-Id-Version: ilisp 5.12.0+cvs.2004.12.23\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2005-06-11 06:01+0200\n" "PO-Revision-Date: 2005-06-04 21:16+0930\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0\n" #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "Use FSF-compliant keybindings?" msgstr "Sá»­ dụng tổ hợp phím thuân theo FSF không?" #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "ILISP allows the choice of using FSF-compliant keybindings which start with " "a Control-C character. The older ILISP keybindings use a Control-Z character " "as the prefix." msgstr "" "Trình ILISP cho phép chá»n tổ hợp phím thuân theo Tổ chức Phần má»m Tá»± do " "(Free Software Foundation: FSF) mà bắt đầu vá»›i má»™t ký tá»± Ctrl-C. Những tổ " "hợp phím cÅ© hÆ¡n dùng má»™t ký tá»± Ctrl-Z là tiá»n tố." #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "In general, the non-FSF compliant keybindings are easier to use: the ILISP " "manual in the Debian package ilisp-doc uses the non-FSF compliant " "keybindings and these keybindings often use fewer keystrokes." msgstr "" "Thưá»ng, dá»… hÆ¡n sá»­ dụng tổ hợp phím không phải thuân theo FSF: tài liệu hướng " "dẫn ILISP trong gói tin Debian «ilisp-doc» dùng tổ hợp phím không phải thuân " "theo FSF và Ä‘iá»u này dùng ít lần bấm phím hÆ¡n." #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "" "If you change your mind later, you can run dpkg-reconfigure ilisp and change " "your keybinding selection." msgstr "" "Nếu lần sau bạn thay đổi ý kiến thì có thể chạy «dpkg-reconfigure ilisp» và " "sá»­a đổi tùy chá»n tổ hợp phím." ilisp-5.12.0+cvs.2004.12.26/debian/po/sv.po0000644000175000001440000000450510324774477016437 0ustar mvelausers# # Translators, if you are not familiar with the PO format, gettext # documentation is worth reading, especially sections dedicated to # this format, e.g. by running: # info -n '(gettext)PO Files' # info -n '(gettext)Header Entry' # # Some information specific to po-debconf are available at # /usr/share/doc/po-debconf/README-trans # or http://www.debian.org/intl/l10n/po-debconf/README-trans # # Developers do not need to manually edit POT or PO files. # msgid "" msgstr "" "Project-Id-Version: ilisp 5.12.0+cvs.2004.12.25\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2005-06-11 06:01+0200\n" "PO-Revision-Date: 2005-10-16 09:41+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Swedish\n" "X-Poedit-Country: SWEDEN\n" "X-Poedit-SourceCharset: iso-8859-1\n" #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "Use FSF-compliant keybindings?" msgstr "Använda FSF-standardiserade tangentmappningar?" #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "ILISP allows the choice of using FSF-compliant keybindings which start with a Control-C character. The older ILISP keybindings use a Control-Z character as the prefix." msgstr "ILISP ger valet att använda en FSF-standardiserade tangentmappning som startar med ett Control-C tecken. Den äldre ILISP-tangentmappning anväde ett Control-Z tecken som prefix." #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "In general, the non-FSF compliant keybindings are easier to use: the ILISP manual in the Debian package ilisp-doc uses the non-FSF compliant keybindings and these keybindings often use fewer keystrokes." msgstr "Generellt sett är icke-FSF-standardiserade tangentmappningar lättare att använda: ILISP-manualen i Debian-paketet ilisp-doc använder icke-FSF-standardiserade tangentmappningar och dessa tangentmappningar använder oftast färre tangenttryckningar." #. Type: boolean #. Description #: ../ilisp.templates:4 msgid "If you change your mind later, you can run dpkg-reconfigure ilisp and change your keybinding selection." msgstr "Om du ändrar dig senare kan du köra 'dpkg-reconfigure ilisp' och ändra ditt val av tangentmappning." ilisp-5.12.0+cvs.2004.12.26/docs/0000700000175000001440000000000010316222407014477 5ustar mvelausersilisp-5.12.0+cvs.2004.12.26/docs/Makefile0000600000175000001440000000376007527473677016202 0ustar mvelausers# -*- Mode: Makefile -*- # Makefile -- # # This file is part of ILISP. # Please refer to the file COPYING for copyrights and licensing # information. # Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list # of present and past contributors. # # $Id: Makefile,v 1.7 2002/08/17 16:20:15 kevinrosenberg Exp $ # Note: this makefile assumes GNU make #============================================================================== # Various Variables Version = 5.12.0 # The SHELL variable is used only for making the distribution. SHELL = /bin/sh # The 'rm' command used (we redefine it mostly because it may be # aliased RM = /bin/rm -f LN = /bin/ln DVIPS = dvips DocFiles = ilisp.texi ilisp-refcard.tex # Debris (also known as temporary files) produced by texi2dvi DVIDebris = *.aux *.cp *.cps *.fn *.fns *.ky *.kys *.log *.pg *.pgs \ *.toc *.tp *.vr *.vrs HTML_Target_Dir = html/doc HTML_Targets = ilisp.ps ilisp.pdf ilisp_toc.html ilisp.html #============================================================================== # Rules # KMR: Add .PHONY so that make system will build html rule rather that look at html directory .PHONY: html docs: ps pdf info html ps: ilisp.ps ilisp-refcard.ps ilisp.ps: ilisp.dvi $(DVIPS) -o $@ $< ilisp-refcard.ps: ilisp-refcard.dvi $(DVIPS) -o $@ $< dvi: ilisp.dvi ilisp-refcard.dvi info: ilisp.info html: ilisp.texi -texi2html $< ilisp_toc.html ilisp.html: html pdf: ilisp.pdf ilisp.pdf: ilisp.ps -ps2pdf ilisp.ps ilisp.pdf ilisp.dvi: ilisp.texi ilisp-refcard.dvi: ilisp-refcard.tex tex $< # Administrative targets. updatehtml: $(HTML_Targets) -(cd $(HTML_Target_Dir); $(RM) $(HTML_Targets)) -$(LN) $(HTML_Targets) $(HTML_Target_Dir) clean: -$(RM) $(DVIDebris) \ ilisp.dvi \ ilisp.ps \ ilisp*.html \ ilisp.info* \ ilisp.pdf \ ilisp-refcard.dvi \ ilisp-refcard.ps \ *~ tmpclean: -$(RM) $(DVIDebris) # end of file -- Makefile -- ilisp-5.12.0+cvs.2004.12.26/docs/README0000600000175000001440000000060607204241221015360 0ustar mvelausersILISP DOCUMENTATION =================== ILISP is a powerful GNU Emacs interface to many dialects of Lisp. This is the 'docs' directory. Using 'make' you can produce .dvi, .ps and .info files for ILISP, starting from the 'ilisp.texi' file. There is also the reference card 'ilisp-refcard.tex' which you may find useful (provided by Valentino Kyriakides). Enjoy, The ILISP Maintainers ilisp-5.12.0+cvs.2004.12.26/docs/doc-changes.txt0000600000175000001440000001247407100037046017425 0ustar mvelausers2000-04-21 Paolo Amoroso * doc/doc-changes.txt: Restored information lost in the move to SourceForge. WARNING: This file is now obsolete and it will no longer be maintained. It may be removed in future releases. From now on all changes will be logged through CVS. For a list of changes from 2000-02-15 to the ILISP 5.10.1 release see the HISTORY file which comes with the 5.10.1 distribution. 2000-02-15 Paolo Amoroso * doc/ilisp.texi: Added @key formatting to some index entries. 2000-02-07 Paolo Amoroso * doc/ilisp.texi (Files of ILISP): added entry for ilisp-sbcl.el. * INSTALLATION, doc/ilisp.texi (installation instructions): replaced unnecessary references to explicit version numbers in files (e.g. 5.9.4) with generic ones (i.e. x.y.z). 2000-02-03 Karl Fogel * doc/ilisp.texi (Keybindings): new node, document the FSF-compliant keybinding situation. (Miscellany): removed mention of ] for `close-all-lisp' (see change to `lisp-bindings' in ilisp-key.el, below). Changes to ilisp.texi (from the draft for version 5.9 to 5.9.4) --------------------------------------------------------------- (lesson learned from maintaining this file: I should have sorted and grouped entries by date - Paolo Amoroso ;-) -- Updated version information about ILISP and the manual. -- Merged changes (based on an old version of the document) done by Marco and distributed with 5.9 (let's hope everything is OK ;-) -- Added the @finalout directive to prevent TeX from marking overfulls. -- Split the @author directive over two lines to fix a huge overfull. -- Updated and sorted the list of contributors in section "Acknowledgments" (double check it). -- Updated the entry about dialect support in the list of ILISP features of section "Introduction". -- Added info about ILISP-BUG in section "How to get the latest ILISP distribution". -- Renamed section "FTP and WWW directions" to "FTP and Web directions" (the term WWW is out of fashion: now everybody calls it the Web; okay, it's a marketing trick to make ILISP look modern :) -- Added an item about ILD to the list of ILISP features in section "Introduction". -- Updated sections "How to install ILISP" and "Configuration and compilation" (formerly "Makefile configuration"). -- Added to section "How to install ILISP" info about the HyperSpec packages included with ILISP. -- Renamed section "Makefile configuration" to "Configuration and compilation" (it deals with more than makefile configuration). -- Removed section "How to define autoload entries". Now section "Configuration and compilation" provides appropriate instructions for using ilisp.emacs. -- Updated section "Files of ILISP". Now files are sorted alphabetically. -- Added attribute @code to the dialect names in the bullet list of section "How to run a Lisp process using ILISP". Now dialect names are sorted alphabetically. -- Rearranged the text of section "How to run a Lisp process using ILISP" so that the dialect tree is not split over two pages. -- Added XLisp and XLisp-Stat to section "How to run a Lisp process using ILISP". -- Added some info on Scheme->C support to section "How to run a Lisp process using ILISP". -- Added in section "Eval and compile functions" info about the initializations performed by the very first inferior Lisp command executed by the user (from a note at the end of the Texinfo source for the 5.9 draft, after the @bye directive; the info about the *ILISP-SEND* buffer was already in the manual). -- Documented ILISP-ARGLIST-MESSAGE-LISP-SPACE in section "Documentation functions". -- Added in section "Documentation functions" info about the HyperSpec lookup command, and warned that the fi:clman module is no longer loaded by default. -- Fixed keybindings for SET-BUFFER-PACKAGE-LISP and SET-PACKAGE-LISP in section "Package Commands". Removed from the same section the description of PACKAGE-LISP, which is no longer included with ILISP. -- Added info about TRACE-DEFUN-LISP-BREAK in section "Tracing functions" (from the TODO comment in the Texinfo source for the 5.9 draft; the comment mentioned TRACE-DEFUN-BREAK). -- Added section "Interface to Lisp debuggers" on ILD after "Interrupts, aborts, and errors". -- Added info about BOL-ILISP in section "Miscellany" (from a note at the end of the Texinfo source for the 5.9 draft, after the @bye directive). -- Added info about BACKWARD-DELETE-CHAR-UNTABIFY in section "Miscellany" (from a note at the end of the Texinfo source for the 5.9 draft, after the @bye directive). -- Added XLisp and XLisp-Stat to the hierarchy of section "ILISP customization". -- The hierarchies of Lisp dialects are now sorted alphabetically wherever possible. They have also been updated with newly supported Scheme dialects. -- Renamed the top level Common Lisp dialect from clisp to common-lisp. -- Renamed with a consistent capitalization all occurrences of Emacs, LEmacs, XEmacs, Lisp, etc. (I suspect that when people read the word LISP, they think to McCarthy's LISP 1.5 of the early sixties...). -- Marked Scheme support as experimental. -- Added several index entries. -- Corrected a few typos. ilisp-5.12.0+cvs.2004.12.26/docs/ilisp-refcard.tex0000600000175000001440000005070307530511444017762 0ustar mvelausers% Reference Card for the ilisp Interface, as reported in ilisp-5.8. % Last edited: Sat Sep 27 20:07:53 1997 by vkyr (Valentino Kyriakides) %**start of header \newcount\columnsperpage % This file can be printed with 1, 2, or 3 columns per page (see below). % Specify how many you want here. Nothing else needs to be changed. \columnsperpage=3 % Copyright (c) 1997 by no one. e.g. distribute it at will, subject to % permissions below. % % Author: (e.g. please send obvious bugs to) % Valentino Kyriakides % Internet: kyriakides@lavielle.com % % Of course, no one makes any claims on this, nor do I promise to "support" it. % Thanks to Stephen Gildea, Paul Rubin, Bob Chassell, Len Tower, % and Richard Mlynarik for the excellent GNU Emacs reference card on which % this is based. % % The idea of this was to have a piece of paper that prods your memory if % you've forgotten the name of a function, a keybinding, etc. It assumes % pretty serious familiarity with the ilisp manual, but hopefully saves the effort % (in conjunction with all the manuals) of lugging out a % printed copy in most cases. It of course reflects my (the author's) % biases about what was likely to be interesting or used often. % % To view, do 'tex ilisp-refcard.tex'. % To print if you use columnsperpage=3, you must use have a dvips-like % program that prints in landscape format! % This file is distributed in the hope that it will be useful, but WITHOUT % ANY WARRANTY. No author or distributor accepts responsibility to anyone % for the consequences of using it or for whether it serves any particular % purpose or describes any piece of software unless they say so in writing. % % Permission is granted to copy, modify and redistribute this source % file provided the permission notices are preserved on all copies. % % Permission is granted to process this file with TeX and print the results. % This file is intended to be processed by plain TeX (TeX82). % % The final reference card has six columns, three on each side. % This file can be used to produce it in any of three ways: % 1 column per page % produces six separate pages, each of which needs to be reduced to 80%. % This gives the best resolution. % 2 columns per page % produces three already-reduced pages. % You will still need to cut and paste. % 3 columns per page % produces two pages which must be printed sideways to make a % ready-to-use 8.5 x 11 inch reference card. % For this you need a dvi device driver that can print sideways. % Which mode to use is controlled by setting \columnsperpage above. \def\versionnumber{1.0} \def\year{1997} \def\version{September \year\ v\versionnumber} \def\shortcopyrightnotice{\vskip 1ex plus 2 fill \centerline{\small September \year by Valentino Kyriakides. Permissions on back. v\versionnumber}} \def\copyrightnotice{ \vskip 1ex plus 2 fill\begingroup\small \centerline{Designed by Valentino Kyriakides (kyriakides@lavielle.com), 9/97.} \centerline{Permission is granted to make \& distribute copies} \centerline{of this card provided this permission notice is preserved.} \endgroup} % =================================================================== % Macros to define this "mode". % =================================================================== % % make \bye not \outer so that the \def\bye in the \else clause below % can be scanned without complaint. \def\bye{\par\vfill\supereject\end} \newdimen\intercolumnskip \newbox\columna \newbox\columnb \def\ncolumns{\the\columnsperpage} \message{[\ncolumns\space column\if 1\ncolumns\else s\fi\space per page]} \def\scaledmag#1{ scaled \magstep #1} % This multi-way format was designed by Stephen Gildea October 1986. \if 1\ncolumns \hsize 4in \vsize 10in \voffset -.7in \font\titlefont=\fontname\tenbf \scaledmag4 \font\secfont=\fontname\tenbf \scaledmag3 \font\subsecfont=\fontname\tenbf \scaledmag2 \font\smallfont=\fontname\sevenrm \font\smallsy=\fontname\sevensy \footline{\hss\folio} \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}} \else \hsize 3.2in \vsize 7.95in \hoffset -.75in \voffset -.745in \font\titlefont=cmbx10 \scaledmag3 \font\secfont=cmbx10 \scaledmag2 \font\subsecfont=cmbx10 \scaledmag1 \font\smallfont=cmr6 \font\smallsy=cmsy6 \font\eightrm=cmr8 \font\eightbf=cmbx8 \font\eightit=cmti8 \font\eighttt=cmtt8 \font\eightsy=cmsy8 \textfont0=\eightrm \textfont2=\eightsy \def\rm{\eightrm} \def\bf{\eightbf} \def\it{\eightit} \def\tt{\eighttt} \normalbaselineskip=.8\normalbaselineskip \normallineskip=.8\normallineskip \normallineskiplimit=.8\normallineskiplimit \normalbaselines\rm %make definitions take effect \if 2\ncolumns \let\maxcolumn=b \footline{\hss\rm\folio\hss} \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}} \else \if 3\ncolumns \let\maxcolumn=c \nopagenumbers \else \errhelp{You must set \columnsperpage equal to 1, 2, or 3.} \errmessage{Illegal number of columns per page} \fi\fi \intercolumnskip=.46in \def\abc{a} \output={% % This next line is useful when designing the layout. %\immediate\write16{Column \folio\abc\space starts with \firstmark} \if \maxcolumn\abc \multicolumnformat \global\def\abc{a} \else\if a\abc \global\setbox\columna\columnbox \global\def\abc{b} %% in case we never use \columnb (two-column mode) \global\setbox\columnb\hbox to -\intercolumnskip{} \else \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi} \def\multicolumnformat{\shipout\vbox{\makeheadline \hbox{\box\columna\hskip\intercolumnskip \box\columnb\hskip\intercolumnskip\columnbox} \makefootline}\advancepageno} \def\columnbox{\leftline{\pagebody}} \def\bye{\par\vfill\supereject \if a\abc \else\null\vfill\eject\fi \if a\abc \else\null\vfill\eject\fi \end} \fi % we won't be using math mode much, so redefine some of the characters % we might want to talk about \catcode`\^=12 \catcode`\_=12 \chardef\\=`\\ \chardef\{=`\{ \chardef\}=`\} \hyphenation{mini-buf-fer} \parindent 0pt \parskip 1ex plus .5ex minus .5ex \def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip} \outer\def\newcolumn{\vfill\eject} %\outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex} %% KOT redefined a bit \outer\def\title#1#2{{\titlefont\centerline{#1}}{\titlefont\centerline{#2}}\vskip 1ex plus .5ex} %\outer\def\section#1{\par\filbreak % \vskip 3ex plus 2ex minus 2ex {\subsecfont #1}\mark{#1}% % \vskip 2ex plus 1ex minus 1.5ex} %% KOT redefined to cram more on \outer\def\section#1{\vfill\par\filbreak \vskip 3.0ex plus 0.95ex minus 1.7ex {\secfont #1}\mark{#1}% \vskip 1.8ex plus 0.9ex minus 1.15ex} \outer\def\subsection#1{\vfill\par\filbreak \vskip 3.0ex plus 0.95ex minus 1.7ex {\subsecfont #1}\mark{#1}% \vskip 1.8ex plus 0.9ex minus 1.15ex} \outer\def\shortsubsection#1{\vfill\par\filbreak \vskip 1.0ex plus 0.95ex minus 1.7ex {\subsecfont #1}\mark{#1}% \vskip 0.8ex plus 0.9ex minus 1.15ex} \newdimen\keyindent \def\beginindentedkeys{\keyindent=1em} \def\endindentedkeys{\keyindent=0em} \endindentedkeys \def\paralign{\vskip\parskip\halign} \def\<#1>{$\langle${\rm #1}$\rangle$} \def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows \def\beginexample{\par\leavevmode\begingroup \obeylines\obeyspaces\parskip0pt\tt} {\obeyspaces\global\let =\ } \def\endexample{\endgroup} \def\key#1#2{\leavevmode\hbox to \hsize{\vtop {\hsize=.79\hsize\rightskip=1em \hskip\keyindent\relax#1}\kbd{#2}\hfil}} \def\com#1#2{\leavevmode\hbox to \hsize{\vtop {\hsize=.306\hsize\rightskip=1em \hskip\keyindent\relax#1}\kbd{#2}\hfil}} \def\lcom#1#2{\leavevmode\hbox to \hsize{\vtop {\hsize=.49\hsize\rightskip=1em \hskip\keyindent\relax#1}\kbd{#2}\hfil}} \newbox\metaxbox \setbox\metaxbox\hbox{\kbd{M-x }} \newdimen\metaxwidth \metaxwidth=\wd\metaxbox \def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize {\hskip\keyindent\relax#1\hfil}% \hskip -\metaxwidth minus 1fil \kbd{#2}\hfil}} \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad &\kbd{#3}\quad\cr} %**end of header % =================================================================== % Real refcard related things start here. % =================================================================== \title{ilisp/Emacs}{Interface Reference Card} \centerline{(for Gnu Emacs , XEmacs)} This reference card is a quick-and-dirty guide to those parts of the ilisp manual, which are likely to be used often. It includes most of the ilisp Interface to emacs, plus many of the extensions defined in the {\it ilisp online help}. It is {\it not} a substitute for the ilisp online manual. \section{The ilisp/Emacs Interface } You can use the ilisp interface from either GNU Emacs or XEmacs. Put these lines in your {\tt .emacs} file for clisp and allegro: \kbd{(setq load-path (cons (expand-file-name } \hskip 25pt \kbd{"/usr/local/lib/ilisp-5.8/") load-path))} \kbd{(require 'completer)} \kbd{(autoload 'clisp "ilisp" } \hskip 25pt \kbd{"Inferior generic Common LISP." t)} \kbd{(setq clisp-program "/usr/local/bin/clisp -I")} \kbd{(autoload 'allegro "ilisp" } \hskip 25pt \kbd{ "Inferior Allegro Common LISP." t)} \kbd{(setq allegro-program "/usr/local/bin/cl")} Then invoke lisp with either \kbd{M-x clisp}, or with \kbd{M-x allegro}. `C-z' is the prefix-key for most ILISP commands. This can be changed by setting the variable `ilisp-prefix'. For online help with emacs, use \kbd{C-h f}, \kbd{describe-function}. \shortsubsection{Interrupts, aborts and errors} If you want to abort the last command you can use `C-g'. If you want to abort all commands, you should use the command `abort-commands-lisp' (`C-z g'). Commands that are aborted will be put in the buffer `*Aborted Commands*' so that you can see what was aborted. If you want to abort the currently running top-level command, use `interrupt-subjob-ilisp' (`C-c C-c'). As a last resort, `M-x panic-lisp' will reset the ILISP state without affecting the inferior LISP so that you can see what is happening. `delete-char-or-pop-ilisp' (`C-d') will delete prefix characters unless you are at the end of an ILISP buffer in which case it will pop one level in the break loop. `reset-ilisp', (`C-z z') will reset the current inferior LISP's top-level so that it will no longer be in a break loop. \key{return-ilisp}{RET} \key{interrupt-subjob-ilisp}{C-c C-c} \key{abort-commands-lisp}{C-z g} \key{M-x panic-lisp}{} \key{reset-ilisp}{C-z z} \key{delete-char-or-pop-ilisp}{C-d} \subsection{Editing Lisp Forms (general)} Indentation, parenthesis balancing, and comment commands. \key{indent-line-ilisp}{TAB} \key{indent-sexp-ilisp}{M-C-q} \key{reindent-lisp}{M-q} \key{comment-region-lisp}{C-z ;} \key{find-unbalanced-lisp}{C-z )} \key{close-all-lisp}{]} \subsection{Eval and compile functions} Functions for eval/compile in code buffers. \key{ilisp-prefix}{C-z} \key{close-and-send-lisp}{C-]} \key{newline-and-indent-lisp}{LFD} \key{eval-defun-lisp}{C-z e} \key{eval-defun-lisp}{M-C-x} \key{eval-defun-and-go-lisp}{C-z C-e} \key{eval-region-lisp}{C-z r} \key{eval-region-and-go-lisp}{C-z C-r} \key{eval-next-sexp-lisp}{C-z n} \key{eval-next-sexp-and-go-lisp}{C-z C-n} \key{compile-defun-lisp}{C-z c} \key{compile-defun-lisp-and-go}{C-z C-c} \key{compile-region-lisp}{C-z w} \key{compile-region-and-go-lisp}{C-z C-w} \subsection{Documentation functions} `describe-lisp', `inspect-lisp', `arglist-lisp', and `documentation-lisp' switch whether they prompt for a response or use a default when called with a negative prefix. If they are prompting, there is completion through the inferior LISP by using `TAB' or `M-TAB'. When entering an expression in the minibuffer, all of the normal ilisp commands like `arglist-lisp' also work. Commands that work on a function will use the nearest previous function symbol. This is either a symbol after a `\#'' or the symbol at the start of the current list. \key{arglist-lisp}{C-z a} \key{documentation-lisp}{C-z d} \key{describe-lisp}{C-z i} \key{inspect-lisp}{C-z I} \subsection{The Franz Online Manual} Invoke with \kbd{M-x fi:clman} or \kbd{C-z D}, these are used to view the Franz online manual if available. Packages nicknames limit search: cltl1, comp, composer, defsys, excl, ff, inspect, ipc, lisp, mp, prof, stream, sys, tpl, xcw, xref. Note the useful about-* man pages (e.g. about-top-level). \key{fi:clman}{C-z D} \key{fi:clman-apropos}{C-z A} %\key{fi:clman-next-entry}{n} %\key{fi:clman-search-forward-see-alsos}{s} %\key{fi:clman-package-help}{p} %\key{fi:clman-flush-doc}{C-c C-c} \shortsubsection{Tracing functions} Function which traces the current defun. When called with a numeric prefix the function will be untraced. When called with negative prefix, prompts for function to be traced. \key{trace-defun-lisp}{C-z t} \shortsubsection{Macroexpansion} These commands apply to the next sexp. If called with a positive numeric prefix, the result of the macroexpansion will be inserted into the buffer. With a negative prefix, prompts for expression to expand. \key{macroexpand-lisp}{C-z M} \key{macroexpand-1-lisp}{C-z m} \shortsubsection{Package Commands} The first time an inferior LISP mode command is executed in a Lisp Mode buffer, the package will be determined by using the regular expression `ilisp-package-regexp' to find a package sexp and then passing that sexp to the inferior LISP through `ilisp-package-command'. For the `clisp' dialect, this will find the first `(in-package PACKAGE)' form in the file. A buffer's package will be displayed in the mode line. If a buffer has no specification, forms will be evaluated in the current inferior LISP package. Buffer package caching can be turned off by setting the variable `lisp-dont-cache-package' to `T'. This will force ILISP to search for the closest previous `ilisp-package-regexp' in the buffer each time an inferior LISP mode command is executed. \key{package-lisp}{C-z p} \key{set-package-lisp}{C-z P} \key{M-x set-buffer-package-lisp}{} \shortsubsection{Files and directories} File commands in lisp-source-mode buffers keep track of the last used directory and file. If the point is on a string, that will be the default if the file exists. If the buffer is one of `lisp-source-modes', the buffer file will be the default. Otherwise, the last file used in a lisp-source-mode will be used. \key{find-file-lisp}{C-x C-f} \key{load-file-lisp}{C-z l} \key{compile-file-lisp}{C-z k} \key{default-directory-lisp}{C-z !} \shortsubsection{Completion} Commands to reduce number of keystrokes. \key{complete-lisp}{M-TAB} \key{complete}{M-RET} %\shortcopyrightnotice \subsection{Command history} ILISP mode is built on top of `comint-mode', the general command interpreter buffer mode. As such, it inherits many commands and features from this, including a command history mechanism. Each ILISP buffer has a command history associated with it. Commands that do not match `ilisp-filter-regexp' and that are longer than `ilisp-filter-length' and that do not match the immediately prior command will be added to this history. \key{comint-next-input}{M-n} \key{comint-previous-input}{M-p} \key{comint-previous-similar-input}{M-s} \key{comint-psearch-input}{M-N} \key{comint-msearch-input}{M-P} \key{comint-msearch-input-matching}{C-c R} \subsection{Source Code Commands} The following commands all deal with finding things in source code. The first time that one of these commands is used, there may be some delay while the source module is loaded. When searching files, the first applicable rule is used: * try the inferior LISP, * try a tags file if defined, * try all buffers in one of `lisp-source-modes' or all files defined using `lisp-directory'. `M-x lisp-directory' defines a set of files to be searched by the source code commands. It prompts for a directory and sets the source files to be those in the directory that match entries in `auto-mode-alist' for modes in `lisp-source-modes'. With a positive prefix, the files are appended. With a negative prefix, all current buffers that are in one of `lisp-source-modes' will be searched. This is also what happens by default. Using this command stops using a tags file. \shortsubsection{} `edit-definitions-lisp', `who-calls-lisp', and `edit-callers-lisp' will switch whether they prompt for a response or use a default when called with a negative prefix. If they are prompting, there is completion through the inferior LISP by using `TAB' or `M-TAB'. When entering an expression in the minibuffer, all of the normal ILISP commands like `arglist-lisp' also work. \shortsubsection{} `edit-definitions-lisp' (`M-.') will find a particular type of definition for a symbol. It tries to use the rules described above. The files to be searched are listed in the buffer `*Edit-Definitions*'. If `lisp-edit-files' is nil, no search will be done if not found through the inferior LISP. The variable `ilisp-locator' contains a function that when given the name and type should be able to find the appropriate definition in the file. There is often a flag to cause your LISP to record source files that you will need to set in the initialization file for your LISP. The variable is `*record-source-files*' in both allegro and lucid. Once a definition has been found, `next-definition-lisp' (`M-,') will find the next definition (or the previous definition with a prefix). \shortsubsection{} `edit-callers-lisp' (`C-z ^') will generate a list of all of the callers of a function in the current inferior LISP and edit the first caller using `edit-definitions-lisp'. Each successive call to `next-caller-lisp' (`M-`') will edit the next caller (or the previous caller with a prefix). The list is stored in the buffer `*All-Callers*'. You can also look at the callers by doing `M-x who-calls-lisp'. \shortsubsection{} `search-lisp' (`M-?') will search the current tags files, `lisp-directory' files or buffers in one of `lisp-source-modes' for a string or a regular expression when called with a prefix. `next-definition-lisp' (`M-,') will find the next definition (or the previous definition with a prefix). \shortsubsection{} `replace-lisp' (`M-"') will replace a string (or a regexp with a prefix) in the current tags files, `lisp-directory' files or buffers in one of `lisp-source-modes'. \key{M-x lisp-directory}{} \key{edit-definitions-lisp}{M-.} \key{next-definition-lisp}{M-,} \key{edit-callers-lisp}{C-z ^} \key{next-caller-lisp}{M-`} \key{M-x who-calls-lisp}{} \key{search-lisp}{M-?} \key{replace-lisp}{M-"} \subsection{Batch commands} The following commands all deal with making a number of changes all at once. The first time one of these commands is used, there may be some delay as the module is loaded. The eval/compile versions of these commands are always executed asynchronously. `mark-change-lisp' (`C-z SPC') marks the current defun as being changed. A prefix causes it to be unmarked. `clear-changes-lisp' (`C-z * 0') will clear all of the changes. `list-changes-lisp' (`C-z * l') will show the forms currently marked. `eval-changes-lisp' (`C-z * e'), or `compile-changes-lisp' (`C-z * c') will evaluate or compile these changes as appropriate. If called with a positive prefix, the changes will be kept. If there is an error, the process will stop and show the error and all remaining changes will remain in the list. All of the results will be kept in the buffer `*Last-Changes*'. \key{mark-change-lisp}{C-z SPC} \key{eval-changes-lisp}{C-z * e} \key{compile-changes-lisp}{C-z * c} \key{clear-changes-lisp}{C-z * 0} \key{list-changes-lisp}{C-z * l} \subsection{Switching between interactive and raw keyboard modes} There are two keyboard modes for interacting with the inferior LISP, \"interactive\" and \"raw\". Normally you are in interactive mode where keys are interpreted as commands to EMACS and nothing is sent to the inferior LISP unless a specific command does so. In raw mode, all characters are passed directly to the inferior LISP without any interpretation as EMACS commands. Keys will not be echoed unless ilisp-raw-echo is T. Raw mode can be turned on interactively by the command `raw-keys-ilisp' (`C-z \#') and will continue until you type C-g. Raw mode can also be turned on/off by inferior LISP functions if the command `io-bridge-ilisp' (M-x io-bridge-ilisp) has been executed in the inferior LISP either interactively or on a hook. To turn on raw mode, a function should print ^[1^] and to turn it off should print ^[0^]. An example in Common LISP would be: \kbd{(progn (format t "1") } \hskip 35pt \kbd{(print (read-char)) (format t "0"))} \subsection{} \copyrightnotice \bye ilisp-5.12.0+cvs.2004.12.26/docs/ilisp.texi0000600000175000001440000023402110020674036016517 0ustar mvelausers\input texinfo @c -*-texinfo-*- Last modified: December 6, 2002 @setfilename ilisp.info @settitle The ILISP Inferior Lisp Interface @dircategory Lisp Programming @direntry * ILisp: (ilisp). Inferior Lisp mode. @end direntry @iftex @finalout @end iftex @c NOTE: KEYBINDING DESCRIPTIONS IN THIS FILE @c @c Texinfo doesn't support the functionality of substitute-command-keys, @c which kind of makes things tough when the bindings change. @c @c Note that all the keys here which use the ILISP prefix have @c @key{C-z} before them, so a global replace can be used to put in a @c specific value for this (if wanted). The whole string should be @c rpelaced, as in (replace-string "@key{C-z}" "@key{C-c}"). Any occurrences @c of this should be in the proper @kbd{} construct, or in a table. @c @c Key command descriptions in tables have the function listed after @c them, as in "@item RET (return-ilisp)" so it should be poosible @c to update these descriptions with a little ELisp code. @c @c Todd Kaufmann 17-Mar-91 @c toad@cs.cmu.edu @c ================================================================ @c THIS file has the new style title page commands. @c Run using special version of `texinfo.tex'. @c Version 2.13 or higher is recommended. @c Also, run `makeinfo' rather than `texinfo-format-buffer'. @c (Get the texinfo2 package.) @c ================================================================ @c Use this if you want small book size like the GNU Emacs bound book. @c smallbook @c tex @c \overfullrule=0pt @c end tex @comment INDEX USAGE: @c @c @cindex concept @c @findex function @c @vindex variable @c @kindex key @c @pindex command (normally program) @c @c not used: @c @tindex (data)type @c @c Combine indices. @c @synindex cp fn @c @syncodeindex vr fn @c @syncodeindex ky fn @c @syncodeindex pg fn @c @syncodeindex tp fn @c oops: texinfo-format-buffer ignores synindex @c So, use makeinfo.c. Get texinfo2.tar.Z off of prep.ai.mit.edu @c @c TODO: @c - Add doc for rlogin lisps. @ifinfo This file documents ILISP. This is edition 0.24 of the ILISP manual for ILISP Version: 5.12.1 @example Copyright (C) 1991,1992,1993 Todd Kaufmann 1993,1994 Ivan Vasquez 1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker 1996, 1997, 1998, 1999 Marco Antoniotti and Rick Campbell @end example Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation. @end ifinfo @c @c @setchapternewpage odd @titlepage @title ILISP User Manual @subtitle A GNU Emacs Interface for Interacting with Lisp @subtitle Edition 0.24, December 2002 @subtitle For ILISP Version: 5.12.1 @c @c the following comment string is removed by the ctrl-c-doc.sh script, @c which can be used to change all ilisp-*prefix* bindings to C-c (or @c other). @c @comment ctrl-C version: @subtitle This is the ``@key{C-z}'' version of the manual. @author by Todd Kaufmann, Chris McConnell, Ivan Vazquez, @author Marco Antoniotti, Rick Campbell @author and Paolo Amoroso @page @vskip 0pt plus 1filll Copyright @copyright{} @itemize @item 1991, 1992, 1993 Todd Kaufmann @item 1993, 1994 Ivan Vasquez @item 1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker @item 1996, 1997, 1998, 1999 Marco Antoniotti and Rick Campbell @end itemize @sp 2 This is edition 0.24 of the @cite{ILISP User Manual} for ILISP Version: 5.12.1, December 2002. @sp 2 Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by this author. @end titlepage @page @node Top, Distribution, (dir), (dir) @comment node-name, next, previous, up @ifinfo This Info file documents ILISP, a GNU Emacs interface for a Lisp running in a buffer. @comment ctrl-C version: @sp @comment ctrl-C version: This is the ``@key{C-z}'' version of the manual. @end ifinfo @menu * Distribution:: How to get the latest ILISP distribution. * Acknowledgements:: Acknowledgements * Features:: An list of ILISP features. * Installation:: How to install ILISP. * Starting up:: How to run a Lisp process using ILISP. * Keybindings:: A word about the keys used by ILISP. * Buffers of ILISP:: Buffers used by ILISP, and their commands. * ILISP Commands:: * Customization:: Description of ILISP variables and hooks. * Dialects:: How ILISP knows how to communicate with Lisp, and how to define new dialects. Indices: * Concept index:: General concepts. * Key index:: ILISP key sequences. * Command index:: Commands by name. * Variable index:: Variables and hooks that influence ILISP's behavior. * Function index:: Internal Emacs Lisp functions. @end menu @node Distribution, Acknowledgements, Top, Top @unnumbered How to get the latest ILISP distribution. ILISP is ``free''; this means that everyone is free to use it and free to redistribute it on a free basis. ILISP is not in the public domain; it is copyrighted and there are restrictions on its distribution, but these restrictions are designed to permit everything that a good cooperating citizen would want to do. What is not allowed is to try to prevent others from further sharing any version of ILISP that they might get from you. The precise conditions appear in the file @file{COPYING}. @cindex @file{COPYING} The easiest way to get a copy of ILISP is from someone else who has it. You need not ask for permission to do so, or tell any one else; just copy it. General information on ILISP is available at: @example http://ilisp.cons.org/ @end example The project site, which provides access to the CVS source tree, bug database, mailing lists and other resources, is hosted at SourceForge: @example http://sourceforge.net/projects/ilisp/ @end example The following mailing lists are available: @table @file @item ilisp-announce Subscribe to this list if you want to receive public announcements regarding ILISP. @cindex @code{ilisp-announce} mailing list @item ilisp-devel This is the list for people who want to be actively involved in the development of ILISP. @cindex @code{ilisp-devel} mailing list @item ilisp-help This is the list for asking usage questions regarding ILISP. @cindex @code{ilisp-help} mailing list @item ilisp-cvs Subscribe to this list @emph{only} if you want to monitor the CVS repository activity. @cindex @code{ilisp-cvs} mailing list @end table You can subscribe to the lists and access the archives via the general information pages: @itemize @bullet @item @code{http://lists.sourceforge.net/mailman/listinfo/ilisp-announce} @item @code{http://lists.sourceforge.net/mailman/listinfo/ilisp-devel} @item @code{http://lists.sourceforge.net/mailman/listinfo/ilisp-help} @item @code{http://lists.sourceforge.net/mailman/listinfo/ilisp-cvs} @end itemize You may send bug reports, questions, suggestions, etc. to @file{ilisp-help} or @file{ilisp-devel}. To report a bug you can also switch to the buffer where the problem occurs, execute the @code{M-x ilisp-bug} command and follow the displayed instructions. @cindex Mailing lists @cindex Reporting bugs @cindex Bugs, reporting them @pindex ilisp-bug @menu * FTP and Web directions:: FTP and Web directions @end menu @node FTP and Web directions, , , Distribution @unnumberedsec FTP and Web directions @cindex FTP site @cindex Anonymous FTP @cindex Downloading ILISP @cindex Web site @cindex How to get @cindex Getting ILISP @noindent You can get the distribution file, @code{ilisp-x.y.z.tar.gz} (@code{ilisp-x.y.z.zip}), via HTTP or anonymous FTP at the following addresses: @itemize @bullet @item @code{http://sourceforge.net/project/showfiles.php?group_id=3957} @item @code{http://www2.cons.org:8000/ftp-area/ilisp/} @item @code{ftp://ftp2.cons.org/pub/languages/lisp/ilisp/} @end itemize If you use a tty ftp client, just log in as 'anonymous'. Please report any problems to the @file{ilisp-help} mailing list. @xref{Distribution}. @cindex @code{ilisp-help} mailing list @noindent Unpack and install: @code{% @dfn{gzip -dc ilisp-x.y.z.tar.gz | tar xf -}} @noindent or @code{% @dfn{unzip ilisp-x.y.z.zip}} @xref{Installation}. @node Acknowledgements, Features, Distribution, Top @unnumbered Acknowledgements ILISP replaces the standard inferior Lisp mode. ILISP is based on comint mode and derived from a number of different interfaces including Symbolics, CMU Common Lisp, and Thinking Machines. There are many people that have taken the time to report bugs, make suggestions and even better send code to fix bugs or implement new features. Thanks to Paolo Amoroso, Martin Atzmueller, David Bakash, Daniel Barlow, Guido Bosch, Tim Bradshaw, David Braunegg, Thomas M. Breuel, Craig Brozefsky, Rick Campbell, Hans Chalupsky, Bill Clementson, Kimball Collins, William Deakin, Brian Dennis, David Duff, Tom Emerson, Michael Ernst, Scott Fahlman, Karl Fogel, Dave Fox, Paul Fuqua (for the CMU-CL GC display code), David Gadbois, Robert P. Goldman, Marty Hall, Richard Harris, Utz-Uwe Haus, Jim Healy, Matthias Hoelzl, Christopher Hoover, Larry Hunter, Ben Hyde, Chuck Irvine, Mark Kantrowitz, Michael Kashket, Matthias Koeppe, Hannu Koivisto, Qiegang Long, Christian Lynbech, Erik Naggum, Alain Picard Dan Pierson, Yusuf Pisan, Frank Ritter, Ole Rohne, Kevin Rosenberg, Jeffrey Mark Siskind, Neil Smithline, Richard Stallman, Larry Stead, Jason Trenouth, Christof Ullwer, Reini Urban, Bjorn Victor, Edmund Weitz, Fred White, Ben Wing, Matsuo Yoshihiro, Jamie Zawinski and many others for bug reports, suggestions and code. Our apologies to anyone we may have forgotten. Special thanks to Todd Kaufmann for the texinfo file, work on bridge, epoch-pop and for really exercising everything. Please send bug reports, fixes and extensions to the @file{ilisp-devel} mailing list so that they can be merged into the master source. @xref{Distribution}. @cindex @code{ilisp-devel} mailing list @noindent @example --Chris McConnell 1991-03-18 --Ivan Vazquez 1993-06-27 --Marco Antoniotti and Rick Campbell 1996-10-25 --Marco Antoniotti and Paolo Amoroso 1999-08-19 @end example @node Features, Installation, Acknowledgements, Top @unnumbered Features @cindex features ILISP is an interface from GNU Emacs to an inferior Lisp. It has the following features: @itemize @bullet @item Runs under Emacs 18 through 21, and XEmacs 19 through 21. @item Support for multiple Common Lisp (including Allegro, CLISP and CMU), XLisp and Scheme dialects on multiple machines even at the same time. @item Dynamically sized pop-up windows that can be buried and scrolled from any window. @item When the user sends an expression from a Lisp source buffer for evaluation in an inferior Lisp process, ILISP automatically switches to the package that is indicated at the beginning of the buffer. The expression is therefore read by the inferior Lisp process with the correct current package. @item Evaluation and compilation of an entire file, or of a region, a definition, or an s-expression of a buffer. The user can specify for ILISP to switch to the inferior Lisp buffer after evaluation or compilation. The user can also specify that a function definition should be called after evaluation. Evaluation and compilation can be done either synchronously (ILISP waits for the answer), asynchronously (ILISP does not wait), or in batch mode. @item Arglist, documentation, describe, inspect and macroexpand. @item Completion of filename components and Lisp symbols including partial matches. @item Find source both with and without help from the inferior Lisp, including CLOS methods, multiple definitions and multiple files. @item Edit the callers of a function with and without help from the inferior Lisp. @item Trace/untrace a function. @item @kbd{M-q} (``Fill-paragraph'') works properly on paragraphs in comments, strings and code. @item Find unbalanced parentheses. @item ILISP has commands for closing all open parentheses of the current ``defun'' (in Emacs terminology). @item Handles editing, entering and indenting full Lisp expressions. @item Next, previous, and similar history mechanism compatible with comint. @item Handles Lisp errors. @item Uniform interface to Lisp debuggers. @item Result histories are maintained in the inferior Lisp. @item Does not create spurious symbols and handles case issues. @item Online manuals for ILISP and Common Lisp. @end itemize @node Installation, Starting up, Features, Top @chapter How to install ILISP @cindex Installation Installation of ILISP and some initialization of your computing environment are described in this chapter. Please read the following sections carefully before getting started with ILISP. Copy the ILISP distribution archive, e.g. @code{ilisp-x.y.z.tar.gz}, to the location where you would like to install it. Next extract the archive, see @xref{FTP and Web directions}. You may need root privileges to perform these operations. @menu * Configuration and compilation:: @end menu @node Configuration and compilation, , , Installation @comment node-name, next, previous, up @section Configuration and compilation Some configuration needs to be done before compiling the Emacs Lisp files that comprise ILISP. Start with the @file{Makefile} file, in the section after the comment @code{Various variables} (you can safely ignore the variables for configuring packaging and distribution, which are intended for maintainers). First, set the @code{EMACS} variable to be the pathname of the Emacs you will be using ILISP with. This is the Emacs that will be used to compile ILISP with. Be sure to set @code{LN} to the name of your operating system's command for creating symbolic filesystem links, @strong{especially if you are a Windows user}. @cindex Compiling ILISP files @cindex Byte-compiling ILISP files @cindex @file{Makefile} @findex ilisp-compile-inits @vindex EMACS @vindex LN @vindex HyperSpec @vindex ilisp-load-inits @vindex ilisp-site-hook @vindex ilisp-program @vindex ilisp-init-binary-command @vindex ilisp-init-binary-extension If your Emacs supports the @code{easymenu} package, it is possible to make ILISP add to Lisp mode buffers and buffers with inferior Lisp processes, or to Scheme mode buffers and buffers with inferior Scheme processes, an @code{Ilisp} menu with all available commands. To enable this feature, set to @code{t} the variable @code{ilisp-*enable-cl-easy-menu-p*} in @file{ilisp-def.el} for the Common Lisp dialects, and @code{ilisp-*enable-scheme-easy-menu-p*} for Scheme dialects. Setting these variables also causes the default @code{Lisp} menu to be removed before displaying the @code{Ilisp} one. @cindex @code{easymenu} package @cindex @code{Ilisp} menu @cindex @code{Lisp} menu @vindex @code{ilisp-*enable-cl-easy-menu-p*} @vindex @code{ilisp-*enable-scheme-easy-menu-p*} @cindex @file{ilisp-def.el} See the file @file{INSTALLATION} for additional configuration options and known problems for specific Lisp dialects. @cindex @file{INSTALLATION} Run @code{make} or @code{make compile} to build ILISP from source. Ignore any compilation warnings unless they result in ILISP not compiling completely. If you are a Windows user, and you don't have GNU @code{make}, you can still compile ILISP by running the @file{icompile.bat} batch file (be sure to customize for your system the variables mentioned by the comment at the top). @pindex make @pindex make compile @cindex Windows, compiling under @cindex @file{icompile.bat} To activate ILISP you should add appropriate Emacs Lisp forms to your @file{.emacs} or to the system-wide @file{default.el} file, depending on who will be using ILISP. These forms take care of starting it whenever you access a Lisp file or run an inferior Lisp process. You can copy relevant portions of the sample file @file{ilisp.emacs}, which also shows how to customize some ILISP features. @cindex @file{ilisp.emacs} @cindex @file{.emacs} @cindex @file{default.el} You should add the directory where all of the ILISP Emacs Lisp files reside to your @code{load-path}. There is an example of this in @file{ilisp.emacs}. As an alternative you could set up a @file{.ilisp} which contains the appropriate portions of @file{ilisp.emacs}, in order to avoid cluttering too much @file{.emacs} or @file{default.el}. The first time a dialect is started, the interface files will complain about not being compiled, just ignore the message. Once a Lisp dialect is started up, you should execute the command @code{ilisp-compile-inits} which will compile the @file{*.lisp} files and write them to the same directory as the ILISP files.@refill @pindex ilisp-compile-inits @cindex @file{.lisp} files The binary files should have a unique extension for each different combination of architecture and Lisp dialect. You will need to change @code{ilisp-init-binary-extension} and @code{ilisp-init-binary-command} to get additional extensions. The binary for each different architecture should be different. If you want to build the interface files into a Lisp world, you will also need to set @code{ilisp-load-inits} to @code{nil} in the same place that you change @code{ilisp-program} to load the Lisp world.@refill There is an @code{ilisp-site-hook} for initializing site specific stuff like program locations when ILISP is first loaded. You may want to define appropriate autoloads in your system Emacs start up file. @vindex ilisp-site-hook Example site init: @example ;;; CMU site (setq ilisp-site-hook '(lambda () (setq ilisp-motd "CMU ILISP V%s") (setq expand-symlinks-rfs-exists t) (setq allegro-program "/usr/local/acl5/lisp") (setq lucid-program "/usr/misc/.lucid/bin/lisp"))) @end example Kent Pitman and Xanalys Inc. have made publicly available on the Web the Common Lisp HyperSpec, an HTML version of the full text of the ANSI Common Lisp specification: @example http://www.xanalys.com/software_tools/reference/HyperSpec/ @end example It is also possible to get a local copy of the HyperSpec, whose latest version is currently v6, by downloading the file @code{HyperSpec-6-0.tar.gz} from the above mentioned site. Daniel Barlow, Stephen Carney and Erik Naggum independently developed Emacs Lisp packages for looking up Lisp symbols in the HyperSpec and displaying the relevant sections with a Web browser. ILISP used to include all of them in the @file{extra} directory of the distribution tree. However, because of some changes to the CLHS only Erik Naggum's version is now distributed. If you want to use one of the others, please contact the other authors. @cindex ANSI Common Lisp @cindex HyperSpec @cindex Common Lisp HyperSpec @cindex @file{extra} @cindex Common Lisp Manual The @file{ilisp.emacs} file provides sample instructions for making Naggum's package access a local copy of the HyperSpec. Since the package relies on the @code{browse-url} Emacs package, make sure that the latter is properly configured. @cindex @file{ilisp.emacs} @cindex @code{browse-url} Digital Press has made publicly available online, as a service to the Lisp community, the full text of the book ``Common Lisp, The Language'' (by Guy L. Steele Jr., 2nd edition, Digital Press, 1990, ISBN 1-55558-041-6; a.k.a. ``CLtL2'') in a number of formats, including HTML. ILISP provides support, contributed by Utz-Uwe Haus, for looking up Lisp symbols in the HTML version of the book and displaying the relevant sections with a Web browser. See the file @file{extra/cltl2.el} for more information on configuring this feature. @xref{Documentation functions}, for usage instructions. @cindex Common Lisp @cindex CLtL2 @cindex Common Lisp Manual The @file{ilisp.emacs} file provides sample instructions for making ILISP's CLtL2 support access a local copy of the book. What has been said above about @code{browse-url} configuration also applies to CLtL2 lookup. @cindex @file{ilisp.emacs} @cindex @code{browse-url} Note that, althougth Steele's book is a well written and useful resource, it covers the Common Lisp language in the state it was a few years before ANSI standardization. If you need an accurate description of ANSI Common Lisp, see the above mentioned HyperSpec instead. Previous versions of ILISP provided commands for accessing the online Common Lisp documentation shipped with Franz Inc.'s Allegro CL product (@code{fi:clman} module). The public availability of the HyperSpec, and the inclusion since version 5.9 of ILISP of the @code{hyperspec} packages, make access to the Franz documentation no longer necessary. So by default ILISP does not load the @code{fi:clman} module, but if you still want to use its commands set the @code{ilisp-*use-fi-clman-interface-p*} to @code{t} in @file{ilisp-def.el}. @pindex fi:clman @cindex Allegro CL @cindex Franz manual @vindex ilisp-*use-fi-clman-interface-p* @cindex @file{ilisp-def.el} The ILISP documentation consists of a user manual and a reference card (the latter may not be up to date). Both of them are in the @file{docs} directory of the distribution tree. @cindex Documentation @cindex @file{docs} The generation of GNU Info, DVI, PostScript and HTML versions of the documentation from the Texinfo and TeX source is controlled by the @file{Makefile} in the @file{docs} directory. Run @code{make docs} or just @code{make} to generate all of the formats. If you are interested in only some of them then issue the appropriate command: @code{make info} for GNU Info, @code{make dvi} for DVI, @code{make ps} for PostScript and @code{make html} for HTML. To remove the intermediate files produced during the generation of DVI output you can run @code{make tmpclean}. Note that some of the output formats may not be supported for certain documents. @cindex User manual @cindex @file{Makefile} @cindex @file{docs} @pindex make @pindex make docs @pindex make info @pindex make dvi @pindex make ps @pindex make html The ILISP reference card is available as a TeX source file. Check the comments at the beginning of the file if you need to generate a version with a different number of columns (the default is 3). @cindex Reference card @c ================================================================== @node Starting up, Keybindings, Installation, Top @chapter How to run a Lisp process using ILISP @cindex Running Lisp @cindex Starting up Lisp @cindex Supported dialects @cindex Dialects supported @pindex run-ilisp @pindex common-lisp @cindex Common Lisp @pindex allegro @cindex Allegro CL @pindex lucid @cindex Lucid Common Lisp @pindex cmulisp @cindex CMU Common Lisp @pindex clisp-hs @cindex CLISP @pindex kcl @cindex Kyoto Common Lisp @pindex akcl @cindex Austin Kyoto Common Lisp @pindex gcl @cindex GNU Common Lisp @pindex ecl @cindex EcoLisp @pindex ibcl @cindex Ibuki Common Lisp @pindex scheme @cindex Scheme @pindex oaklisp @cindex Oaklisp @pindex sbcl @cindex SB Common Lisp @cindex SCM @pindex scm @cindex Chez Scheme @pindex chez @cindex STk @pindex stk @cindex Snow @pindex snow @cindex GUILE @pindex guile @cindex MzScheme @pindex mzscheme @cindex DrScheme-jr @pindex drscheme-jr @pindex xlisp @cindex XLisp @pindex xlispstat @cindex XLisp-Stat @pindex openmcl @cindex OpenMCL @pindex cormanlisp @cindex Corman Lisp To start a Lisp use @kbd{M-x run-ilisp}, or a specific dialect like @kbd{M-x allegro}. If one of these two functions is called with a numerical prefix, the user will be prompted for a buffer name and a program to run. The default buffer name is the name of the dialect with @code{*}s around it. The default program for a dialect will be the value of DIALECT-program or the value of ilisp-program inherited from a less specific dialect. If there are multiple Lisp's, use the dialect name or @kbd{M-x select-ilisp} (@kbd{@key{C-z} S}) to select the current ILISP buffer. Entry into ILISP mode runs the hooks on @code{comint-mode-hook} and @code{ilisp-mode-hook} and then DIALECT-hooks specific to Lisp dialects in the nesting order above. Many dialects call @code{ilisp-load-init} in their dialect setup. These are the currently supported dialects. @itemize @bullet @item @code{allegro} Allegro Common Lisp from Franz Inc. @item @code{akcl} Austin Kyoto Common Lisp, the U. Texas derivative. @item @code{chez} Chez Scheme by Cadence Research Systems. @item @code{clisp-hs} CLISP by Haible and Stoll. @item @code{cmulisp} CMU Common Lisp, the major development platform for ILISP so far. @item @code{cormanlisp} Corman Common Lisp by Roger Corman. @item @code{drscheme-jr} DrScheme-jr by Rice University's PLT. @item @code{common-lisp} Generic Common Lisp. @item @code{ecl} EcoLisp, the Embeddable Common Lisp by Beppe Attardi. A derivative of KCL and AKCL. @item @code{gcl} GNU Common Lisp, the official GNU release. A derivative of AKCL. @item @code{guile} GUILE Scheme by the GNU Project. @item @code{ibcl} Ibuki Common Lisp, derived from KCL. @item @code{kcl} Kyoto Common Lisp, original version. @item @code{liquid} Liquid Common Lisp, the successor of Lucid Common Lisp supported by Xanalys/Harlequin Ltd. @item @code{lispworks} LispWorks Common Lisp from Xanalys/Harlequin Ltd. @item @code{lucid} Lucid Common Lisp, currently supported by Xanalys/Harlequin Ltd. @item @code{mzscheme} MzScheme by Rice University's PLT. @item @code{oaklisp} Oaklisp scheme. @item @code{openmcl} OpenMCL. @item @code{sbcl} Steel Bank Common Lisp @item @code{scheme} Generic Scheme. @item @code{scm} SCM Scheme by Aubrey Jeffer. @item @code{snow} Snow, STk Scheme without supoort for the Tk toolkit. @item @code{stk} STk scheme by Erick Gallesio. @item @code{xlisp} XLisp by David Betz. @item @code{xlispstat} XLisp-Stat, a derivative of XLisp for statistical computations. @end itemize @emph{Support for Scheme and XLisp dialects is experimental} and your feedback is welcome. The @file{ilisp-s2c.el} file contains a first cut at defining the Scheme->C dialect, but it is neither compiled nor loaded by ILISP. @cindex XLisp @cindex XLisp-Stat @cindex Scheme->C @cindex @file{ilisp-s2c.el} To define a new dialect, @xref{Defining new dialects}, and @xref{Customization}. If anyone figures out support for other dialects, I would be happy to include it in future releases. @xref{Dialects}. The currently supported dialects are listed below so that the indentation correponds to the hierarchical relationship between dialects: @example common-lisp allegro clisp-hs cmulisp cormanlisp kcl akcl gcl ecl ibcl lispworks lucid liquid openmcl sbcl scheme chez guile mzscheme drscheme-jr oaklisp Scheme->C (still "in fieri") scm snow stk xlisp xlispstat @end example @c ================================================================== @node Keybindings, Buffers of ILISP, Starting up, Top @chapter A word about the keys used by ILISP @cindex keybindings @cindex FSF keyspace @vindex ilisp-*use-fsf-compliant-keybindings* By default, most ILISP commands are bound under the prefix key @key{C-z}. Unfortunately, these bindings predate the modern FSF Emacs keyspace policies, which stipulate that packages should use @key{C-c} as a prefix, and bind only control characters, digits, and a few specific punctuation chars under that prefix. If you are already accustomed to the old ILISP bindings, don't worry -- we haven't changed the default. However, for new users who don't have old habits to unlearn, ILISP offers FSF-compliant bindings as an alternative to the default. To be compliant (and who wouldn't want to be compliant?), put this line in your @file{.emacs} or in the system-wide @file{default.el} file: @example (setq ilisp-*use-fsf-compliant-keybindings* t) @end example This will cause the ILISP prefix key to be @key{C-c}, and also change some of the bindings underneath that prefix. After you do this, ILISP will be FSF-compliant. Because the rest of this document was originally written for the old, default ILISP bindings, you'll need to make some mental translations if you choose FSF-compliance: @itemize @bullet @item All key bindings are compliant with the FSF guidelines for major mode key bindings. In some cases, there is an overlap with a key binding that is defined in either standard Emacs or comint mode; however, in these cases, the overlap is consistent with the FSF guideline that "it is reasonable for a major mode to rebind a key sequence with a standard meaning, if it implements a command that does 'the same job' in a way that fits the major mode better". @item Where possible, mnemonic key bindings have been made to facilitate ease of learning and frequently-used commands have been assigned to a key binding that is easy to reach. @item All of the related functions are set up on on @kbd{@key{C-c C-q} C-} key bindings. Rationale: The "q" binding is a mnemonic binding. @item All of the related functions are set up on on @kbd{@key{C-c C-j} C-} key bindings. Rationale: @kbd{C-c C-j} is an easy control key sequence to hit and the "eval" functions are used quite a lot. @item All of the related functions are set up on on @kbd{@key{C-c C-k} C-} key bindings. Rationale: @kbd{C-k} is mnemonic for "kompile". @item All of the -and-go-lisp functions are of the form @kbd{@key{C-c C-} M-}. The corresponding functions are set up on the @kbd{@key{C-c C-} C-} binding. Rationale: This is an easy sequence to remember - the "and-go-lisp" function is just the exact same sequence as the ordinary function but with the last character modified with Meta rather than control. @item All of the related functions are set up on on @kbd{@key{C-c C-v} C-} key bindings. Rationale: @kbd{C-c C-v} is an easy control key sequence to hit and the "buffer/edit" functions are used quite a lot. @item All of the related functions are set up on on @kbd{@key{C-c C-b} C-} key bindings. Rationale: These are de"b"ugging commands. @end itemize Remember that you can type @kbd{C-h m} at any time to see help on the current major mode, which will show (among other things) a list of all currently active keybindings. @c ================================================================== @node Buffers of ILISP, ILISP Commands, Keybindings, Top @chapter Buffers used by ILISP, and their commands @cindex buffers of ILISP @cindex ILISP buffers @table @code @item *@var{dialect}* The Lisp listener buffer. Forms can be entered in this buffer in, and they will be sent to Lisp when you hit return if the form is complete. This buffer is in ilisp-mode, which is built on top of comint-mode, and all comint commands such as history mechanism and job control are available. @c xref.. @item @var{lisp-mode-buffers} A buffer is assumed to contain Lisp source code if its major mode is in the list @code{lisp-source-modes}. If it's loaded into a buffer that is in one of these major modes, it's considered a Lisp source file by @code{find-file-lisp}, @code{load-file-lisp} and @code{compile-file-lisp}. Used by these commands to determine defaults.@refill @item @code{*Completions*} @cindex @code{*Completions*} buffer Used for listing completions of symbols or files by the completion commands. @xref{Completion}. @item *Aborted Commands* @cindex @code{*Aborted Commands*} buffer @xref{Interrupts}. @item *Errors* @itemx *Output* @itemx *Error Output* @cindex @code{*Error Output*} buffer @cindex @code{*Errors*} buffer @cindex @code{*Output*} buffer used to pop-up results and errors from the inferior Lisp. @item *ilisp-send* @cindex @code{*ilisp-send*} buffer Buffer containing the last form sent to the inferior Lisp. @item *Edit-Definitions* @itemx *All-Callers* @cindex @code{*Edit-Definitions*} buffer @cindex @code{*All-Callers*} buffer @xref{Source code commands}. @item *Last-Changes* @itemx *Changed-Definitions* @cindex @code{*Last-Changes*} buffer @cindex @code{*Changed-Definitions*} buffer @xref{Batch commands}. @item *Arglist-Output* @cindex @code{*Arglist-Output*} buffer A buffer for showing arglist messages. @end table @menu * Typeout windows:: temporary windows used for display. * Switching buffers:: Switching buffers @end menu @node Typeout windows, Switching buffers, , Buffers of ILISP @section Typeout windows @cindex Typeout windows All ILISP output is funneled through the function which is bound to the hook @code{ilisp-display-output-function}. The function gets a single argument, a string, and should make that output visible to the user somehow. One possible choice for output display is @code{ilisp-display-output-in-typeout-window}, which pops up a window at the top of the current screen which is just large enough to display the output. This window can be ``remotely controlled'' by the commands @code{ilisp-scroll-output}, @code{ilisp-bury-output}, and @code{ilisp-grow-output}. Unlike the old popper facility, the ilisp typeout window facility does not trounce on any existing Emacs functions or on any common key bindings, like @kbd{C-x o}. Other built-in functions which might be useful as values for @code{ilisp-display-output-function} include @code{ilisp-display-output-default}, @code{ilisp-display-output-adaptively}, @code{ilisp-display-output-in-lisp-listener}, @code{ilisp-display-output-in-temp-buffer}, and @code{ilisp-display-output-in-typeout-window}. The default display function is @code{ilisp-display-output-default}, which obeys the @code{lisp-no-popper} variable. Users are encouraged to write their own output display functions to get the exact desired behavior, displaying on a private Emacs screen, in a pop-up dialog box, or whetever. @table @kbd @item @key{C-z} 1 (ilisp-bury-output) deletes and buries the typeout output window. @kindex @key{C-z} 1 @pindex ilisp-bury-output @cindex bury output window @item @key{C-z} v (ilisp-scroll-output) scrolls the output window if it is showing, otherwise does nothing. If it is called with a negative prefix, it will scroll backwards. @cindex scrolling output @pindex ilisp-scroll-output @kindex @key{C-z} v @item @key{C-z} G (ilisp-grow-output) will grow the output window if showing by the prefix number of lines. @cindex grow output window @pindex ilisp-grow-output @kindex @key{C-z} G @end table An alternative to typeout windows is to always have the inferior Lisp buffer visible and have all output go there. Setting @code{lisp-no-popper} to @code{t} will cause all output to go to the inferior Lisp buffer. Setting @code{lisp-no-popper} to @code{'message} will make output of one line go to the message window. Setting @code{comint-always-scroll} to @code{t} will cause process output to always be visible. If a command gets an error, you will be left in the break loop.@refill @cindex Turning off typeout windows @vindex comint-always-scroll @vindex lisp-no-popper @node Switching buffers, ,Typeout windows, Buffers of ILISP @section Switching buffers Commands to make switching between buffers easier. @cindex Switching buffers @table @kbd @item @key{C-z} b (switch-to-lisp) @kindex @key{C-z} b @pindex switch-to-lisp will pop to the current ILISP buffer or if already in an ILISP buffer, it will return to the buffer that last switched to an ILISP buffer. With a prefix, it will also go to the end of the buffer. If you do not want it to pop, set @code{pop-up-windows} to nil. @vindex pop-up-windows @item M-C-l (previous-buffer-lisp) will switch to the last visited buffer in the current window or the Nth previous buffer with a prefix. @cindex Previous lisp buffer @pindex previous-buffer-lisp @kindex M-C-l @end table @node ILISP Commands, Customization, Buffers of ILISP, Top @chapter ILISP Commands Most of these key bindings work in both Lisp Mode and ILISP mode. There are a few additional and-go bindings found in Lisp Mode. @menu * Eval and compile functions:: * Documentation functions:: * Macroexpansion:: * Tracing functions:: * Package Commands:: * Source code commands:: Working on several files * Batch commands:: Grouping changes for eval/compile * Files and directories:: * Keyboard modes:: Interactive and raw keyboard modes * Interrupts:: Interrupts, aborts, and errors * Debuggers:: Interface to Lisp debuggers * Command history:: * Completion:: * Miscellany:: Indentation, parenthesis balancing, and comment commands. @end menu @node Eval and compile functions, Documentation functions, , ILISP Commands @section Eval and compile functions @cindex Eval/compile commands @cindex Compile/eval commands In Lisp, the major unit of interest is a form, which is anything between two matching parentheses. Some of the commands here also refer to ``defun,'' which is a list that starts at the left margin in a Lisp buffer, or after a prompt in the ILISP buffer. These commands refer to the ``defun'' that contains the point. @cindex Defun ``A call'' refers to a reference to a function call for a function or macro, or a reference to a variable. Commands which ``insert a call'' in the ILISP buffer will bring up the last command which matches it or else will insert a template for a call. @cindex Call When an eval is done of a single form matching @code{ilisp-defvar-regexp} the corresponding symbol will be unbound and the value assigned again. @vindex ilisp-defvar-regexp When you send a form to Lisp, the status light will reflect the progress of the command. In a Lisp mode buffer the light will reflect the status of the currently selected inferior Lisp unless @code{lisp-show-status} is nil. The very first inferior Lisp command executed may send some forms to initialize the inferior Lisp. If you want to find out what command is currently running, use the command @kbd{@key{C-z} s} (status-lisp). If you call it with a prefix, the pending commands will be displayed as well.@refill @cindex Currently running command @cindex Displaying commands @pindex status-lisp @kindex @key{C-z} s @vindex lisp-show-status @cindex Status light @cindex Modeline status Note that in this table as elsewhere, the key @key{C-z} (ilisp-*prefix*) is used as a prefix character for ILISP commands, though this may be changed. @kindex @key{C-z} prefix @vindex ilisp-*prefix* @c xref .. custom? or autoload? For a full list of key-bindings, use @kbd{M-x describe-mode} or @kbd{M-x describe-bindings} while in an ILISP-mode buffer.@refill @cindex Listing bindings @cindex Describing bindings The eval/compile commands verify that their expressions are balanced and then send the form to the inferior Lisp. If called with a positive prefix, the result of the operation will be inserted into the buffer after the form that was just sent. @cindex Inserting results For commands which operate on a region, the result of the compile or eval is the last form in the region. @cindex Region commands The @samp{and-go} versions will perform the operation and then immediately switch to the ILISP buffer where you will see the results of executing your form. If @code{eval-defun-and-go-lisp} or @code{compile-defun-and-go-lisp} is called with a prefix, a call for the form will be inserted as well.@refill @cindex Inserting calls @pindex compile-defun-and-go-lisp @pindex eval-defun-and-go-lisp @cindex @samp{and-go} functions @table @kbd @item @key{C-z} The prefix-key for most ILISP commands. This can be changed by setting the variable @code{ilisp-*prefix*}. @c xref custom? @item RET (return-ilisp) In ILISP-mode buffer, sends the current form to lisp if complete, otherwise creates a new line and indents. If you edit old input, the input will be copied to the end of the buffer first and then sent. @cindex Sending input to Lisp @pindex return-ilisp @kindex RET @item C-] (close-and-send-lisp) Closes the current sexp, indents it, and then sends it to the current inferior Lisp. @pindex close-and-send-lisp @kindex C-] @item LFD (newline-and-indent-lisp) Insert a new line and then indent to the appropriate level. If called at the end of the inferior Lisp buffer and an sexp, the sexp will be sent to the inferior Lisp without a trailing newline. @pindex newline-and-indent-lisp @kindex LFD @item @key{C-z} e (eval-defun-lisp) @itemx M-C-x (eval-defun-lisp) @itemx @key{C-z} C-e (eval-defun-and-go-lisp) @kindex M-C-x @kindex @key{C-z} e @kindex @key{C-z} C-e Send the defun to Lisp. @pindex eval-defun-and-go-lisp @pindex eval-defun-lisp @item @key{C-z} r (eval-region-lisp) @itemx @key{C-z} C-r (eval-region-and-go-lisp) @kindex @key{C-z} r @pindex eval-region-lisp @kindex @key{C-z} C-r @pindex eval-region-and-go-lisp @cindex Eval region @item @key{C-z} n (eval-next-sexp-lisp) @itemx @key{C-z} C-n (eval-next-sexp-and-go-lisp) @kindex @key{C-z} n @pindex eval-next-sexp-lisp @kindex @key{C-z} C-n @pindex eval-next-sexp-and-go-lisp @item @key{C-z} o (eval-last-sexp-lisp) @itemx @key{C-z} C-o (eval-last-sexp-and-go-lisp) @kindex @key{C-z} o @pindex eval-last-sexp-lisp @kindex @key{C-z} C-o @pindex eval-last-sexp-and-go-lisp @item @key{C-z} j (eval-dwim-lisp) @itemx @key{C-z} C-j (eval-dwim-and-go-lisp) @kindex @key{C-z} j @pindex eval-dwim-lisp @kindex @key{C-z} C-j Evaluate DWIM (Do What I Mean). If a region is selected, evaluate the region. If the cursor is on or immediately after a ')', evaluate the last sexp. If the cursor is on or immediately before a '(', evaluate the next sexp. If the cursor is inside a defun, evaluate the defun. If the cursor is inside a top-level sexp, evaluate the top-level sexp. Tests are done in the order specified in these comments, so if there is any ambiguity, make certain that the cursor is either on a parenthesis (for the eval last/next commands or not directly before/after/on a parenthesis for the eval defun/top-level commands. @pindex eval-dwim-and-go-lisp @item @key{C-z} c (compile-defun-lisp) @kindex @key{C-z} c @pindex compile-defun-lisp @item @key{C-z} C-c (compile-defun-lisp-and-go) @kindex @key{C-z} C-c When @code{compile-defun-lisp} is called in an inferior Lisp buffer with no current form, the last form typed to the top-level will be compiled. @cindex Compile last form @pindex compile-defun-lisp-and-go @item @key{C-z} w (compile-region-lisp) @itemx @key{C-z} C-w (compile-region-and-go-lisp) @kindex @key{C-z} w @pindex compile-region-lisp @kindex @key{C-z} C-w @pindex compile-region-and-go-lisp @cindex Compile region @end table If any of the forms contain an interactive command, then the command will never return. To get out of this state, you need to use @code{abort-commands-lisp} (@kbd{@key{C-z} g}). If @code{lisp-wait-p} is t, then EMACS will display the result of the command in the minibuffer or a pop-up window. If @code{lisp-wait-p} is @code{nil}, (the default) the send is done asynchronously and the results will be brought up only if there is more than one line or there is an error. In this case, you will be given the option of ignoring the error, keeping it in another buffer or keeping it and aborting all pending sends. If there is not a command already running in the inferior Lisp, you can preserve the break loop. If called with a negative prefix, the sense of @code{lisp-wait-p} will be inverted for the next command. @c @cindex Aborting commands @vindex lisp-wait-p @kindex @key{C-z} g @pindex abort-commands-lisp @node Documentation functions, Macroexpansion, Eval and compile functions, ILISP Commands @section Documentation functions @code{describe-lisp}, @code{inspect-lisp}, @code{arglist-lisp}, and @code{documentation-lisp} switch whether they prompt for a response or use a default when called with a negative prefix. If they are prompting, there is completion through the inferior Lisp by using @kbd{TAB} or @kbd{M-TAB}. When entering an expression in the minibuffer, all of the normal ILISP commands like @code{arglist-lisp} also work.@refill @cindex Describing Lisp objects @kindex M-TAB @kindex TAB @cindex Negative prefix @cindex Minibuffer completion @pindex describe-lisp @cindex Documentation Functions Commands that work on a function will use the nearest previous function symbol. This is either a symbol after a @samp{#'} or the symbol at the start of the current list. The @code{fi:clman} and @code{fi:clman-apropos} commands for accessing the Franz Allegro CL documentation are not enabled by default. @xref{Configuration and compilation}. @cindex Allegro CL @cindex Franz manual @table @code @item @key{C-z} a (arglist-lisp) @cindex Arglist Lisp @kindex @key{C-z} a @pindex arglist-lisp Return the arglist of the current function. With a numeric prefix, the leading paren will be removed and the arglist will be inserted into the buffer. @item @key{SPC} (ilisp-arglist-message-lisp-space) @cindex Arglist Lisp @kindex @key{SPC} @pindex ilisp-arglist-message-lisp-space @vindex ilisp-*arglist-message-lisp-space-p* Display the value of the argument list of a symbol followed by @key{SPC}. @emph{To enable this feature you have to set @code{ilisp-*arglist-message-lisp-space-p*} to @code{t}.} @item @key{C-z} d (documentation-lisp) @kindex @key{C-z} d @pindex documentation-lisp Infers whether function or variable documentation is desired. With a negative prefix, you can specify the type of documentation as well. With a positive prefix the documentation of the current function call is inserted into the buffer. @item @key{C-z} i (describe-lisp) @kindex @key{C-z} i Describe the previous sexp (it is evaluated). If there is no previous sexp and if called from inside an ILISP buffer, the previous result will be described. @item @key{C-z} I (inspect-lisp) @kindex @key{C-z} I @pindex inspect-lisp Switch to the current inferor Lisp and inspect the previous sexp (it is evaluated). If there is no previous sexp and if called from inside an ILISP buffer, the previous result will be inspected. @item @key{C-z} H (hyperspec-lookup) @kindex @key{C-z} H @pindex hyperspec-lookup Look up a standard symbol in the Common Lisp HyperSpec and display the relevant section. @cindex HyperSpec @cindex Common Lisp HyperSpec @item @key{C-z} L or @key{C-z} M-l (cltl2-lookup) @kindex @key{C-z} L @kindex @key{C-z} M-l @pindex cltl2-lookup Look up a Common Lisp symbol in the CLtL2 book and display the relevant section. @cindex CLtL2 @item @key{C-z} D (fi:clman) @itemx @key{C-z} A (fi:clman-apropos) @kindex @key{C-z} D @pindex fi:clman @kindex @key{C-z} A @pindex fi:clman-apropos If the Franz online Common Lisp manual is available, get information on a specific symbol. @code{fi:clman-apropos} will get information apropos a specific string. Some of the documentation is specific to the Allegro dialect, but most of it is for standard Common Lisp. @cindex Apropos help @cindex Common Lisp manual @cindex Franz manual @end table @node Macroexpansion, Tracing functions, Documentation functions, ILISP Commands @section Macroexpansion @table @kbd @item @key{C-z} M (macroexpand-lisp) @itemx @key{C-z} m (macroexpand-1-lisp) @kindex @key{C-z} M @pindex macroexpand-lisp @kindex @key{C-z} m @pindex macroexpand-1-lisp These commands apply to the next sexp. If called with a positive numeric prefix, the result of the macroexpansion will be inserted into the buffer. With a negative prefix, prompts for expression to expand. @cindex Expanding macro forms @cindex Macroexpansion @end table @node Tracing functions, Package Commands, Macroexpansion, ILISP Commands @section Tracing functions @table @kbd @item @key{C-z} t (trace-defun-lisp) @kindex @key{C-z} t @pindex trace-defun-lisp @cindex Tracing defuns @cindex Untracing defuns traces the current defun. When called with a numeric prefix the function will be untraced. When called with negative prefix, prompts for function to be traced. @item @key{C-z} C-t (trace-defun-lisp-break) @kindex @key{C-z} C-t @pindex trace-defun-lisp-break @cindex Tracing defuns @cindex Untracing defuns traces the current defun and enters the debugger whenever that function is invoked. When called with a numeric prefix the function will be untraced. When called with negative prefix, prompts for function to be traced. @end table @node Package Commands, Source code commands, Tracing functions, ILISP Commands @section Package Commands @cindex Package commands The first time an inferior Lisp mode command is executed in a Lisp Mode buffer, the package will be determined by using the regular expression @code{ilisp-hash-form-regexp} to find a package sexp and then passing that sexp to the inferior Lisp through @code{ilisp-package-command}. For the @samp{common-lisp} dialect, this will find the first @code{(in-package PACKAGE)} form in the file. A buffer's package will be displayed in the mode line. If a buffer has no specification, forms will be evaluated in the current inferior Lisp package.@refill Buffer package caching can be turned off by setting the variable @code{lisp-dont-cache-package} to @code{T}. This will force ILISP to search for the closest previous "in-package" form corresponding to @code{ilisp-hash-form-regexp} in the buffer each time an inferior Lisp mode command is executed. @cindex Buffer package @cindex Buffer package caching @vindex lisp-dont-cache-package @vindex ilisp-hash-form-regexp @findex ilisp-package-command @cindex In-package form @table @code @item @key{C-z} P (set-package-lisp) @kindex @key{C-z} P @pindex set-package-lisp Set the inferior Lisp package to the current buffer's package or with a prefix to a manually entered package. @item @key{C-z} p (set-buffer-package-lisp) @kindex @key{C-z} p @cindex Set buffer package @pindex set-buffer-package-lisp Set the buffer's package from the buffer. If it is called with a prefix, the package can be set manually. @end table @node Source code commands, Batch commands, Package Commands, ILISP Commands @section Source Code Commands @cindex Source Code Commands @cindex Finding source The following commands all deal with finding things in source code. The first time that one of these commands is used, there may be some delay while the source module is loaded. When searching files, the first applicable rule is used: @itemize @bullet @item try the inferior Lisp, @item try a tags file if defined, @item try all buffers in one of @code{lisp-source-modes} or all files defined using @code{lisp-directory}.@refill @pindex lisp-directory @vindex lisp-source-modes @end itemize @code{M-x lisp-directory} defines a set of files to be searched by the source code commands. It prompts for a directory and sets the source files to be those in the directory that match entries in @code{auto-mode-alist} for modes in @code{lisp-source-modes}. With a positive prefix, the files are appended. With a negative prefix, all current buffers that are in one of @code{lisp-source-modes} will be searched. This is also what happens by default. Using this command stops using a tags file.@refill @cindex Source modes @vindex auto-mode-alist @kindex M-x lisp-directory @code{edit-definitions-lisp}, @code{who-calls-lisp}, and @code{edit-callers-lisp} will switch whether they prompt for a response or use a default when called with a negative prefix. If they are prompting, there is completion through the inferior Lisp by using @kbd{TAB} or @kbd{M-TAB}. When entering an expression in the minibuffer, all of the normal ILISP commands like @kbd{arglist-lisp} also work.@refill @pindex edit-callers-lisp @pindex who-calls-lisp @pindex edit-definitions-lisp @code{edit-definitions-lisp} (@kbd{M-.}) will find a particular type of definition for a symbol. It tries to use the rules described above. The files to be searched are listed in the buffer @code{*Edit-Definitions*}. If @code{lisp-edit-files} is nil, no search will be done if not found through the inferior Lisp. The variable @code{ilisp-locator} contains a function that when given the name and type should be able to find the appropriate definition in the file. There is often a flag to cause your Lisp to record source files that you will need to set in the initialization file for your Lisp. The variable is @code{*record-source-files*} in both allegro and lucid. Once a definition has been found, @code{next-definition-lisp} (@kbd{M-,}) will find the next definition (or the previous definition with a prefix).@refill @pindex next-definition-lisp @vindex *record-source-files* @vindex ilisp-locator @vindex lisp-edit-files @cindex @code{*Edit-Definitions*} buffer @kindex M-. @code{edit-callers-lisp} (@kbd{@key{C-z} ^}) will generate a list of all of the callers of a function in the current inferior Lisp and edit the first caller using @code{edit-definitions-lisp}. Each successive call to @code{next-caller-lisp} (@kbd{M-`}) will edit the next caller (or the previous caller with a prefix). The list is stored in the buffer @code{*All-Callers*}. You can also look at the callers by doing @kbd{M-x who-calls-lisp}.@refill @cindex List callers @cindex Find callers @cindex @code{*All-Callers*} buffer @kindex M-x who-calls-lisp @kindex M-` @pindex next-caller-lisp @kindex @key{C-z} ^ @pindex edit-callers-lisp @code{search-lisp} (@kbd{M-?}) will search the current tags files, @code{lisp-directory} files or buffers in one of @code{lisp-source-modes} for a string or a regular expression when called with a prefix. @code{next-definition-lisp} (@kbd{M-,}) will find the next definition (or the previous definition with a prefix).@refill @cindex Next definition @cindex Previous definition @kindex M-, @pindex next-definition-lisp @kindex M-? @pindex search-lisp @code{replace-lisp} (@kbd{M-"}) will replace a string (or a regexp with a prefix) in the current tags files, @code{lisp-directory} files or buffers in one of @code{lisp-source-modes}.@refill @cindex Replace lisp @kindex M-" @pindex replace-lisp Here is a summary of the above commands (behavior when given prefix argument is given in parentheses): @table @code @item M-x lisp-directory Define a set of files to be used by the source code commands. @item M-. (edit-definitions-lisp) Find definition of a symbol. @item M-, (next-definition-lisp) Find next (previous) definition. @item @key{C-z} ^ (edit-callers-lisp) Find all callers of a function, and edit the first. @item M-` (next-caller-lisp) Edit next (previous) caller of function set by @code{edit-callers-lisp}. @item M-x who-calls-lisp List all the callers of a function. @item M-? (search-lisp) Search for string (regular expression) in current tags, @code{lisp-directory} files or buffers. Use @code{next-definition-lisp} to find next occurence. @item M-" (replace-lisp) Replace a string (regular expression) in files. @end table @node Batch commands, Files and directories, Source code commands, ILISP Commands @section Batch commands The following commands all deal with making a number of changes all at once. The first time one of these commands is used, there may be some delay as the module is loaded. The eval/compile versions of these commands are always executed asynchronously. @cindex Group changes @cindex File changes @cindex Change commands @code{mark-change-lisp} (@kbd{@key{C-z} SPC}) marks the current defun as being changed. A prefix causes it to be unmarked. @code{clear-changes-lisp} (@kbd{@key{C-z} * 0}) will clear all of the changes. @code{list-changes-lisp} (@kbd{@key{C-z} * l}) will show the forms currently marked.@refill @cindex Marking changes @cindex Clearing changes @cindex Listing changes @kindex @key{C-z} * l @kindex @key{C-z} * 0 @kindex @key{C-z} SPC @pindex list-changes-lisp @pindex clear-changes-lisp @pindex mark-change-lisp @code{eval-changes-lisp} (@kbd{@key{C-z} * e}), or @code{compile-changes-lisp} (@kbd{@key{C-z} * c}) will evaluate or compile these changes as appropriate. If called with a positive prefix, the changes will be kept. If there is an error, the process will stop and show the error and all remaining changes will remain in the list. All of the results will be kept in the buffer @code{*Last-Changes*}.@refill @cindex Eval'ing changes @cindex Compiling changes @cindex @code{*Last-Changes*} buffer @kindex @key{C-z} * e @kindex @key{C-z} * c @pindex compile-changes-lisp @pindex eval-changes-lisp @noindent Summary: @table @code @item @key{C-z} SPC (mark-change-lisp) Mark (unmark) current defun as changed. @item @key{C-z} * e (eval-changes-lisp) @itemx @key{C-z} * c (compile-changes-lisp) Call with a positive prefix to keep changes. @item @key{C-z} * 0 (clear-changes-lisp) @item @key{C-z} * l (list-changes-lisp) @end table @node Files and directories, Keyboard modes, Batch commands, ILISP Commands @section Files and directories @cindex Files and directories @cindex Directories and files @cindex Current directory File commands in Lisp source-mode buffers keep track of the last used directory and file. If the point is on a string, that will be the default if the file exists. If the buffer is one of @code{lisp-source-modes}, the buffer file will be the default. Otherwise, the last file used in a lisp-source-mode will be used. @table @kbd @item C-x C-f (find-file-lisp) @kindex C-x C-f @cindex Find file @cindex Lisp find file @cindex Symbolic link expansion @pindex find-file-lisp will find a file. If it is in a string, that will be used as the default if it matches an existing file. Symbolic links are expanded so that different references to the same file will end up with the same buffer. @item @key{C-z} l (load-file-lisp) @kindex @key{C-z} l will load a file into the inferior Lisp. You will be given the opportunity to save the buffer if it has changed and to compile the file if the compiled version is older than the current version. For @file{.system} files, which are used by DEFSYSTEM tools, no compilation or loading of possibly existing @file{.binary-extension} is attempted. @pindex load-file-lisp @cindex Loading files @cindex DEFSYSTEM files @cindex System definition files @item @key{C-z} k (compile-file-lisp) @kindex @key{C-z} k will compile a file in the current inferior Lisp. @pindex compile-file-lisp @cindex Compiling files @item @key{C-z} ! (default-directory-lisp) @kindex @key{C-z} ! sets the default inferior Lisp directory to the directory of the current buffer. If called in an inferior Lisp buffer, it sets the Emacs @code{default-directory} to the Lisp default directory. @vindex default-directory @cindex Default directory @cindex Set default directory @pindex default-directory-lisp @end table @node Keyboard modes, Interrupts, Files and directories, ILISP Commands @section Switching between interactive and raw keyboard modes @cindex Raw keyboard mode @cindex Interactive keyboard mode @vindex ilisp-raw-echo There are two keyboard modes for interacting with the inferior Lisp, ``interactive'' and ``raw''. Normally you are in interactive mode where keys are interpreted as commands to EMACS and nothing is sent to the inferior Lisp unless a specific command does so. In raw mode, all characters are passed directly to the inferior Lisp without any interpretation as EMACS commands. Keys will not be echoed unless ilisp-raw-echo is T. @pindex raw-keys-ilisp @kindex @key{C-z} # @pindex io-bridge-ilisp @kindex M-x io-bridge-ilisp Raw mode can be turned on interactively by the command @code{raw-keys-ilisp} (@kbd{@key{C-z} #}) and will continue until you type @key{C-g}. Raw mode can also be turned on/off by inferior Lisp functions if the command @code{io-bridge-ilisp} (@code{M-x io-bridge-ilisp}) has been executed in the inferior Lisp either interactively or on a hook. To turn on raw mode, a function should print @code{^[1^]} and to turn it off should print @code{^[0^]}. An example in Common Lisp would be: @code{(progn (format t "^[1^]") (print (read-char)) (format t "^[0^]"))} @node Interrupts, Debuggers, Keyboard modes, ILISP Commands @section Interrupts, aborts, and errors If you want to abort the last command you can use @kbd{C-g}. @kindex C-g @cindex Errors @cindex Aborting commands @cindex Interrupting commands If you want to abort all commands, you should use the command @code{abort-commands-lisp} (@kbd{@key{C-z} g}). Commands that are aborted will be put in the buffer @code{*Aborted Commands*} so that you can see what was aborted. If you want to abort the currently running top-level command, use @code{interrupt-subjob-ilisp} (@kbd{C-c C-c}). As a last resort, @kbd{M-x panic-lisp} will reset the ILISP state without affecting the inferior Lisp so that you can see what is happening. @pindex interrupt-subjob-ilisp @cindex @code{*Aborted Commands*} buffer @kindex @key{C-z} g @pindex abort-commands-lisp @pindex panic-lisp @code{delete-char-or-pop-ilisp} (@kbd{C-d}) will delete prefix characters unless you are at the end of an ILISP buffer in which case it will pop one level in the break loop. @cindex Pop in break loop @cindex Break loop @kindex C-d @pindex delete-char-or-pop-ilisp @code{reset-ilisp}, (@kbd{@key{C-z} z}) will reset the current inferior Lisp's top-level so that it will no longer be in a break loop. @cindex Resetting Lisp @cindex Top-level, return to @kindex @key{C-z} z @pindex reset-ilisp Summary: @table @kbd @item C-c C-c (interrupt-subjob-ilisp) Send a keyboard interrupt signal to lisp. @item @key{C-z} g (abort-commands-lisp) Abort all running or unsent commands. @item M-x panic-lisp (panic-lisp) Reset the ILISP process state. @item @key{C-z} z (reset-ilisp) Reset Lisp to top-level. @item C-d (delete-char-or-pop-ilisp) If at end of buffer, pop a level in break loop. @end table @c duplicated from eval section. If @code{lisp-wait-p} is @code{nil} (the default), all sends are done asynchronously and the results will be brought up only if there is more than one line or there is an error. In case, you will be given the option of ignoring the error, keeping it in another buffer or keeping it and aborting all pending sends. If there is not a command already running in the inferior Lisp, you can preserve the break loop. If called with a negative prefix, the sense of @code{lisp-wait-p} will be inverted for the next command. @vindex lisp-wait-p @node Debuggers, Command history, Interrupts, ILISP Commands @section Interface to Lisp debuggers @cindex Debugger interface @cindex Interface to Lisp debuggers @cindex ILD ILD is an interface to Lisp debuggers, currently the ones of the AKCL, Allegro, CLISP, CMU CL, Corman Lisp and Lucid Common Lisp dialects. It uses a standard set of single-keystroke commands to interface to a variety of different debuggers and is vaguely modelled after the Symbolics debugger. It provides two key advantages: single keystrokes for moving up and down the stack, and a uniform interface to different debuggers. Not all debugger commands are available in all implementations. Some are, but further work is needed. These are noted in the code (see the dialect definition files). If you know how to fix them please contact the ILISP maintainer. Here is a list of the available ILD commands: @table @kbd @item M-a (ild-abort) Abort. @pindex ild-abort @kindex M-a @cindex Aborting from a debugger @item M-c (ild-continue) Continue. @pindex ild-continue @kindex M-c @cindex Continuing from a debugger @item M-C-n (ild-next) Next stack frame (with numeric argument @emph{n}, move to the next @emph{n}-th stack frame). @pindex ild-next @kindex M-C-n @cindex Next stack frame @cindex Stack frames @item M-C-p (ild-previous) Previous stack frame (with numeric argument @emph{n}, move to the previous @emph{n}-th stack frame). @pindex ild-previous @kindex M-C-p @cindex Previous stack frame @cindex Stack frames @item C-c < (ild-top) Top stack frame. @pindex ild-top @kindex C-c < @cindex Top stack frame @cindex Stack frames @item C-c > (ild-bottom) Bottom stack frame. @pindex ild-bottom @kindex C-c > @cindex Bottom stack frame @cindex Stack frames @item M-b (ild-backtrace) Backtrace. @pindex ild-backtrace @kindex M-b @cindex Stack backtrace @cindex Backtrace @item M-C-d (ild-locals) Display all local variables. @pindex ild-locals @kindex M-C-d @cindex Displaying local variables @cindex Local variables @item M-C-l (ild-local) Display a particular local variable (with numeric argument @emph{n}, display the @emph{n}-th local variable). @pindex ild-local @kindex M-C-l @cindex Displaying local variables @cindex Local variables @item M-C-s (ild-step) Step to the next breakpoint. @pindex ild-step @kindex M-C-s @cindex Stepping to next breakpoint @item C-c r (ild-return) Return. @pindex ild-return @kindex C-c r @cindex Returning from a debugger @item M-C-r (ild-retry) Retry. @pindex ild-retry @kindex M-C-r @cindex Retrying from a debugger @item C-x t (ild-trap-on-exit) Trap on exit. @pindex ild-trap-on-exit @kindex C-x t @cindex Trapping on exit from a debugger @item C-c L (select-lisp) Select Lisp interaction buffer. @pindex select-lisp @kindex C-c L @cindex Selecting a Lisp interaction buffer @item @key{C-z} C-s (slow-lisp) Set compiler options for maximal debuggability. @pindex slow-lisp @kindex @key{C-z} C-s @cindex Setting compiler options @cindex Compiler options @item @key{C-z} C-f (fast-lisp) Set compiler options for fastest but least debuggable code. @pindex fast-lisp @kindex @key{C-z} C-f @cindex Setting compiler options @cindex Compiler options @end table @node Command history, Completion, Debuggers, ILISP Commands @section Command history @cindex Command history @cindex Last command @cindex Previous commands ILISP mode is built on top of @code{comint-mode}, the general command-interpreter-in-a-buffer mode. As such, it inherits many commands and features from this, including a command history mechanism. @cindex @code{comint-mode} Each ILISP buffer has a command history associated with it. Commands that do not match @code{ilisp-filter-regexp} and that are longer than @code{ilisp-filter-length} and that do not match the immediately prior command will be added to this history. @vindex ilisp-filter-length @vindex ilisp-filter-regexp @table @kbd @item M-n (comint-next-input) @itemx M-p (comint-previous-input) @kindex M-n @pindex comint-next-input @cindex Next input @kindex M-p @pindex comint-previous-input Cycle through the input history. @item M-s (comint-previous-similar-input) @kindex M-s @pindex comint-previous-similar-input @cindex Similar input Cycle through input that has the string typed so far as a prefix. @item M-N (comint-psearch-input) @kindex M-N @pindex comint-psearch-input @cindex Search input @cindex Input search Search forwards for prompt. @item M-P (comint-msearch-input) @kindex M-P @pindex comint-msearch-input Search backwards for prompt. @item C-c R (comint-msearch-input-matching) @kindex C-c R @pindex comint-msearch-input-matching Search backwards for occurrence of prompt followed by string which is prompted for (@emph{not} a regular expression). @end table See @code{comint-mode} documentation for more information on @samp{comint} commands. @node Completion, Miscellany, Command history, ILISP Commands @section Completion Commands to reduce number of keystrokes. @cindex Completion @cindex Partial completion @cindex Filename completion @table @kbd @item M-TAB (complete-lisp) @kindex M-TAB @pindex complete-lisp @vindex ilisp-*prefix-match* will try to complete the previous symbol in the current inferior Lisp. Partial completion is supported unless @code{ilisp-*prefix-match*} is set to @code{t}. (If you set it to @code{t}, inferior Lisp completions will be faster.) With partial completion, @samp{p--n} would complete to @samp{position-if-not} in Common Lisp. If the symbol follows a left paren or a @samp{#'}, only symbols with function cells will be considered. If the symbol starts with a @samp{*} or you call with a positive prefix all possible completions will be considered. Only external symbols are considered if there is a package qualification with only one colon. The first time you try to complete a string the longest common substring will be inserted and the cursor will be left on the point of ambiguity. If you try to complete again, you can see the possible completions. If you are in a string, then filename completion will be done instead. And if you try to complete a filename twice, you will see a list of possible completions. Filename components are completed individually, so @samp{/u/mi/} could expand to @samp{/usr/misc/}. If you complete with a negative prefix, the most recent completion (symbol or filename) will be undone.@refill @item M-RET (complete) @kindex M-RET @pindex complete @cindex TMC completion will complete the current symbol to the most recently seen symbol in Emacs that matches what you have typed so far. Executing it repeatedly will cycle through potential matches. This is from the TMC completion package and there may be some delay as it is initially loaded. @end table @node Miscellany, , Completion, ILISP Commands @section Miscellany Indentation, parenthesis balancing, movement and comment commands. @table @kbd @item @kbd{TAB} (indent-line-ilisp) @kindex @kbd{TAB} indents for Lisp. With prefix, shifts rest of expression rigidly with the current line. @pindex indent-line-ilisp @cindex Indentation @cindex Rigid indentation @item M-C-q (indent-sexp-ilisp) @kindex M-C-q will indent each line in the next sexp. @pindex indent-sexp-ilisp @item M-q (reindent-lisp) @kindex M-q will reindent the current paragraph if in a comment or string. Otherwise it will close the containing defun and reindent it. @pindex reindent-lisp @cindex Reindent lisp @item C-a (bol-ilisp) @kindex C-a will go after the prompt as defined by @code{comint-prompt-regexp} or @code{ilisp-other-prompt} or to the left margin with a prefix. @pindex bol-ilisp @cindex Going after the prompt @vindex comint-prompt-regexp @vindex ilisp-other-prompt @item DEL (backward-delete-char-untabify) @kindex DEL converts tabs to spaces as it moves back. @pindex backward-delete-char-untabify @cindex Converting tabs to spaces @item @key{C-z} ; (comment-region-lisp) @kindex @key{C-z} ; will put prefix copies of @code{comment-start} before and @code{comment-end}'s after the lines in region. To uncomment a region, use a minus prefix.@refill @pindex comment-region-lisp @cindex Comment region @cindex Uncomment region @item @key{C-z} ) (find-unbalanced-lisp) @kindex @key{C-z} ) will find unbalanced parens in the current buffer. When called with a prefix it will look in the current region. @pindex find-unbalanced-lisp @cindex Find unbalanced parens @cindex Parenthesis balancing @end table @node Customization, Dialects, ILISP Commands, Top @chapter ILISP Customization @c = = = = = = = = = = = = = = = = = = = = = = = = @c this refers to hierarchiy, which isn't shown here. @cindex Customization @cindex Hooks @cindex Dialect startup Starting a dialect runs the hooks on @code{comint-mode-hook} and @code{ilisp-mode-hook} and then @var{DIALECT}@code{-hooks} specific to dialects in the nesting order below. @vindex ilisp-mode-hook @vindex comint-mode-hook @example common-lisp allegro clisp-hs cmulisp cormanlisp kcl akcl gcl ecl ibcl lispworks lucid liquid openmcl sbcl scheme chez guile mzscheme drscheme-jr oaklisp Scheme->C (still "in fieri") scm snow stk xlisp xlispstat @end example On the very first prompt in the inferior Lisp, the hooks on @code{ilisp-init-hook} are run. For more information on creating a new dialect or variables to set in hooks, see @file{ilisp.el}. @cindex First prompt @vindex ilisp-init-hook @c -> -> -> -> -> -> -> -> -> -> -> plenty of indexing here @c put these in a table for later expandment @c ILISP Mode Hooks: @cindex ILISP Mode Hooks @table @code @item ilisp-site-hook @vindex ilisp-site-hook Executed when file is loaded @item ilisp-load-hook @vindex ilisp-load-hook Executed when file is loaded @item ilisp-mode-hook @vindex ilisp-mode-hook Executed when an ilisp buffer is created @item ilisp-init-hook @vindex ilisp-init-hook Executed after inferior Lisp is initialized and the first prompt is seen. @item @var{DIALECT}-hook @vindex @var{DIALECT}-hook Executed when dialect is set @end table Variables you might want to set in a hook or dialect: @table @code @item ilisp-*prefix* @vindex ilisp-*prefix* Keys to prefix ilisp key bindings @item ilisp-program @vindex ilisp-program Program to start for inferior Lisp @item ilisp-motd @vindex ilisp-motd String printed on startup with version @item lisp-wait-p @vindex lisp-wait-p Set to @code{t} for synchronous sends @item ilisp-handle-errors @vindex ilisp-handle-errors Set to @code{t} for ilisp to handle errors from the underlying Lisp. @item ilisp-display-output-function @vindex ilisp-display-output-function The name of a function which displays ILISP output. @item lisp-no-popper @vindex lisp-no-popper Set to @code{t} to have all output in inferior Lisp @item ilisp-*use-frame-for-output* @vindex ilisp-*use-frame-for-output* Set to @code{t} (default) to have multiline output in a distinct emacs-frame. @item ilisp-*use-frame-for-arglist-output-p* @vindex ilisp-*use-frame-for-arglist-output-p* Set to @code{t} (default) to have multiline arglist-output in a seperate emacs-frame. @item ilisp-bindings-*bind-space-p* @vindex ilisp-bindings-*bind-space-p* Set to @code{t} to have the SPC-key bound to #'ilisp-arglist-message-lisp-space. @item ilisp-*arglist-message-lisp-space-p* @vindex ilisp-*arglist-message-lisp-space-p* Set to @code{t} to display the arglist of the current function displayed, after you hit SPC. @item ilisp-*enable-imenu-p* @vindex ilisp-*enable-imenu-p* Set to @code{t} to enable ilisp-imenu, that provides an index of all lisp-functions/definitions in a file. @item lisp-show-status @vindex lisp-show-status Set to @code{nil} to stop showing process status @item ilisp-*prefix-match* @vindex ilisp-*prefix-match* Set to @code{t} if you do not want partial completion @item ilisp-filter-regexp @vindex ilisp-filter-regexp Input history filter @item ilisp-filter-length @vindex ilisp-filter-length Input history minimum length @item ilisp-other-prompt @vindex ilisp-other-prompt Prompt for non- top-level read-eval print loops @end table @node Dialects, Concept index, Customization, Top @chapter Dialects @cindex Dialects A @dfn{dialect} of Lisp is a specific implementation. For the parts of Common Lisp which are well specified, they are usually the same. For the parts that are not (debugger, top-level loop, etc.), there is usually the same functionality but different commands. ILISP provides the means to specify these differences so that the ILISP commands will use the specific command peculiar to an implementation, but still offer the same behavior with the same interface. @menu * Defining new dialects:: * Writing new commands:: @end menu @node Defining new dialects, Writing new commands, , Dialects @section Defining new dialects To define a new dialect use the macro @code{defdialect}. For examples, look at the dialect definitions in @file{ilisp-acl.el}, @file{ilisp-cmu.el}, @file{ilisp-kcl.el}, @file{ilisp-luc.el}. There are hooks and variables for almost anything that you are likely to need to change. The relationship between dialects is hierarchical with the root values being defined in @code{setup-ilisp}. For a new dialect, you only need to change the variables that are different than in the parent dialect. @cindex Defining new dialects @pindex setup-ilisp @pindex defdialect @node Writing new commands, , Defining new dialects, Dialects @section Writing new commands @cindex Internal ILISP functions Basic tools for creating new commands: @table @code @item deflocal @findex deflocal Define a new buffer local variable. @item ilisp-dialect @findex ilisp-dialect List of dialect types. For specific dialect clauses. @item lisp-symbol @findex lisp-symbol Create a symbol. @item lisp-symbol-name @findex lisp-symbol-name Return a symbol's name @item lisp-symbol-delimiter @findex lisp-symbol-delimiter Return a symbol's qualification @item lisp-symbol-package @findex lisp-symbol-package Return a symbol's package @item lisp-string-to-symbol @findex lisp-string-to-symbol Convert string to symbol @item lisp-symbol-to-string @findex lisp-symbol-to-string Convert symbol to string @item lisp-buffer-symbol @findex lisp-buffer-symbol Convert symbol to string qualified for buffer @item lisp-previous-symbol @findex lisp-previous-symbol Return previous symbol @item lisp-previous-sexp @findex lisp-previous-sexp Return previous sexp @item lisp-def-name @findex lisp-def-name Return name of current definition @item lisp-function-name @findex lisp-function-name Return previous function symbol @item ilisp-read @findex ilisp-read Read an sexp with completion, arglist, etc @item ilisp-read-symbol @findex ilisp-read-symbol Read a symbol or list with completion @item ilisp-completing-read @findex ilisp-completing-read Read from choices or list with completion @end table @noindent Notes: @itemize @bullet @item Special commands like arglist should use @code{ilisp-send} to send a message to the inferior Lisp. @findex ilisp-send @item Eval/compile commands should use @code{eval-region-lisp} or @code{compile-region-lisp}. @findex compile-region-lisp @findex eval-region-lisp @end itemize @node Concept index, Key index, Dialects, Top @unnumbered Concept Index @printindex cp @node Key index, Command index, Concept index, Top @unnumbered Key Index @printindex ky @node Command index, Variable index, Key index, Top @unnumbered Command Index @noindent Commands available via @kbd{M-x} prefix. @printindex pg @node Variable index, Function index, Command index, Top @unnumbered Variable Index @noindent Variables and hooks of ILISP. @printindex vr @node Function index, , Variable index, Top @unnumbered Function Index @noindent Internal functions of ILISP which can be used to write new commands. @printindex fn @contents @bye @comment Local variables: @comment version-control: t @comment End: ilisp-5.12.0+cvs.2004.12.26/edit-definitions-notes.text0000600000175000001440000000656307642452423021070 0ustar mvelausersGeneral notes: * Setting the lisp-find-definition-verbose-p switch to non-nil enables some extra debugging output. There is no pause after each such message, so the cost for enabling this is low, but it does mean that you have to switch to the *Messages* buffer to see what it said. * The *Edit-Definitions* buffer now has a rudimentary lisp-edit-definitions-mode of its own, which makes it easier to find multiple definitions via "random access." * The lisp-fall-back-on-find-tags switch turns off the "Can't find; use tags?" query, which I find annoying. The way I see it, if I had wanted find-tag, I would have invoked find-tag directly. * I have tested ACL, CMUCL, and SBCL, all of which use the new protocol. Other CL dialects should still work, though with some loss of function, but I haven't tested the backward-compatibility code lately. [SBCL seems to return no file, or the wrong file, for functions sometimes, but methods and classes work, so for the time being I'm assuming this is an SBCL problem(s). -- rgr, 31-Mar-03.] Some bugs: 1. Finding a structure slot accessor in CMUCL sometimes fails the first time. It tends to succeed afterwards, so I haven't been able to track this down. 2. ACL won't tell us whether an explicit defgeneric form exists; it always gives us a source file, presumably the source of the first method for implicit generic functions. (method ilisp::object-source-file (standard-generic-function)) in find-src.lisp implements a workaround: A defgeneric is reported iff there is a documentation string, which of course means that explicit defgeneric forms without doc strings are missed. 3. If M-. finds a definition that is already visible and positioned so that the comments above it are showing, reposition-window-lisp hides the comments again. (More of a glitch than a bug, but still annoying.) 4. It may be necessary to clean up lisp-setup-edit-definitions, lisp-next-file, and the other search-based stuff in the ilisp-src.el file. In particular, search-lisp and replace-lisp shouldn't use *Edit-Definitions*; there could be bad interactions with M-. if these aren't changed. Some possible enhancements: * Package DWIM. This would be really nice; it wasn't even possible while the Lisp was restricted to returning a list of file names. Since there may be more than one alternative, it would be best to define a response message that enumerates the alternatives, so the user can choose. * Mouse interface. I have the code to make M-left on a symbol (or reasonable facsimile) find the source, but I need to disentangle it from my other hacks first. * The way the code works now, it expects to find a definition exactly once in the given buffer. It should look for more hits, notify the user if any were found, and permit stepping through them in source order. (Ideally, it should be able to filter out "false hits" such as definitions with "#+ignore" in front of them, but that's more ambitious, and requires going back to the Lisp to ask it to "vet" each hit.) * When it finds the next definition, the ACL eli M-. command tells you how many known definitions are left; this would be nice to have, and probably not too tough. (When the previous enhancement is done, it should probably only do this for the last hit in a buffer. The user would see either "N more definitions" or "N more occurrences of this definition", but not both.) ilisp-5.12.0+cvs.2004.12.26/extra/0000700000175000001440000000000010162721672014701 5ustar mvelausersilisp-5.12.0+cvs.2004.12.26/extra/README0000600000175000001440000000122107475672174015576 0ustar mvelausersILISP Extra =========== ILISP is a powerful GNU Emacs interface to many dialects of Lisp. This is the 'contrib' directory: software that is useful in conjunction with ILISP. HyperSpec --------- Note that some software in this directory (HyperSpec packages in particular) is 'non free', according to the definition accepted by the FSF (see for the definition). However, the HyperSpec (as appearing on Xanalys site--formerly Harlequin Ltd.) and these interfaces to that reference are very valuable to Common Lisp programmers and therefore they are provided with ILISP, although in a separate directory. Enjoy The ILISP Maintainers ilisp-5.12.0+cvs.2004.12.26/extra/cltl2.el0000600000175000001440000011246007330246327016253 0ustar mvelausers;;; cltl2.el --- Browse CLTL2 online edition ;; Copyright 2001 Utz-Uwe Haus, ;; inspired by Eric Naggum's hyperspec.el ;; This file is not part of GNU Emacs, but distributed under the same ;; conditions as GNU Emacs, and is useless without GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Commentary: ;; The online edition (and LaTeX source, DVI and PS versions) of ;; Guy Steele's "Common Lisp the Language, 2nd Edition" are available ;; courtesy of Digital Press, at ;; http://www.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/ai/html/cltl/cltl2.html ;; Since a lot of the mirrors listed there seem to be no longer functioning ;; I keep a copy at http://www.uuhaus.de/cltl2/ which is the default entry ;; point for this code. ;;; Code: (require 'cl) (require 'browse-url) ;you need the Emacs 20 version (require 'thingatpt) ;; maybe this should be a (defcustom cltl2-root-url ...) ? (defvar cltl2-root-url "http://www.uuhaus.de/cltl2/" "*The base URL of the default online edition of CLtL2. If you keep a copy of it on your local system, change the URL to something like \"file:/usr/share/doc/cltl2/\".") (defvar cltl2-history nil "History of symbols looked up in CLtL2.") (defvar cltl2-symbols (make-vector 127 0) "This variable holds the access information for the symbols indexed in the CLtL2 lookup index.") (defun cltl2-lookup (symbol-name) "View the documentation on SYMBOL-NAME in Guy Steele's \"Common Lisp the Language, 2nd Edition.\". If SYMBOL-NAME has more than one definition, all of them are displayed with your favorite browser in sequence. The browser should have a \"back\" function to view the separate definitions. The book is copyright (c) Guy Steele 1989; the electronic version is made available courtesy of the publisher Universal Press free of charge. Visit http://www.uuhaus.de/cltl2/README.from.cltl_ht for more information and details on obtaining a paper-bound version. If you keep a local copy of the book, customize the variable `cltl2-root-url' to point to the correct location." (interactive (list (let ((symbol-at-point (thing-at-point 'symbol))) (if (and symbol-at-point (intern-soft (downcase symbol-at-point) cltl2-symbols)) symbol-at-point (completing-read "Look up symbol in CLtL2: " cltl2-symbols #'boundp t symbol-at-point 'cltl2-history))))) (maplist (lambda (entry) (browse-url (concat cltl2-root-url "clm/" (car entry))) (if (cdr entry) (sleep-for 1.5))) (let ((symbol (intern-soft (downcase symbol-name) cltl2-symbols))) (if (and symbol (boundp symbol)) (progn (message (format "Showing %d matching entries." (length (symbol-value symbol)))) (symbol-value symbol)) (error "The symbol `%s' is not indexed in CLtL2" symbol-name))))) (mapcar (lambda (entry) (let ((symbol (intern (car entry) cltl2-symbols))) (if (boundp symbol) (push (cadr entry) (symbol-value symbol)) (set symbol (cdr entry))))) '( ;; The index references were generated using the following sed(1) ;; script; some manual additions were made. ;; cat index.html |\ ;; sed -e '/
/,/<\/pre/!d'\
	  ;;      -e '/^\(&[lg]t;\)\?\(\(.*\)<\/code>\)\?.*/("\2\4" \1)/'\
	  ;;      -e 's/<//'
	  ("*" "node125.html")
	  ("*" "node181.html")
	  ("**" "node181.html")
	  ("***" "node181.html")
	  ("+" "node125.html")
	  ("+" "node181.html")
	  ("++" "node181.html")
	  ("+++" "node181.html")
	  ("-" "node125.html")
	  ("-" "node181.html")
	  ("/" "node125.html")
	  ("/" "node181.html")
	  ("//" "node181.html")
	  ("///" "node181.html")
	  ("1+" "node125.html")
	  ("1-" "node125.html")
	  ("<" "node124.html")
	  ("<=" "node124.html")
	  ("=" "node124.html")
	  (">" "node124.html")
	  (">=" "node124.html")
	  ("abort" "node344.html")
	  ("abs" "node128.html")
	  ("acons" "node153.html")
	  ("acos" "node128.html")
	  ("acosh" "node128.html")
	  ("add-method" "node311.html")
	  ("adjoin" "node152.html")
	  ("adjust-array" "node163.html")
	  ("adjustable-array-p" "node160.html")
	  ("alpha-char-p" "node137.html")
	  ("alphanumericp" "node137.html")
	  ("alter" "node355.html")
	  ("always" "node245.html")
	  ("and" "node75.html")
	  ("append" "node149.html")
	  ("append" "node246.html")
	  ("appending" "node246.html")
	  ("apply" "node81.html")
	  ("applyhook" "node180.html")
	  ("*applyhook*" "node180.html")
	  ("apropos" "node230.html")
	  ("apropos-list" "node230.html")
	  ("aref" "node159.html")
	  ("arithmetic-error" "node346.html")
	  ("arithmetic-error-operands" "node346.html")
	  ("arithmetic-error-operation" "node346.html")
	  ("array-dimension" "node160.html")
	  ("array-dimension-limit" "node158.html")
	  ("array-dimensions" "node160.html")
	  ("array-element-type" "node160.html")
	  ("array-has-fill-pointer-p" "node162.html")
	  ("array-in-bounds-p" "node160.html")
	  ("array-rank" "node160.html")
	  ("array-rank-limit" "node158.html")
	  ("array-row-major-index" "node160.html")
	  ("array-total-size" "node160.html")
	  ("array-total-size-limit" "node158.html")
	  ("arrayp" "node73.html")
	  ("as" "node244.html")
	  ("ash" "node131.html")
	  ("asin" "node128.html")
	  ("asinh" "node128.html")
	  ("assert" "node221.html")
	  ("assert" "node336.html")
	  ("assoc" "node153.html")
	  ("assoc-if" "node153.html")
	  ("assoc-if-not" "node153.html")
	  ("atan" "node128.html")
	  ("atanh" "node128.html")
	  ("atom" "node73.html")
	  ("augment-environment" "node102.html")
	  ("bit" "node161.html")
	  ("bit-and" "node161.html")
	  ("bit-andc1" "node161.html")
	  ("bit-andc2" "node161.html")
	  ("bit-eqv" "node161.html")
	  ("bit-ior" "node161.html")
	  ("bit-nand" "node161.html")
	  ("bit-nor" "node161.html")
	  ("bit-not" "node161.html")
	  ("bit-orc1" "node161.html")
	  ("bit-orc2" "node161.html")
	  ("bit-vector-p" "node73.html")
	  ("bit-xor" "node161.html")
	  ("block" "node85.html")
	  ("boole" "node131.html")
	  ("both-case-p" "node137.html")
	  ("boundp" "node78.html")
	  ("break" "node220.html")
	  ("break" "node345.html")
	  ("*break-on-signals*" "node335.html")
	  ("*break-on-warnings*" "node220.html")
	  ("broadcast-stream-streams" "node185.html")
	  ("butlast" "node149.html")
	  ("byte" "node132.html")
	  ("byte-position" "node132.html")
	  ("byte-size" "node132.html")
	  ("caaaar" "node148.html")
	  ("caaadr" "node148.html")
	  ("caaar" "node148.html")
	  ("caadar" "node148.html")
	  ("caaddr" "node148.html")
	  ("caadr" "node148.html")
	  ("caar" "node148.html")
	  ("cadaar" "node148.html")
	  ("cadadr" "node148.html")
	  ("cadar" "node148.html")
	  ("caddar" "node148.html")
	  ("cadddr" "node148.html")
	  ("caddr" "node148.html")
	  ("cadr" "node148.html")
	  ("call-arguments-limit" "node81.html")
	  ("call-method" "node311.html")
	  ("call-next-method" "node311.html")
	  ("car" "node148.html")
	  ("case" "node84.html")
	  ("catch" "node96.html")
	  ("catenate" "node353.html")
	  ("ccase" "node222.html")
	  ("ccase" "node337.html")
	  ("cdaaar" "node148.html")
	  ("cdaadr" "node148.html")
	  ("cdaar" "node148.html")
	  ("cdadar" "node148.html")
	  ("cdaddr" "node148.html")
	  ("cdadr" "node148.html")
	  ("cdar" "node148.html")
	  ("cddaar" "node148.html")
	  ("cddadr" "node148.html")
	  ("cddar" "node148.html")
	  ("cdddar" "node148.html")
	  ("cddddr" "node148.html")
	  ("cdddr" "node148.html")
	  ("cddr" "node148.html")
	  ("cdr" "node148.html")
	  ("ceiling" "node130.html")
	  ("cell-error" "node346.html")
	  ("cell-error-name" "node346.html")
	  ("cerror" "node220.html")
	  ("cerror" "node335.html")
	  ("change-class" "node311.html")
	  ("char" "node165.html")
	  ("char-bit" "node140.html")
	  ("char-bits" "node138.html")
	  ("char-bits-limit" "node136.html")
	  ("char-code" "node138.html")
	  ("char-code-limit" "node136.html")
	  ("char-control-bit" "node140.html")
	  ("char-downcase" "node139.html")
	  ("char-equal" "node137.html")
	  ("char-font" "node138.html")
	  ("char-font-limit" "node136.html")
	  ("char-greaterp" "node137.html")
	  ("char-hyper-bit" "node140.html")
	  ("char-int" "node139.html")
	  ("char-lessp" "node137.html")
	  ("char-meta-bit" "node140.html")
	  ("char-name" "node139.html")
	  ("char-not-equal" "node137.html")
	  ("char-not-greaterp" "node137.html")
	  ("char-not-lessp" "node137.html")
	  ("char-super-bit" "node140.html")
	  ("char-upcase" "node139.html")
	  ("char/=" "node137.html")
	  ("char" "node137.html")
	  ("char" "node137.html")
	  ("char=" "node137.html")
	  ("char" "node137.html")
	  ("char" "node137.html")
	  ("character" "node139.html")
	  ("characterp" "node73.html")
	  ("check-type" "node221.html")
	  ("check-type" "node336.html")
	  ("choose" "node353.html")
	  ("choose-if" "node353.html")
	  ("chunk" "node353.html")
	  ("cis" "node128.html")
	  ("class-name" "node311.html")
	  ("class-of" "node311.html")
	  ("clear-input" "node195.html")
	  ("close" "node185.html")
	  ("clrhash" "node155.html")
	  ("code-char" "node138.html")
	  ("coerce" "node52.html")
	  ("collect" "node246.html")
	  ("collect" "node354.html")
	  ("collect-alist" "node354.html")
	  ("collect-and" "node354.html")
	  ("collect-append" "node354.html")
	  ("collect-file" "node354.html")
	  ("collect-first" "node354.html")
	  ("collect-fn" "node354.html")
	  ("collect-hash" "node354.html")
	  ("collect-last" "node354.html")
	  ("collect-length" "node354.html")
	  ("collect-max" "node354.html")
	  ("collect-min" "node354.html")
	  ("collect-nconc" "node354.html")
	  ("collect-nth" "node354.html")
	  ("collect-or" "node354.html")
	  ("collect-plist" "node354.html")
	  ("collect-sum" "node354.html")
	  ("collecting" "node246.html")
	  ("collecting-fn" "node352.html")
	  ("commonp" "node73.html")
	  ("compile" "node224.html")
	  ("compile-file" "node224.html")
	  ("compile-file-pathname" "node211.html")
	  ("*compile-file-pathname*" "node224.html")
	  ("*compile-file-truename*" "node224.html")
	  ("*compile-print*" "node224.html")
	  ("*compile-verbose*" "node224.html")
	  ("compiled-function-p" "node73.html")
	  ("compiler-let" "node83.html")
	  ("compiler-let" "node83.html")
	  ("compiler-macro-function" "node101.html")
	  ("compiler-macroexpand" "node101.html")
	  ("compiler-macroexpand-1" "node101.html")
	  ("complement" "node141.html")
	  ("complex" "node130.html")
	  ("complexp" "node73.html")
	  ("compute-applicable-methods" "node311.html")
	  ("compute-restarts" "node342.html")
	  ("concatenate" "node143.html")
	  ("concatenated-stream-streams" "node185.html")
	  ("cond" "node84.html")
	  ("condition" "node346.html")
	  ("conjugate" "node125.html")
	  ("cons" "node148.html")
	  ("consp" "node73.html")
	  ("constantp" "node180.html")
	  ("continue" "node344.html")
	  ("control-error" "node346.html")
	  ("copy-alist" "node149.html")
	  ("copy-list" "node149.html")
	  ("copy-pprint-dispatch" "node259.html")
	  ("copy-readtable" "node192.html")
	  ("copy-seq" "node142.html")
	  ("copy-symbol" "node110.html")
	  ("copy-tree" "node149.html")
	  ("cos" "node128.html")
	  ("cosh" "node128.html")
	  ("cotruncate" "node352.html")
	  ("count" "node145.html")
	  ("count" "node246.html")
	  ("count-if" "node145.html")
	  ("count-if-not" "node145.html")
	  ("counting" "node246.html")
	  ("ctypecase" "node222.html")
	  ("ctypecase" "node337.html")
	  ("*debug-io*" "node183.html")
	  ("*debugger-hook*" "node345.html")
	  ("decf" "node125.html")
	  ("declaim" "node104.html")
	  ("declaration-information" "node102.html")
	  ("declare" "node104.html")
	  ("decode-float" "node130.html")
	  ("decode-universal-time" "node232.html")
	  ("*default-pathname-defaults*" "node214.html")
	  ("defclass" "node311.html")
	  ("defgeneric" "node311.html")
	  ("define-compiler-macro" "node101.html")
	  ("define-condition" "node339.html")
	  ("define-declaration" "node102.html")
	  ("define-method-combination" "node311.html")
	  ("define-modify-macro" "node80.html")
	  ("define-setf-method" "node80.html")
	  ("defmacro" "node98.html")
	  ("defmethod" "node311.html")
	  ("defpackage" "node118.html")
	  ("defstruct" "node170.html")
	  ("deftype" "node51.html")
	  ("defun" "node66.html")
	  ("defvar" "node67.html")
	  ("delete" "node144.html")
	  ("delete-duplicates" "node144.html")
	  ("delete-file" "node216.html")
	  ("delete-if" "node144.html")
	  ("delete-if-not" "node144.html")
	  ("delete-package" "node118.html")
	  ("denominator" "node130.html")
	  ("deposit-field" "node132.html")
	  ("describe" "node230.html")
	  ("describe-object" "node230.html")
	  ("destructuring-bind" "node100.html")
	  ("digit-char" "node139.html")
	  ("digit-char-p" "node137.html")
	  ("directory" "node218.html")
	  ("directory-namestring" "node214.html")
	  ("disassemble" "node224.html")
	  ("division-by-zero" "node346.html")
	  ("do" "node88.html")
	  ("do" "node249.html")
	  ("do*" "node88.html")
	  ("do-all-symbols" "node118.html")
	  ("do-external-symbols" "node118.html")
	  ("do-symbols" "node118.html")
	  ("documentation" "node229.html")
	  ("documentation" "node311.html")
	  ("doing" "node249.html")
	  ("dolist" "node89.html")
	  ("dotimes" "node89.html")
	  ("double-float-epsilon" "node134.html")
	  ("double-float-negative-epsilon" "node134.html")
	  ("dpb" "node132.html")
	  ("dribble" "node230.html")
	  ("ecase" "node222.html")
	  ("ecase" "node337.html")
	  ("echo-stream-input-stream" "node185.html")
	  ("echo-stream-output-stream" "node185.html")
	  ("ed" "node230.html")
	  ("eighth" "node149.html")
	  ("elt" "node142.html")
	  ("encapsulated" "node361.html")
	  ("enclose" "node102.html")
	  ("encode-universal-time" "node232.html")
	  ("end-of-file" "node346.html")
	  ("endp" "node149.html")
	  ("enough-namestring" "node214.html")
	  ("ensure-generic-function" "node311.html")
	  ("eq" "node74.html")
	  ("eql" "node74.html")
	  ("equal" "node74.html")
	  ("equalp" "node74.html")
	  ("error" "node220.html")
	  ("error" "node335.html")
	  ("error" "node346.html")
	  ("*error-output*" "node183.html")
	  ("etypecase" "node222.html")
	  ("etypecase" "node337.html")
	  ("eval" "node180.html")
	  ("eval-when" "node68.html")
	  ("evalhook" "node180.html")
	  ("*evalhook*" "node180.html")
	  ("evenp" "node123.html")
	  ("every" "node143.html")
	  ("exp" "node127.html")
	  ("expand" "node353.html")
	  ("export" "node118.html")
	  ("expt" "node127.html")
	  ("f" "node311.html")
	  ("fboundp" "node78.html")
	  ("fdefinition" "node78.html")
	  ("*features*" "node233.html")
	  ("ffloor" "node130.html")
	  ("fifth" "node149.html")
	  ("file-author" "node216.html")
	  ("file-error" "node346.html")
	  ("file-error-pathname" "node346.html")
	  ("file-length" "node216.html")
	  ("file-namestring" "node214.html")
	  ("file-position" "node216.html")
	  ("file-string-length" "node216.html")
	  ("file-write-date" "node216.html")
	  ("fill" "node144.html")
	  ("fill-pointer" "node162.html")
	  ("finally" "node252.html")
	  ("find" "node145.html")
	  ("find-all-symbols" "node118.html")
	  ("find-class" "node311.html")
	  ("find-if" "node145.html")
	  ("find-if-not" "node145.html")
	  ("find-method" "node311.html")
	  ("find-package" "node118.html")
	  ("find-restart" "node342.html")
	  ("find-symbol" "node118.html")
	  ("finish-output" "node198.html")
	  ("first" "node149.html")
	  ("flet" "node83.html")
	  ("float" "node130.html")
	  ("float-digits" "node130.html")
	  ("float-precision" "node130.html")
	  ("float-radix" "node130.html")
	  ("float-sign" "node130.html")
	  ("floating-point-overflow" "node346.html")
	  ("floating-point-underflow" "node346.html")
	  ("floatp" "node73.html")
	  ("floor" "node130.html")
	  ("for" "node244.html")
	  ("format" "node200.html")
	  ("formatter" "node258.html")
	  ("fourth" "node149.html")
	  ("funcall" "node81.html")
	  ("function" "node78.html")
	  ("function-information" "node102.html")
	  ("function-keywords" "node311.html")
	  ("function-lambda-expression" "node224.html")
	  ("functionp" "node73.html")
	  ("gatherer" "node365.html")
	  ("gathering" "node365.html")
	  ("gcd" "node125.html")
	  ("generator" "node364.html")
	  ("generic-flet" "node311.html")
	  ("generic-function" "node311.html")
	  ("generic-labels" "node311.html")
	  ("gensym" "node110.html")
	  ("*gensym-counter*" "node110.html")
	  ("gentemp" "node110.html")
	  ("get" "node108.html")
	  ("get-decoded-time" "node232.html")
	  ("get-internal-real-time" "node232.html")
	  ("get-internal-run-time" "node232.html")
	  ("get-output-stream-string" "node184.html")
	  ("get-properties" "node108.html")
	  ("get-setf-method" "node80.html")
	  ("get-setf-method-multiple-value" "node80.html")
	  ("get-universal-time" "node232.html")
	  ("getf" "node108.html")
	  ("gethash" "node155.html")
	  ("go" "node91.html")
	  ("graphic-char-p" "node137.html")
	  ("handler-bind" "node338.html")
	  ("handler-case" "node338.html")
	  ("hash-table-count" "node155.html")
	  ("hash-table-p" "node155.html")
	  ("hash-table-rehash-size" "node155.html")
	  ("hash-table-rehash-threshold" "node155.html")
	  ("hash-table-size" "node155.html")
	  ("hash-table-test" "node155.html")
	  ("host-namestring" "node214.html")
	  ("identity" "node234.html")
	  ("if" "node84.html")
	  ("if" "node248.html")
	  ("ignore-errors" "node338.html")
	  ("imagpart" "node130.html")
	  ("import" "node118.html")
	  ("in-package" "node118.html")
	  ("in-package" "node118.html")
	  ("incf" "node125.html")
	  ("initialize-instance" "node311.html")
	  ("initially" "node252.html")
	  ("input-stream-p" "node185.html")
	  ("inspect" "node230.html")
	  ("int-char" "node139.html")
	  ("integer-decode-float" "node130.html")
	  ("integer-length" "node131.html")
	  ("integerp" "node73.html")
	  ("interactive-stream-p" "node185.html")
	  ("intern" "node118.html")
	  ("internal-time-units-per-second" "node232.html")
	  ("intersection" "node152.html")
	  ("invalid-method-error" "node311.html")
	  ("invoke-debugger" "node345.html")
	  ("invoke-restart" "node342.html")
	  ("isqrt" "node127.html")
	  ("iterate" "node351.html")
	  ("keywordp" "node110.html")
	  ("lambda" "node64.html")
	  ("lambda-list-keywords" "node64.html")
	  ("lambda-parameters-limit" "node64.html")
	  ("last" "node149.html")
	  ("latch" "node352.html")
	  ("lcm" "node125.html")
	  ("ldb" "node132.html")
	  ("ldb-test" "node132.html")
	  ("ldiff" "node149.html")
	  ("least-negative-double-float" "node134.html")
	  ("least-negative-long-float" "node134.html")
	  ("least-negative-normalized-double-float" "node134.html")
	  ("least-negative-normalized-long-float" "node134.html")
	  ("least-negative-normalized-short-float" "node134.html")
	  ("least-negative-normalized-single-float" "node134.html")
	  ("least-negative-short-float" "node134.html")
	  ("least-negative-single-float" "node134.html")
	  ("least-positive-double-float" "node134.html")
	  ("least-positive-long-float" "node134.html")
	  ("least-positive-normalized-double-float" "node134.html")
	  ("least-positive-normalized-long-float" "node134.html")
	  ("least-positive-normalized-short-float" "node134.html")
	  ("least-positive-normalized-single-float" "node134.html")
	  ("least-positive-short-float" "node134.html")
	  ("least-positive-single-float" "node134.html")
	  ("length" "node142.html")
	  ("let" "node83.html")
	  ("let*" "node83.html")
	  ("lisp-implementation-type" "node233.html")
	  ("lisp-implementation-version" "node233.html")
	  ("list" "node149.html")
	  ("list*" "node149.html")
	  ("list-all-packages" "node118.html")
	  ("list-length" "node149.html")
	  ("listen" "node195.html")
	  ("listp" "node73.html")
	  ("load" "node217.html")
	  ("load-logical-pathname-translations" "node211.html")
	  ("*load-pathname*" "node217.html")
	  ("*load-print*" "node217.html")
	  ("load-time-value" "node224.html")
	  ("*load-truename*" "node217.html")
	  ("*load-verbose*" "node217.html")
	  ("locally" "node104.html")
	  ("locally" "node104.html")
	  ("log" "node127.html")
	  ("logand" "node131.html")
	  ("logandc1" "node131.html")
	  ("logandc2" "node131.html")
	  ("logbitp" "node131.html")
	  ("logcount" "node131.html")
	  ("logeqv" "node131.html")
	  ("logical-pathname" "node208.html")
	  ("logical-pathname" "node211.html")
	  ("logical-pathname-translations" "node211.html")
	  ("logior" "node131.html")
	  ("lognand" "node131.html")
	  ("lognor" "node131.html")
	  ("lognot" "node131.html")
	  ("logorc1" "node131.html")
	  ("logorc2" "node131.html")
	  ("logtest" "node131.html")
	  ("logxor" "node131.html")
	  ("long-float-epsilon" "node134.html")
	  ("long-float-negative-epsilon" "node134.html")
	  ("long-site-name" "node233.html")
	  ("loop" "node87.html")
	  ("loop-finish" "node245.html")
	  ("lower-case-p" "node137.html")
	  ("machine-instance" "node233.html")
	  ("machine-type" "node233.html")
	  ("machine-version" "node233.html")
	  ("macro-function" "node98.html")
	  ("macroexpand" "node99.html")
	  ("macroexpand-1" "node99.html")
	  ("*macroexpand-hook*" "node99.html")
	  ("make-array" "node158.html")
	  ("make-broadcast-stream" "node184.html")
	  ("make-char" "node138.html")
	  ("make-concatenated-stream" "node184.html")
	  ("make-condition" "node340.html")
	  ("make-dispatch-macro-character" "node192.html")
	  ("make-echo-stream" "node184.html")
	  ("make-hash-table" "node155.html")
	  ("make-instance" "node311.html")
	  ("make-instances-obsolete" "node311.html")
	  ("make-list" "node149.html")
	  ("make-load-form" "node217.html")
	  ("make-load-form-saving-slots" "node217.html")
	  ("make-package" "node118.html")
	  ("make-pathname" "node214.html")
	  ("make-random-state" "node133.html")
	  ("make-sequence" "node142.html")
	  ("make-string" "node167.html")
	  ("make-string-input-stream" "node184.html")
	  ("make-string-output-stream" "node184.html")
	  ("make-symbol" "node110.html")
	  ("make-synonym-stream" "node184.html")
	  ("make-two-way-stream" "node184.html")
	  ("makunbound" "node79.html")
	  ("map" "node143.html")
	  ("map-fn" "node351.html")
	  ("map-into" "node143.html")
	  ("mapc" "node90.html")
	  ("mapcan" "node90.html")
	  ("mapcar" "node90.html")
	  ("mapcon" "node90.html")
	  ("maphash" "node155.html")
	  ("mapl" "node90.html")
	  ("maplist" "node90.html")
	  ("mapping" "node351.html")
	  ("mask" "node353.html")
	  ("mask-field" "node132.html")
	  ("max" "node124.html")
	  ("maximize" "node246.html")
	  ("maximizing" "node246.html")
	  ("member" "node152.html")
	  ("member-if" "node152.html")
	  ("member-if-not" "node152.html")
	  ("merge" "node146.html")
	  ("merge-pathnames" "node214.html")
	  ("method-combination-error" "node311.html")
	  ("method-qualifiers" "node311.html")
	  ("min" "node124.html")
	  ("mingle" "node353.html")
	  ("minimize" "node246.html")
	  ("minimizing" "node246.html")
	  ("minusp" "node123.html")
	  ("mismatch" "node145.html")
	  ("mod" "node130.html")
	  ("*modules*" "node119.html")
	  ("most-negative-double-float" "node134.html")
	  ("most-negative-fixnum" "node134.html")
	  ("most-negative-long-float" "node134.html")
	  ("most-negative-short-float" "node134.html")
	  ("most-negative-single-float" "node134.html")
	  ("most-positive-double-float" "node134.html")
	  ("most-positive-fixnum" "node134.html")
	  ("most-positive-long-float" "node134.html")
	  ("most-positive-short-float" "node134.html")
	  ("most-positive-single-float" "node134.html")
	  ("muffle-warning" "node344.html")
	  ("multiple-value-bind" "node94.html")
	  ("multiple-value-call" "node94.html")
	  ("multiple-value-list" "node94.html")
	  ("multiple-value-prog1" "node94.html")
	  ("multiple-value-setq" "node94.html")
	  ("multiple-values-limit" "node94.html")
	  ("name-char" "node139.html")
	  ("named" "node252.html")
	  ("namestring" "node214.html")
	  ("nbutlast" "node149.html")
	  ("nconc" "node149.html")
	  ("nconc" "node246.html")
	  ("nconcing" "node246.html")
	  ("never" "node245.html")
	  ("next-in" "node364.html")
	  ("next-method-p" "node311.html")
	  ("next-out" "node365.html")
	  ("nil" "node70.html")
	  ("nintersection" "node152.html")
	  ("ninth" "node149.html")
	  ("no-applicable-method" "node311.html")
	  ("no-next-method" "node311.html")
	  ("not" "node75.html")
	  ("notany" "node143.html")
	  ("notevery" "node143.html")
	  ("nreconc" "node149.html")
	  ("nreverse" "node142.html")
	  ("nset-difference" "node152.html")
	  ("nset-exclusive-or" "node152.html")
	  ("nstring-capitalize" "node167.html")
	  ("nstring-downcase" "node167.html")
	  ("nstring-upcase" "node167.html")
	  ("nsublis" "node151.html")
	  ("nsubst" "node151.html")
	  ("nsubst-if" "node151.html")
	  ("nsubst-if-not" "node151.html")
	  ("nsubstitute" "node144.html")
	  ("nsubstitute-if" "node144.html")
	  ("nsubstitute-if-not" "node144.html")
	  ("nth" "node149.html")
	  ("nth-value" "node94.html")
	  ("nthcdr" "node149.html")
	  ("null" "node73.html")
	  ("numberp" "node73.html")
	  ("numerator" "node130.html")
	  ("nunion" "node152.html")
	  ("oddp" "node123.html")
	  ("off-line-port" "node359.html")
	  ("open" "node215.html")
	  ("open-stream-p" "node185.html")
	  ("optimizable-series-function" "node359.html")
	  ("or" "node75.html")
	  ("output-stream-p" "node185.html")
	  ("*package*" "node118.html")
	  ("package-error" "node346.html")
	  ("package-error-package" "node346.html")
	  ("package-name" "node118.html")
	  ("package-nicknames" "node118.html")
	  ("package-shadowing-symbols" "node118.html")
	  ("package-use-list" "node118.html")
	  ("package-used-by-list" "node118.html")
	  ("packagep" "node73.html")
	  ("pairlis" "node153.html")
	  ("parse-integer" "node195.html")
	  ("parse-macro" "node102.html")
	  ("parse-namestring" "node214.html")
	  ("pathname" "node214.html")
	  ("pathname-device" "node214.html")
	  ("pathname-directory" "node214.html")
	  ("pathname-host" "node214.html")
	  ("pathname-match-p" "node207.html")
	  ("pathname-name" "node214.html")
	  ("pathname-type" "node214.html")
	  ("pathname-version" "node214.html")
	  ("pathnamep" "node214.html")
	  ("peek-char" "node195.html")
	  ("phase" "node128.html")
	  ("pi" "node128.html")
	  ("plusp" "node123.html")
	  ("pop" "node149.html")
	  ("position" "node145.html")
	  ("position-if" "node145.html")
	  ("position-if-not" "node145.html")
	  ("positions" "node353.html")
	  ("pprint-dispatch" "node259.html")
	  ("pprint-exit-if-list-exhausted" "node256.html")
	  ("pprint-fill" "node256.html")
	  ("pprint-indent" "node256.html")
	  ("pprint-linear" "node256.html")
	  ("pprint-logical-block" "node256.html")
	  ("pprint-newline" "node256.html")
	  ("pprint-pop" "node256.html")
	  ("pprint-tab" "node256.html")
	  ("pprint-tabular" "node256.html")
	  ("previous" "node352.html")
	  ("prin1" "node198.html")
	  ("*print-array*" "node193.html")
	  ("*print-base*" "node193.html")
	  ("*print-case*" "node193.html")
	  ("*print-circle*" "node193.html")
	  ("*print-escape*" "node193.html")
	  ("*print-gensym*" "node193.html")
	  ("*print-length*" "node193.html")
	  ("*print-level*" "node193.html")
	  ("*print-lines*" "node255.html")
	  ("*print-miser-width*" "node255.html")
	  ("print-object" "node311.html")
	  ("*print-pprint-dispatch*" "node255.html")
	  ("*print-pretty*" "node193.html")
	  ("*print-radix*" "node193.html")
	  ("*print-readably*" "node193.html")
	  ("*print-right-margin*" "node255.html")
	  ("print-unreadable-object" "node198.html")
	  ("probe-file" "node216.html")
	  ("proclaim" "node104.html")
	  ("producing" "node361.html")
	  ("prog" "node91.html")
	  ("prog*" "node91.html")
	  ("prog1" "node82.html")
	  ("prog2" "node82.html")
	  ("progn" "node82.html")
	  ("program-error" "node346.html")
	  ("progv" "node83.html")
	  ("propagate-alterability" "node361.html")
	  ("provide" "node119.html")
	  ("psetf" "node80.html")
	  ("psetq" "node79.html")
	  ("push" "node149.html")
	  ("pushnew" "node149.html")
	  ("*query-io*" "node183.html")
	  ("quote" "node78.html")
	  ("random" "node133.html")
	  ("*random-state*" "node133.html")
	  ("random-state-p" "node133.html")
	  ("rassoc" "node153.html")
	  ("rassoc-if" "node153.html")
	  ("rassoc-if-not" "node153.html")
	  ("rational" "node130.html")
	  ("rationalize" "node130.html")
	  ("rationalp" "node73.html")
	  ("read" "node195.html")
	  ("*read-base*" "node189.html")
	  ("read-byte" "node196.html")
	  ("read-char" "node195.html")
	  ("read-char-no-hang" "node195.html")
	  ("*read-default-float-format*" "node195.html")
	  ("read-delimited-list" "node195.html")
	  ("*read-eval*" "node189.html")
	  ("read-from-string" "node195.html")
	  ("read-line" "node195.html")
	  ("read-preserving-whitespace" "node195.html")
	  ("*read-suppress*" "node189.html")
	  ("*readtable*" "node192.html")
	  ("readtable-case" "node192.html")
	  ("readtablep" "node192.html")
	  ("realp" "node73.html")
	  ("realpart" "node130.html")
	  ("reduce" "node143.html")
	  ("reinitialize-instance" "node311.html")
	  ("rem" "node130.html")
	  ("remf" "node108.html")
	  ("remhash" "node155.html")
	  ("remove" "node144.html")
	  ("remove-duplicates" "node144.html")
	  ("remove-method" "node311.html")
	  ("remprop" "node108.html")
	  ("rename-file" "node216.html")
	  ("rename-package" "node118.html")
	  ("repeat" "node244.html")
	  ("replace" "node144.html")
	  ("require" "node119.html")
	  ("rest" "node149.html")
	  ("restart" "node346.html")
	  ("restart-bind" "node341.html")
	  ("restart-case" "node341.html")
	  ("restart-name" "node342.html")
	  ("result-of" "node365.html")
	  ("return" "node85.html")
	  ("return" "node249.html")
	  ("return-from" "node85.html")
	  ("revappend" "node149.html")
	  ("reverse" "node142.html")
	  ("room" "node230.html")
	  ("rotatef" "node80.html")
	  ("round" "node130.html")
	  ("row-major-aref" "node160.html")
	  ("rplaca" "node150.html")
	  ("rplacd" "node150.html")
	  ("sbit" "node161.html")
	  ("scale-float" "node130.html")
	  ("scan" "node350.html")
	  ("scan-alist" "node350.html")
	  ("scan-file" "node350.html")
	  ("scan-fn" "node350.html")
	  ("scan-fn-inclusive" "node350.html")
	  ("scan-hash" "node350.html")
	  ("scan-lists-of-lists" "node350.html")
	  ("scan-lists-of-lists-fringe" "node350.html")
	  ("scan-multiple" "node350.html")
	  ("scan-plist" "node350.html")
	  ("scan-range" "node350.html")
	  ("scan-sublists" "node350.html")
	  ("scan-symbols" "node350.html")
	  ("schar" "node165.html")
	  ("search" "node145.html")
	  ("second" "node149.html")
	  ("series" "node349.html")
	  ("series" "node349.html")
	  ("series-element-type" "node360.html")
	  ("serious-condition" "node346.html")
	  ("set" "node79.html")
	  ("set-char-bit" "node140.html")
	  ("set-difference" "node152.html")
	  ("set-dispatch-macro-character" "node192.html")
	  ("set-exclusive-or" "node152.html")
	  ("set-macro-character" "node192.html")
	  ("set-pprint-dispatch" "node259.html")
	  ("set-syntax-from-char" "node192.html")
	  ("setf" "node80.html")
	  ("setq" "node79.html")
	  ("seventh" "node149.html")
	  ("shadow" "node118.html")
	  ("shadowing-import" "node118.html")
	  ("shared-initialize" "node311.html")
	  ("shiftf" "node80.html")
	  ("short-float-epsilon" "node134.html")
	  ("short-float-negative-epsilon" "node134.html")
	  ("short-site-name" "node233.html")
	  ("signal" "node335.html")
	  ("signum" "node128.html")
	  ("simple-bit-vector-p" "node73.html")
	  ("simple-condition" "node346.html")
	  ("simple-condition-format-arguments" "node346.html")
	  ("simple-condition-format-string" "node346.html")
	  ("simple-error" "node346.html")
	  ("simple-string-p" "node73.html")
	  ("simple-type-error" "node346.html")
	  ("simple-vector-p" "node73.html")
	  ("simple-warning" "node346.html")
	  ("sin" "node128.html")
	  ("single-float-epsilon" "node134.html")
	  ("single-float-negative-epsilon" "node134.html")
	  ("sinh" "node128.html")
	  ("sixth" "node149.html")
	  ("sleep" "node232.html")
	  ("slot-boundp" "node311.html")
	  ("slot-exists-p" "node311.html")
	  ("slot-makunbound" "node311.html")
	  ("slot-missing" "node311.html")
	  ("slot-unbound" "node311.html")
	  ("slot-value" "node311.html")
	  ("software-type" "node233.html")
	  ("software-version" "node233.html")
	  ("some" "node143.html")
	  ("sort" "node146.html")
	  ("special-form-p" "node78.html")
	  ("split" "node353.html")
	  ("split-if" "node353.html")
	  ("sqrt" "node127.html")
	  ("stable-sort" "node146.html")
	  ("standard-char-p" "node137.html")
	  ("*standard-input*" "node183.html")
	  ("*standard-output*" "node183.html")
	  ("step" "node230.html")
	  ("storage-condition" "node346.html")
	  ("store-value" "node344.html")
	  ("stream-element-type" "node185.html")
	  ("stream-error" "node346.html")
	  ("stream-error-stream" "node346.html")
	  ("stream-external-format" "node185.html")
	  ("streamp" "node185.html")
	  ("string" "node167.html")
	  ("string-capitalize" "node167.html")
	  ("string-char-p" "node137.html")
	  ("string-downcase" "node167.html")
	  ("string-equal" "node166.html")
	  ("string-greaterp" "node166.html")
	  ("string-left-trim" "node167.html")
	  ("string-lessp" "node166.html")
	  ("string-not-equal" "node166.html")
	  ("string-not-greaterp" "node166.html")
	  ("string-not-lessp" "node166.html")
	  ("string-right-trim" "node167.html")
	  ("string-trim" "node167.html")
	  ("string-upcase" "node167.html")
	  ("string/=" "node166.html")
	  ("string" "node166.html")
	  ("string" "node166.html")
	  ("string=" "node166.html")
	  ("string" "node166.html")
	  ("string" "node166.html")
	  ("stringp" "node73.html")
	  ("sublis" "node151.html")
	  ("subseq" "node142.html")
	  ("subseries" "node353.html")
	  ("subsetp" "node152.html")
	  ("subst" "node151.html")
	  ("subst-if" "node151.html")
	  ("subst-if-not" "node151.html")
	  ("substitute" "node144.html")
	  ("substitute-if" "node144.html")
	  ("substitute-if-not" "node144.html")
	  ("subtypep" "node72.html")
	  ("sum" "node246.html")
	  ("summing" "node246.html")
	  ("*suppress-series-warnings*" "node357.html")
	  ("svref" "node159.html")
	  ("sxhash" "node156.html")
	  ("symbol-function" "node78.html")
	  ("symbol-macrolet" "node83.html")
	  ("symbol-name" "node109.html")
	  ("symbol-package" "node110.html")
	  ("symbol-plist" "node108.html")
	  ("symbol-value" "node78.html")
	  ("symbolp" "node73.html")
	  ("synonym-stream-symbol" "node185.html")
	  ("t" "node70.html")
	  ("tagbody" "node91.html")
	  ("tailp" "node152.html")
	  ("tan" "node128.html")
	  ("tanh" "node128.html")
	  ("tenth" "node149.html")
	  ("*terminal-io*" "node183.html")
	  ("terminate-producing" "node361.html")
	  ("terpri" "node198.html")
	  ("the" "node106.html")
	  ("thereis" "node245.html")
	  ("third" "node149.html")
	  ("throw" "node96.html")
	  ("time" "node230.html")
	  ("to-alter" "node355.html")
	  ("trace" "node230.html")
	  ("*trace-output*" "node183.html")
	  ("translate-logical-pathname" "node211.html")
	  ("translate-pathname" "node207.html")
	  ("tree-equal" "node148.html")
	  ("truename" "node214.html")
	  ("truncate" "node130.html")
	  ("two-way-stream-input-stream" "node185.html")
	  ("two-way-stream-output-stream" "node185.html")
	  ("type-error" "node346.html")
	  ("type-error-datum" "node346.html")
	  ("type-error-expected-type" "node346.html")
	  ("type-of" "node53.html")
	  ("typecase" "node84.html")
	  ("typep" "node72.html")
	  ("unbound-variable" "node346.html")
	  ("undefined-function" "node346.html")
	  ("unexport" "node118.html")
	  ("unintern" "node118.html")
	  ("union" "node152.html")
	  ("unless" "node84.html")
	  ("unless" "node248.html")
	  ("unread-char" "node195.html")
	  ("until" "node245.html")
	  ("until" "node352.html")
	  ("until-if" "node352.html")
	  ("untrace" "node230.html")
	  ("unuse-package" "node118.html")
	  ("unwind-protect" "node96.html")
	  ("update-instance-for-different-class" "node311.html")
	  ("update-instance-for-redefined-class" "node311.html")
	  ("upgraded-array-element-type" "node54.html")
	  ("upgraded-complex-part-type" "node54.html")
	  ("upper-case-p" "node137.html")
	  ("use-package" "node118.html")
	  ("use-value" "node344.html")
	  ("user-homedir-pathname" "node214.html")
	  ("values" "node94.html")
	  ("values-list" "node94.html")
	  ("variable-information" "node102.html")
	  ("vector" "node158.html")
	  ("vector-pop" "node162.html")
	  ("vector-push" "node162.html")
	  ("vector-push-extend" "node162.html")
	  ("vectorp" "node73.html")
	  ("warn" "node220.html")
	  ("warn" "node343.html")
	  ("warning" "node346.html")
	  ("when" "node84.html")
	  ("when" "node248.html")
	  ("while" "node245.html")
	  ("wild-pathname-p" "node207.html")
	  ("with" "node247.html")
	  ("with-accessors" "node311.html")
	  ("with-added-methods" "node311.html")
	  ("with-compilation-unit" "node224.html")
	  ("with-condition-restarts" "node341.html")
	  ("with-hash-table-iterator" "node155.html")
	  ("with-input-from-string" "node184.html")
	  ("with-open-file" "node215.html")
	  ("with-open-stream" "node184.html")
	  ("with-output-to-string" "node184.html")
	  ("with-package-iterator" "node118.html")
	  ("with-simple-restart" "node341.html")
	  ("with-slots" "node311.html")
	  ("with-standard-io-syntax" "node193.html")
	  ("write" "node198.html")
	  ("write-byte" "node199.html")
	  ("write-char" "node198.html")
	  ("write-string" "node198.html")
	  ("write-to-string" "node198.html")
	  ("y-or-n-p" "node201.html")
	  ("yes-or-no-p" "node201.html")
	  ("zerop" "node123.html")
	  ))


(provide 'cltl2)

;;; cltl2.el ends here
ilisp-5.12.0+cvs.2004.12.26/extra/hyperspec.el0000600000175000001440000014652710020674036017240 0ustar  mvelausers;;; hyperspec.el --- Browse documentation from the Common Lisp HyperSpec

;; Copyright 1997 Naggum Software

;; Author: Erik Naggum 
;; Keywords: lisp

;; This file is not part of GNU Emacs, but distributed under the same
;; conditions as GNU Emacs, and is useless without GNU Emacs.

;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING.  If not, write to
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.

;;; Commentary:

;; Kent Pitman and Xanalys Inc. have made the text of American National
;; Standard for Information Technology -- Programming Language -- Common
;; Lisp, ANSI X3.226-1994 available on the WWW, in the form of the Common
;; Lisp HyperSpec.  This package makes it convenient to peruse this
;; documentation from within Emacs.

;;; Code:

(require 'cl)
(require 'browse-url)                   ;you need the Emacs 20 version
(require 'thingatpt)

(defvar common-lisp-hyperspec-root
  "http://www.lispworks.com/reference/HyperSpec/"
  "The root of the Common Lisp HyperSpec URL.
If you copy the HyperSpec to your local system, set this variable to
something like \"file:/usr/local/doc/HyperSpec/\".")

;;; Added variable for CLHS symbol table. See details below.
;;;
;;; 20011201 Edi Weitz

(defvar common-lisp-hyperspec-symbol-table nil
  "The HyperSpec symbol table file.
If you copy the HyperSpec to your local system, set this variable to
the location of the symbol table which is usually \"Map_Sym.txt\"
or \"Symbol-Table.text\".")

(defvar common-lisp-hyperspec-history nil
  "History of symbols looked up in the Common Lisp HyperSpec.")

;;if only we had had packages or hash tables..., but let's fake it.

(defvar common-lisp-hyperspec-symbols (make-vector 67 0))

(defun common-lisp-hyperspec (symbol-name)
  "View the documentation on SYMBOL-NAME from the Common Lisp HyperSpec.
If SYMBOL-NAME has more than one definition, all of them are displayed with
your favorite browser in sequence.  The browser should have a \"back\"
function to view the separate definitions.

The Common Lisp HyperSpec is the full ANSI Standard Common Lisp, provided
by Kent Pitman and Xanalys Inc.  By default, the Xanalys Web site is
visited to retrieve the information.  Xanalys Inc. allows you to transfer
the entire Common Lisp HyperSpec to your own site under certain conditions.
Visit http://www.lispworks.com/reference/HyperSpec/ for more information.
If you copy the HyperSpec to another location, customize the variable
`common-lisp-hyperspec-root' to point to that location."
  (interactive (list (let ((symbol-at-point (thing-at-point 'symbol)))
                       (if (and symbol-at-point
                                (intern-soft (downcase symbol-at-point)
                                             common-lisp-hyperspec-symbols))
                           symbol-at-point
                         (completing-read
                          "Look up symbol in Common Lisp HyperSpec: "
                          common-lisp-hyperspec-symbols #'boundp
                          t symbol-at-point
                          'common-lisp-hyperspec-history)))))
  (maplist (lambda (entry)
             (browse-url (concat common-lisp-hyperspec-root "Body/" (car entry)))
             (if (cdr entry)
                 (sleep-for 1.5)))
           (let ((symbol (intern-soft (downcase symbol-name)
                                      common-lisp-hyperspec-symbols)))
             (if (and symbol (boundp symbol))
                 (symbol-value symbol)
               (error "The symbol `%s' is not defined in Common Lisp"
                      symbol-name)))))

;;; Added the following just to provide a common entry point according
;;; to the various 'hyperspec' implementations.
;;;
;;; 19990820 Marco Antoniotti

(eval-when (load eval)
  (defalias 'hyperspec-lookup 'common-lisp-hyperspec))


;;; Added dynamic lookup of symbol in CLHS symbol table
;;;
;;; 20011202 Edi Weitz

;;; Replaced symbol table for v 4.0 with the one for v 6.0
;;; (which is now online at Xanalys' site)
;;;
;;; 20020213 Edi Weitz

(if common-lisp-hyperspec-symbol-table
    (let ((index-buffer (find-file-noselect common-lisp-hyperspec-symbol-table)))
      (labels ((get-one-line ()
                 (prog1 
                     (delete* ?\n (thing-at-point 'line))
                   (forward-line))))
        (save-excursion
          (set-buffer index-buffer)
          (goto-char (point-min))
          (while (< (point) (point-max))
            (let* ((symbol (intern (downcase (get-one-line))
                                   common-lisp-hyperspec-symbols))
                   (relative-url (get-one-line)))
              (set symbol (list (subseq relative-url
                                        (1+ (position ?\/ relative-url :from-end t))))))))))
  (mapcar (lambda (entry)
            (let ((symbol (intern (car entry) common-lisp-hyperspec-symbols)))
              (if (boundp symbol)
                  (push (cadr entry) (symbol-value symbol))
                (set symbol (cdr entry)))))
          '(("&allow-other-keys" "03_da.htm")
            ("&aux" "03_da.htm")
            ("&body" "03_dd.htm")
            ("&environment" "03_dd.htm")
            ("&key" "03_da.htm")
            ("&optional" "03_da.htm")
            ("&rest" "03_da.htm")
            ("&whole" "03_dd.htm")
            ("*" "a_st.htm")
            ("**" "v__stst_.htm")
            ("***" "v__stst_.htm")
            ("*break-on-signals*" "v_break_.htm")
            ("*compile-file-pathname*" "v_cmp_fi.htm")
            ("*compile-file-truename*" "v_cmp_fi.htm")
            ("*compile-print*" "v_cmp_pr.htm")
            ("*compile-verbose*" "v_cmp_pr.htm")
            ("*debug-io*" "v_debug_.htm")
            ("*debugger-hook*" "v_debugg.htm")
            ("*default-pathname-defaults*" "v_defaul.htm")
            ("*error-output*" "v_debug_.htm")
            ("*features*" "v_featur.htm")
            ("*gensym-counter*" "v_gensym.htm")
            ("*load-pathname*" "v_ld_pns.htm")
            ("*load-print*" "v_ld_prs.htm")
            ("*load-truename*" "v_ld_pns.htm")
            ("*load-verbose*" "v_ld_prs.htm")
            ("*macroexpand-hook*" "v_mexp_h.htm")
            ("*modules*" "v_module.htm")
            ("*package*" "v_pkg.htm")
            ("*print-array*" "v_pr_ar.htm")
            ("*print-base*" "v_pr_bas.htm")
            ("*print-case*" "v_pr_cas.htm")
            ("*print-circle*" "v_pr_cir.htm")
            ("*print-escape*" "v_pr_esc.htm")
            ("*print-gensym*" "v_pr_gen.htm")
            ("*print-length*" "v_pr_lev.htm")
            ("*print-level*" "v_pr_lev.htm")
            ("*print-lines*" "v_pr_lin.htm")
            ("*print-miser-width*" "v_pr_mis.htm")
            ("*print-pprint-dispatch*" "v_pr_ppr.htm")
            ("*print-pretty*" "v_pr_pre.htm")
            ("*print-radix*" "v_pr_bas.htm")
            ("*print-readably*" "v_pr_rda.htm")
            ("*print-right-margin*" "v_pr_rig.htm")
            ("*query-io*" "v_debug_.htm")
            ("*random-state*" "v_rnd_st.htm")
            ("*read-base*" "v_rd_bas.htm")
            ("*read-default-float-format*" "v_rd_def.htm")
            ("*read-eval*" "v_rd_eva.htm")
            ("*read-suppress*" "v_rd_sup.htm")
            ("*readtable*" "v_rdtabl.htm")
            ("*standard-input*" "v_debug_.htm")
            ("*standard-output*" "v_debug_.htm")
            ("*terminal-io*" "v_termin.htm")
            ("*trace-output*" "v_debug_.htm")
            ("+" "a_pl.htm")
            ("++" "v_pl_plp.htm")
            ("+++" "v_pl_plp.htm")
            ("-" "a__.htm")
            ("/" "a_sl.htm")
            ("//" "v_sl_sls.htm")
            ("///" "v_sl_sls.htm")
            ("/=" "f_eq_sle.htm")
            ("1+" "f_1pl_1_.htm")
            ("1-" "f_1pl_1_.htm")
            ("<" "f_eq_sle.htm")
            ("<=" "f_eq_sle.htm")
            ("=" "f_eq_sle.htm")
            (">" "f_eq_sle.htm")
            (">=" "f_eq_sle.htm")
            ("abort" "a_abort.htm")
            ("abs" "f_abs.htm")
            ("acons" "f_acons.htm")
            ("acos" "f_asin_.htm")
            ("acosh" "f_sinh_.htm")
            ("add-method" "f_add_me.htm")
            ("adjoin" "f_adjoin.htm")
            ("adjust-array" "f_adjust.htm")
            ("adjustable-array-p" "f_adju_1.htm")
            ("allocate-instance" "f_alloca.htm")
            ("alpha-char-p" "f_alpha_.htm")
            ("alphanumericp" "f_alphan.htm")
            ("and" "a_and.htm")
            ("append" "f_append.htm")
            ("apply" "f_apply.htm")
            ("apropos" "f_apropo.htm")
            ("apropos-list" "f_apropo.htm")
            ("aref" "f_aref.htm")
            ("arithmetic-error" "e_arithm.htm")
            ("arithmetic-error-operands" "f_arithm.htm")
            ("arithmetic-error-operation" "f_arithm.htm")
            ("array" "t_array.htm")
            ("array-dimension" "f_ar_dim.htm")
            ("array-dimension-limit" "v_ar_dim.htm")
            ("array-dimensions" "f_ar_d_1.htm")
            ("array-displacement" "f_ar_dis.htm")
            ("array-element-type" "f_ar_ele.htm")
            ("array-has-fill-pointer-p" "f_ar_has.htm")
            ("array-in-bounds-p" "f_ar_in_.htm")
            ("array-rank" "f_ar_ran.htm")
            ("array-rank-limit" "v_ar_ran.htm")
            ("array-row-major-index" "f_ar_row.htm")
            ("array-total-size" "f_ar_tot.htm")
            ("array-total-size-limit" "v_ar_tot.htm")
            ("arrayp" "f_arrayp.htm")
            ("ash" "f_ash.htm")
            ("asin" "f_asin_.htm")
            ("asinh" "f_sinh_.htm")
            ("assert" "m_assert.htm")
            ("assoc" "f_assocc.htm")
            ("assoc-if" "f_assocc.htm")
            ("assoc-if-not" "f_assocc.htm")
            ("atan" "f_asin_.htm")
            ("atanh" "f_sinh_.htm")
            ("atom" "a_atom.htm")
            ("base-char" "t_base_c.htm")
            ("base-string" "t_base_s.htm")
            ("bignum" "t_bignum.htm")
            ("bit" "a_bit.htm")
            ("bit-and" "f_bt_and.htm")
            ("bit-andc1" "f_bt_and.htm")
            ("bit-andc2" "f_bt_and.htm")
            ("bit-eqv" "f_bt_and.htm")
            ("bit-ior" "f_bt_and.htm")
            ("bit-nand" "f_bt_and.htm")
            ("bit-nor" "f_bt_and.htm")
            ("bit-not" "f_bt_and.htm")
            ("bit-orc1" "f_bt_and.htm")
            ("bit-orc2" "f_bt_and.htm")
            ("bit-vector" "t_bt_vec.htm")
            ("bit-vector-p" "f_bt_vec.htm")
            ("bit-xor" "f_bt_and.htm")
            ("block" "s_block.htm")
            ("boole" "f_boole.htm")
            ("boole-1" "v_b_1_b.htm")
            ("boole-2" "v_b_1_b.htm")
            ("boole-and" "v_b_1_b.htm")
            ("boole-andc1" "v_b_1_b.htm")
            ("boole-andc2" "v_b_1_b.htm")
            ("boole-c1" "v_b_1_b.htm")
            ("boole-c2" "v_b_1_b.htm")
            ("boole-clr" "v_b_1_b.htm")
            ("boole-eqv" "v_b_1_b.htm")
            ("boole-ior" "v_b_1_b.htm")
            ("boole-nand" "v_b_1_b.htm")
            ("boole-nor" "v_b_1_b.htm")
            ("boole-orc1" "v_b_1_b.htm")
            ("boole-orc2" "v_b_1_b.htm")
            ("boole-set" "v_b_1_b.htm")
            ("boole-xor" "v_b_1_b.htm")
            ("boolean" "t_ban.htm")
            ("both-case-p" "f_upper_.htm")
            ("boundp" "f_boundp.htm")
            ("break" "f_break.htm")
            ("broadcast-stream" "t_broadc.htm")
            ("broadcast-stream-streams" "f_broadc.htm")
            ("built-in-class" "t_built_.htm")
            ("butlast" "f_butlas.htm")
            ("byte" "f_by_by.htm")
            ("byte-position" "f_by_by.htm")
            ("byte-size" "f_by_by.htm")
            ("caaaar" "f_car_c.htm")
            ("caaadr" "f_car_c.htm")
            ("caaar" "f_car_c.htm")
            ("caadar" "f_car_c.htm")
            ("caaddr" "f_car_c.htm")
            ("caadr" "f_car_c.htm")
            ("caar" "f_car_c.htm")
            ("cadaar" "f_car_c.htm")
            ("cadadr" "f_car_c.htm")
            ("cadar" "f_car_c.htm")
            ("caddar" "f_car_c.htm")
            ("cadddr" "f_car_c.htm")
            ("caddr" "f_car_c.htm")
            ("cadr" "f_car_c.htm")
            ("call-arguments-limit" "v_call_a.htm")
            ("call-method" "m_call_m.htm")
            ("call-next-method" "f_call_n.htm")
            ("car" "f_car_c.htm")
            ("case" "m_case_.htm")
            ("catch" "s_catch.htm")
            ("ccase" "m_case_.htm")
            ("cdaaar" "f_car_c.htm")
            ("cdaadr" "f_car_c.htm")
            ("cdaar" "f_car_c.htm")
            ("cdadar" "f_car_c.htm")
            ("cdaddr" "f_car_c.htm")
            ("cdadr" "f_car_c.htm")
            ("cdar" "f_car_c.htm")
            ("cddaar" "f_car_c.htm")
            ("cddadr" "f_car_c.htm")
            ("cddar" "f_car_c.htm")
            ("cdddar" "f_car_c.htm")
            ("cddddr" "f_car_c.htm")
            ("cdddr" "f_car_c.htm")
            ("cddr" "f_car_c.htm")
            ("cdr" "f_car_c.htm")
            ("ceiling" "f_floorc.htm")
            ("cell-error" "e_cell_e.htm")
            ("cell-error-name" "f_cell_e.htm")
            ("cerror" "f_cerror.htm")
            ("change-class" "f_chg_cl.htm")
            ("char" "f_char_.htm")
            ("char-code" "f_char_c.htm")
            ("char-code-limit" "v_char_c.htm")
            ("char-downcase" "f_char_u.htm")
            ("char-equal" "f_chareq.htm")
            ("char-greaterp" "f_chareq.htm")
            ("char-int" "f_char_i.htm")
            ("char-lessp" "f_chareq.htm")
            ("char-name" "f_char_n.htm")
            ("char-not-equal" "f_chareq.htm")
            ("char-not-greaterp" "f_chareq.htm")
            ("char-not-lessp" "f_chareq.htm")
            ("char-upcase" "f_char_u.htm")
            ("char/=" "f_chareq.htm")
            ("char<" "f_chareq.htm")
            ("char<=" "f_chareq.htm")
            ("char=" "f_chareq.htm")
            ("char>" "f_chareq.htm")
            ("char>=" "f_chareq.htm")
            ("character" "a_ch.htm")
            ("characterp" "f_chp.htm")
            ("check-type" "m_check_.htm")
            ("cis" "f_cis.htm")
            ("class" "t_class.htm")
            ("class-name" "f_class_.htm")
            ("class-of" "f_clas_1.htm")
            ("clear-input" "f_clear_.htm")
            ("clear-output" "f_finish.htm")
            ("close" "f_close.htm")
            ("clrhash" "f_clrhas.htm")
            ("code-char" "f_code_c.htm")
            ("coerce" "f_coerce.htm")
            ("compilation-speed" "d_optimi.htm")
            ("compile" "f_cmp.htm")
            ("compile-file" "f_cmp_fi.htm")
            ("compile-file-pathname" "f_cmp__1.htm")
            ("compiled-function" "t_cmpd_f.htm")
            ("compiled-function-p" "f_cmpd_f.htm")
            ("compiler-macro" "f_docume.htm")
            ("compiler-macro-function" "f_cmp_ma.htm")
            ("complement" "f_comple.htm")
            ("complex" "a_comple.htm")
            ("complexp" "f_comp_3.htm")
            ("compute-applicable-methods" "f_comput.htm")
            ("compute-restarts" "f_comp_1.htm")
            ("concatenate" "f_concat.htm")
            ("concatenated-stream" "t_concat.htm")
            ("concatenated-stream-streams" "f_conc_1.htm")
            ("cond" "m_cond.htm")
            ("condition" "e_cnd.htm")
            ("conjugate" "f_conjug.htm")
            ("cons" "a_cons.htm")
            ("consp" "f_consp.htm")
            ("constantly" "f_cons_1.htm")
            ("constantp" "f_consta.htm")
            ("continue" "a_contin.htm")
            ("control-error" "e_contro.htm")
            ("copy-alist" "f_cp_ali.htm")
            ("copy-list" "f_cp_lis.htm")
            ("copy-pprint-dispatch" "f_cp_ppr.htm")
            ("copy-readtable" "f_cp_rdt.htm")
            ("copy-seq" "f_cp_seq.htm")
            ("copy-structure" "f_cp_stu.htm")
            ("copy-symbol" "f_cp_sym.htm")
            ("copy-tree" "f_cp_tre.htm")
            ("cos" "f_sin_c.htm")
            ("cosh" "f_sinh_.htm")
            ("count" "f_countc.htm")
            ("count-if" "f_countc.htm")
            ("count-if-not" "f_countc.htm")
            ("ctypecase" "m_tpcase.htm")
            ("debug" "d_optimi.htm")
            ("decf" "m_incf_.htm")
            ("declaim" "m_declai.htm")
            ("declaration" "d_declar.htm")
            ("declare" "s_declar.htm")
            ("decode-float" "f_dec_fl.htm")
            ("decode-universal-time" "f_dec_un.htm")
            ("defclass" "m_defcla.htm")
            ("defconstant" "m_defcon.htm")
            ("defgeneric" "m_defgen.htm")
            ("define-compiler-macro" "m_define.htm")
            ("define-condition" "m_defi_5.htm")
            ("define-method-combination" "m_defi_4.htm")
            ("define-modify-macro" "m_defi_2.htm")
            ("define-setf-expander" "m_defi_3.htm")
            ("define-symbol-macro" "m_defi_1.htm")
            ("defmacro" "m_defmac.htm")
            ("defmethod" "m_defmet.htm")
            ("defpackage" "m_defpkg.htm")
            ("defparameter" "m_defpar.htm")
            ("defsetf" "m_defset.htm")
            ("defstruct" "m_defstr.htm")
            ("deftype" "m_deftp.htm")
            ("defun" "m_defun.htm")
            ("defvar" "m_defpar.htm")
            ("delete" "f_rm_rm.htm")
            ("delete-duplicates" "f_rm_dup.htm")
            ("delete-file" "f_del_fi.htm")
            ("delete-if" "f_rm_rm.htm")
            ("delete-if-not" "f_rm_rm.htm")
            ("delete-package" "f_del_pk.htm")
            ("denominator" "f_numera.htm")
            ("deposit-field" "f_deposi.htm")
            ("describe" "f_descri.htm")
            ("describe-object" "f_desc_1.htm")
            ("destructuring-bind" "m_destru.htm")
            ("digit-char" "f_digit_.htm")
            ("digit-char-p" "f_digi_1.htm")
            ("directory" "f_dir.htm")
            ("directory-namestring" "f_namest.htm")
            ("disassemble" "f_disass.htm")
            ("division-by-zero" "e_divisi.htm")
            ("do" "m_do_do.htm")
            ("do*" "m_do_do.htm")
            ("do-all-symbols" "m_do_sym.htm")
            ("do-external-symbols" "m_do_sym.htm")
            ("do-symbols" "m_do_sym.htm")
            ("documentation" "f_docume.htm")
            ("dolist" "m_dolist.htm")
            ("dotimes" "m_dotime.htm")
            ("double-float" "t_short_.htm")
            ("double-float-epsilon" "v_short_.htm")
            ("double-float-negative-epsilon" "v_short_.htm")
            ("dpb" "f_dpb.htm")
            ("dribble" "f_dribbl.htm")
            ("dynamic-extent" "d_dynami.htm")
            ("ecase" "m_case_.htm")
            ("echo-stream" "t_echo_s.htm")
            ("echo-stream-input-stream" "f_echo_s.htm")
            ("echo-stream-output-stream" "f_echo_s.htm")
            ("ed" "f_ed.htm")
            ("eighth" "f_firstc.htm")
            ("elt" "f_elt.htm")
            ("encode-universal-time" "f_encode.htm")
            ("end-of-file" "e_end_of.htm")
            ("endp" "f_endp.htm")
            ("enough-namestring" "f_namest.htm")
            ("ensure-directories-exist" "f_ensu_1.htm")
            ("ensure-generic-function" "f_ensure.htm")
            ("eq" "f_eq.htm")
            ("eql" "a_eql.htm")
            ("equal" "f_equal.htm")
            ("equalp" "f_equalp.htm")
            ("error" "a_error.htm")
            ("etypecase" "m_tpcase.htm")
            ("eval" "f_eval.htm")
            ("eval-when" "s_eval_w.htm")
            ("evenp" "f_evenpc.htm")
            ("every" "f_everyc.htm")
            ("exp" "f_exp_e.htm")
            ("export" "f_export.htm")
            ("expt" "f_exp_e.htm")
            ("extended-char" "t_extend.htm")
            ("fboundp" "f_fbound.htm")
            ("fceiling" "f_floorc.htm")
            ("fdefinition" "f_fdefin.htm")
            ("ffloor" "f_floorc.htm")
            ("fifth" "f_firstc.htm")
            ("file-author" "f_file_a.htm")
            ("file-error" "e_file_e.htm")
            ("file-error-pathname" "f_file_e.htm")
            ("file-length" "f_file_l.htm")
            ("file-namestring" "f_namest.htm")
            ("file-position" "f_file_p.htm")
            ("file-stream" "t_file_s.htm")
            ("file-string-length" "f_file_s.htm")
            ("file-write-date" "f_file_w.htm")
            ("fill" "f_fill.htm")
            ("fill-pointer" "f_fill_p.htm")
            ("find" "f_find_.htm")
            ("find-all-symbols" "f_find_a.htm")
            ("find-class" "f_find_c.htm")
            ("find-if" "f_find_.htm")
            ("find-if-not" "f_find_.htm")
            ("find-method" "f_find_m.htm")
            ("find-package" "f_find_p.htm")
            ("find-restart" "f_find_r.htm")
            ("find-symbol" "f_find_s.htm")
            ("finish-output" "f_finish.htm")
            ("first" "f_firstc.htm")
            ("fixnum" "t_fixnum.htm")
            ("flet" "s_flet_.htm")
            ("float" "a_float.htm")
            ("float-digits" "f_dec_fl.htm")
            ("float-precision" "f_dec_fl.htm")
            ("float-radix" "f_dec_fl.htm")
            ("float-sign" "f_dec_fl.htm")
            ("floating-point-inexact" "e_floa_1.htm")
            ("floating-point-invalid-operation" "e_floati.htm")
            ("floating-point-overflow" "e_floa_2.htm")
            ("floating-point-underflow" "e_floa_3.htm")
            ("floatp" "f_floatp.htm")
            ("floor" "f_floorc.htm")
            ("fmakunbound" "f_fmakun.htm")
            ("force-output" "f_finish.htm")
            ("format" "f_format.htm")
            ("formatter" "m_format.htm")
            ("fourth" "f_firstc.htm")
            ("fresh-line" "f_terpri.htm")
            ("fround" "f_floorc.htm")
            ("ftruncate" "f_floorc.htm")
            ("ftype" "d_ftype.htm")
            ("funcall" "f_funcal.htm")
            ("function" "a_fn.htm")
            ("function-keywords" "f_fn_kwd.htm")
            ("function-lambda-expression" "f_fn_lam.htm")
            ("functionp" "f_fnp.htm")
            ("gcd" "f_gcd.htm")
            ("generic-function" "t_generi.htm")
            ("gensym" "f_gensym.htm")
            ("gentemp" "f_gentem.htm")
            ("get" "f_get.htm")
            ("get-decoded-time" "f_get_un.htm")
            ("get-dispatch-macro-character" "f_set__1.htm")
            ("get-internal-real-time" "f_get_in.htm")
            ("get-internal-run-time" "f_get__1.htm")
            ("get-macro-character" "f_set_ma.htm")
            ("get-output-stream-string" "f_get_ou.htm")
            ("get-properties" "f_get_pr.htm")
            ("get-setf-expansion" "f_get_se.htm")
            ("get-universal-time" "f_get_un.htm")
            ("getf" "f_getf.htm")
            ("gethash" "f_gethas.htm")
            ("go" "s_go.htm")
            ("graphic-char-p" "f_graphi.htm")
            ("handler-bind" "m_handle.htm")
            ("handler-case" "m_hand_1.htm")
            ("hash-table" "t_hash_t.htm")
            ("hash-table-count" "f_hash_1.htm")
            ("hash-table-p" "f_hash_t.htm")
            ("hash-table-rehash-size" "f_hash_2.htm")
            ("hash-table-rehash-threshold" "f_hash_3.htm")
            ("hash-table-size" "f_hash_4.htm")
            ("hash-table-test" "f_hash_5.htm")
            ("host-namestring" "f_namest.htm")
            ("identity" "f_identi.htm")
            ("if" "s_if.htm")
            ("ignorable" "d_ignore.htm")
            ("ignore" "d_ignore.htm")
            ("ignore-errors" "m_ignore.htm")
            ("imagpart" "f_realpa.htm")
            ("import" "f_import.htm")
            ("in-package" "m_in_pkg.htm")
            ("incf" "m_incf_.htm")
            ("initialize-instance" "f_init_i.htm")
            ("inline" "d_inline.htm")
            ("input-stream-p" "f_in_stm.htm")
            ("inspect" "f_inspec.htm")
            ("integer" "t_intege.htm")
            ("integer-decode-float" "f_dec_fl.htm")
            ("integer-length" "f_intege.htm")
            ("integerp" "f_inte_1.htm")
            ("interactive-stream-p" "f_intera.htm")
            ("intern" "f_intern.htm")
            ("internal-time-units-per-second" "v_intern.htm")
            ("intersection" "f_isec_.htm")
            ("invalid-method-error" "f_invali.htm")
            ("invoke-debugger" "f_invoke.htm")
            ("invoke-restart" "f_invo_1.htm")
            ("invoke-restart-interactively" "f_invo_2.htm")
            ("isqrt" "f_sqrt_.htm")
            ("keyword" "t_kwd.htm")
            ("keywordp" "f_kwdp.htm")
            ("labels" "s_flet_.htm")
            ("lambda" "a_lambda.htm")
            ("lambda-list-keywords" "v_lambda.htm")
            ("lambda-parameters-limit" "v_lamb_1.htm")
            ("last" "f_last.htm")
            ("lcm" "f_lcm.htm")
            ("ldb" "f_ldb.htm")
            ("ldb-test" "f_ldb_te.htm")
            ("ldiff" "f_ldiffc.htm")
            ("least-negative-double-float" "v_most_1.htm")
            ("least-negative-long-float" "v_most_1.htm")
            ("least-negative-normalized-double-float" "v_most_1.htm")
            ("least-negative-normalized-long-float" "v_most_1.htm")
            ("least-negative-normalized-short-float" "v_most_1.htm")
            ("least-negative-normalized-single-float" "v_most_1.htm")
            ("least-negative-short-float" "v_most_1.htm")
            ("least-negative-single-float" "v_most_1.htm")
            ("least-positive-double-float" "v_most_1.htm")
            ("least-positive-long-float" "v_most_1.htm")
            ("least-positive-normalized-double-float" "v_most_1.htm")
            ("least-positive-normalized-long-float" "v_most_1.htm")
            ("least-positive-normalized-short-float" "v_most_1.htm")
            ("least-positive-normalized-single-float" "v_most_1.htm")
            ("least-positive-short-float" "v_most_1.htm")
            ("least-positive-single-float" "v_most_1.htm")
            ("length" "f_length.htm")
            ("let" "s_let_l.htm")
            ("let*" "s_let_l.htm")
            ("lisp-implementation-type" "f_lisp_i.htm")
            ("lisp-implementation-version" "f_lisp_i.htm")
            ("list" "a_list.htm")
            ("list*" "f_list_.htm")
            ("list-all-packages" "f_list_a.htm")
            ("list-length" "f_list_l.htm")
            ("listen" "f_listen.htm")
            ("listp" "f_listp.htm")
            ("load" "f_load.htm")
            ("load-logical-pathname-translations" "f_ld_log.htm")
            ("load-time-value" "s_ld_tim.htm")
            ("locally" "s_locall.htm")
            ("log" "f_log.htm")
            ("logand" "f_logand.htm")
            ("logandc1" "f_logand.htm")
            ("logandc2" "f_logand.htm")
            ("logbitp" "f_logbtp.htm")
            ("logcount" "f_logcou.htm")
            ("logeqv" "f_logand.htm")
            ("logical-pathname" "a_logica.htm")
            ("logical-pathname-translations" "f_logica.htm")
            ("logior" "f_logand.htm")
            ("lognand" "f_logand.htm")
            ("lognor" "f_logand.htm")
            ("lognot" "f_logand.htm")
            ("logorc1" "f_logand.htm")
            ("logorc2" "f_logand.htm")
            ("logtest" "f_logtes.htm")
            ("logxor" "f_logand.htm")
            ("long-float" "t_short_.htm")
            ("long-float-epsilon" "v_short_.htm")
            ("long-float-negative-epsilon" "v_short_.htm")
            ("long-site-name" "f_short_.htm")
            ("loop" "m_loop.htm")
            ("loop-finish" "m_loop_f.htm")
            ("lower-case-p" "f_upper_.htm")
            ("machine-instance" "f_mach_i.htm")
            ("machine-type" "f_mach_t.htm")
            ("machine-version" "f_mach_v.htm")
            ("macro-function" "f_macro_.htm")
            ("macroexpand" "f_mexp_.htm")
            ("macroexpand-1" "f_mexp_.htm")
            ("macrolet" "s_flet_.htm")
            ("make-array" "f_mk_ar.htm")
            ("make-broadcast-stream" "f_mk_bro.htm")
            ("make-concatenated-stream" "f_mk_con.htm")
            ("make-condition" "f_mk_cnd.htm")
            ("make-dispatch-macro-character" "f_mk_dis.htm")
            ("make-echo-stream" "f_mk_ech.htm")
            ("make-hash-table" "f_mk_has.htm")
            ("make-instance" "f_mk_ins.htm")
            ("make-instances-obsolete" "f_mk_i_1.htm")
            ("make-list" "f_mk_lis.htm")
            ("make-load-form" "f_mk_ld_.htm")
            ("make-load-form-saving-slots" "f_mk_l_1.htm")
            ("make-method" "m_call_m.htm")
            ("make-package" "f_mk_pkg.htm")
            ("make-pathname" "f_mk_pn.htm")
            ("make-random-state" "f_mk_rnd.htm")
            ("make-sequence" "f_mk_seq.htm")
            ("make-string" "f_mk_stg.htm")
            ("make-string-input-stream" "f_mk_s_1.htm")
            ("make-string-output-stream" "f_mk_s_2.htm")
            ("make-symbol" "f_mk_sym.htm")
            ("make-synonym-stream" "f_mk_syn.htm")
            ("make-two-way-stream" "f_mk_two.htm")
            ("makunbound" "f_makunb.htm")
            ("map" "f_map.htm")
            ("map-into" "f_map_in.htm")
            ("mapc" "f_mapc_.htm")
            ("mapcan" "f_mapc_.htm")
            ("mapcar" "f_mapc_.htm")
            ("mapcon" "f_mapc_.htm")
            ("maphash" "f_maphas.htm")
            ("mapl" "f_mapc_.htm")
            ("maplist" "f_mapc_.htm")
            ("mask-field" "f_mask_f.htm")
            ("max" "f_max_m.htm")
            ("member" "a_member.htm")
            ("member-if" "f_mem_m.htm")
            ("member-if-not" "f_mem_m.htm")
            ("merge" "f_merge.htm")
            ("merge-pathnames" "f_merge_.htm")
            ("method" "t_method.htm")
            ("method-combination" "a_method.htm")
            ("method-combination-error" "f_meth_1.htm")
            ("method-qualifiers" "f_method.htm")
            ("min" "f_max_m.htm")
            ("minusp" "f_minusp.htm")
            ("mismatch" "f_mismat.htm")
            ("mod" "a_mod.htm")
            ("most-negative-double-float" "v_most_1.htm")
            ("most-negative-fixnum" "v_most_p.htm")
            ("most-negative-long-float" "v_most_1.htm")
            ("most-negative-short-float" "v_most_1.htm")
            ("most-negative-single-float" "v_most_1.htm")
            ("most-positive-double-float" "v_most_1.htm")
            ("most-positive-fixnum" "v_most_p.htm")
            ("most-positive-long-float" "v_most_1.htm")
            ("most-positive-short-float" "v_most_1.htm")
            ("most-positive-single-float" "v_most_1.htm")
            ("muffle-warning" "a_muffle.htm")
            ("multiple-value-bind" "m_multip.htm")
            ("multiple-value-call" "s_multip.htm")
            ("multiple-value-list" "m_mult_1.htm")
            ("multiple-value-prog1" "s_mult_1.htm")
            ("multiple-value-setq" "m_mult_2.htm")
            ("multiple-values-limit" "v_multip.htm")
            ("name-char" "f_name_c.htm")
            ("namestring" "f_namest.htm")
            ("nbutlast" "f_butlas.htm")
            ("nconc" "f_nconc.htm")
            ("next-method-p" "f_next_m.htm")
            ("nil" "a_nil.htm")
            ("nintersection" "f_isec_.htm")
            ("ninth" "f_firstc.htm")
            ("no-applicable-method" "f_no_app.htm")
            ("no-next-method" "f_no_nex.htm")
            ("not" "a_not.htm")
            ("notany" "f_everyc.htm")
            ("notevery" "f_everyc.htm")
            ("notinline" "d_inline.htm")
            ("nreconc" "f_revapp.htm")
            ("nreverse" "f_revers.htm")
            ("nset-difference" "f_set_di.htm")
            ("nset-exclusive-or" "f_set_ex.htm")
            ("nstring-capitalize" "f_stg_up.htm")
            ("nstring-downcase" "f_stg_up.htm")
            ("nstring-upcase" "f_stg_up.htm")
            ("nsublis" "f_sublis.htm")
            ("nsubst" "f_substc.htm")
            ("nsubst-if" "f_substc.htm")
            ("nsubst-if-not" "f_substc.htm")
            ("nsubstitute" "f_sbs_s.htm")
            ("nsubstitute-if" "f_sbs_s.htm")
            ("nsubstitute-if-not" "f_sbs_s.htm")
            ("nth" "f_nth.htm")
            ("nth-value" "m_nth_va.htm")
            ("nthcdr" "f_nthcdr.htm")
            ("null" "a_null.htm")
            ("number" "t_number.htm")
            ("numberp" "f_nump.htm")
            ("numerator" "f_numera.htm")
            ("nunion" "f_unionc.htm")
            ("oddp" "f_evenpc.htm")
            ("open" "f_open.htm")
            ("open-stream-p" "f_open_s.htm")
            ("optimize" "d_optimi.htm")
            ("or" "a_or.htm")
            ("otherwise" "m_case_.htm")
            ("output-stream-p" "f_in_stm.htm")
            ("package" "t_pkg.htm")
            ("package-error" "e_pkg_er.htm")
            ("package-error-package" "f_pkg_er.htm")
            ("package-name" "f_pkg_na.htm")
            ("package-nicknames" "f_pkg_ni.htm")
            ("package-shadowing-symbols" "f_pkg_sh.htm")
            ("package-use-list" "f_pkg_us.htm")
            ("package-used-by-list" "f_pkg__1.htm")
            ("packagep" "f_pkgp.htm")
            ("pairlis" "f_pairli.htm")
            ("parse-error" "e_parse_.htm")
            ("parse-integer" "f_parse_.htm")
            ("parse-namestring" "f_pars_1.htm")
            ("pathname" "a_pn.htm")
            ("pathname-device" "f_pn_hos.htm")
            ("pathname-directory" "f_pn_hos.htm")
            ("pathname-host" "f_pn_hos.htm")
            ("pathname-match-p" "f_pn_mat.htm")
            ("pathname-name" "f_pn_hos.htm")
            ("pathname-type" "f_pn_hos.htm")
            ("pathname-version" "f_pn_hos.htm")
            ("pathnamep" "f_pnp.htm")
            ("peek-char" "f_peek_c.htm")
            ("phase" "f_phase.htm")
            ("pi" "v_pi.htm")
            ("plusp" "f_minusp.htm")
            ("pop" "m_pop.htm")
            ("position" "f_pos_p.htm")
            ("position-if" "f_pos_p.htm")
            ("position-if-not" "f_pos_p.htm")
            ("pprint" "f_wr_pr.htm")
            ("pprint-dispatch" "f_ppr_di.htm")
            ("pprint-exit-if-list-exhausted" "m_ppr_ex.htm")
            ("pprint-fill" "f_ppr_fi.htm")
            ("pprint-indent" "f_ppr_in.htm")
            ("pprint-linear" "f_ppr_fi.htm")
            ("pprint-logical-block" "m_ppr_lo.htm")
            ("pprint-newline" "f_ppr_nl.htm")
            ("pprint-pop" "m_ppr_po.htm")
            ("pprint-tab" "f_ppr_ta.htm")
            ("pprint-tabular" "f_ppr_fi.htm")
            ("prin1" "f_wr_pr.htm")
            ("prin1-to-string" "f_wr_to_.htm")
            ("princ" "f_wr_pr.htm")
            ("princ-to-string" "f_wr_to_.htm")
            ("print" "f_wr_pr.htm")
            ("print-not-readable" "e_pr_not.htm")
            ("print-not-readable-object" "f_pr_not.htm")
            ("print-object" "f_pr_obj.htm")
            ("print-unreadable-object" "m_pr_unr.htm")
            ("probe-file" "f_probe_.htm")
            ("proclaim" "f_procla.htm")
            ("prog" "m_prog_.htm")
            ("prog*" "m_prog_.htm")
            ("prog1" "m_prog1c.htm")
            ("prog2" "m_prog1c.htm")
            ("progn" "s_progn.htm")
            ("program-error" "e_progra.htm")
            ("progv" "s_progv.htm")
            ("provide" "f_provid.htm")
            ("psetf" "m_setf_.htm")
            ("psetq" "m_psetq.htm")
            ("push" "m_push.htm")
            ("pushnew" "m_pshnew.htm")
            ("quote" "s_quote.htm")
            ("random" "f_random.htm")
            ("random-state" "t_rnd_st.htm")
            ("random-state-p" "f_rnd_st.htm")
            ("rassoc" "f_rassoc.htm")
            ("rassoc-if" "f_rassoc.htm")
            ("rassoc-if-not" "f_rassoc.htm")
            ("ratio" "t_ratio.htm")
            ("rational" "a_ration.htm")
            ("rationalize" "f_ration.htm")
            ("rationalp" "f_rati_1.htm")
            ("read" "f_rd_rd.htm")
            ("read-byte" "f_rd_by.htm")
            ("read-char" "f_rd_cha.htm")
            ("read-char-no-hang" "f_rd_c_1.htm")
            ("read-delimited-list" "f_rd_del.htm")
            ("read-from-string" "f_rd_fro.htm")
            ("read-line" "f_rd_lin.htm")
            ("read-preserving-whitespace" "f_rd_rd.htm")
            ("read-sequence" "f_rd_seq.htm")
            ("reader-error" "e_rder_e.htm")
            ("readtable" "t_rdtabl.htm")
            ("readtable-case" "f_rdtabl.htm")
            ("readtablep" "f_rdta_1.htm")
            ("real" "t_real.htm")
            ("realp" "f_realp.htm")
            ("realpart" "f_realpa.htm")
            ("reduce" "f_reduce.htm")
            ("reinitialize-instance" "f_reinit.htm")
            ("rem" "f_mod_r.htm")
            ("remf" "m_remf.htm")
            ("remhash" "f_remhas.htm")
            ("remove" "f_rm_rm.htm")
            ("remove-duplicates" "f_rm_dup.htm")
            ("remove-if" "f_rm_rm.htm")
            ("remove-if-not" "f_rm_rm.htm")
            ("remove-method" "f_rm_met.htm")
            ("remprop" "f_rempro.htm")
            ("rename-file" "f_rn_fil.htm")
            ("rename-package" "f_rn_pkg.htm")
            ("replace" "f_replac.htm")
            ("require" "f_provid.htm")
            ("rest" "f_rest.htm")
            ("restart" "t_rst.htm")
            ("restart-bind" "m_rst_bi.htm")
            ("restart-case" "m_rst_ca.htm")
            ("restart-name" "f_rst_na.htm")
            ("return" "m_return.htm")
            ("return-from" "s_ret_fr.htm")
            ("revappend" "f_revapp.htm")
            ("reverse" "f_revers.htm")
            ("room" "f_room.htm")
            ("rotatef" "m_rotate.htm")
            ("round" "f_floorc.htm")
            ("row-major-aref" "f_row_ma.htm")
            ("rplaca" "f_rplaca.htm")
            ("rplacd" "f_rplaca.htm")
            ("safety" "d_optimi.htm")
            ("satisfies" "t_satisf.htm")
            ("sbit" "f_bt_sb.htm")
            ("scale-float" "f_dec_fl.htm")
            ("schar" "f_char_.htm")
            ("search" "f_search.htm")
            ("second" "f_firstc.htm")
            ("sequence" "t_seq.htm")
            ("serious-condition" "e_seriou.htm")
            ("set" "f_set.htm")
            ("set-difference" "f_set_di.htm")
            ("set-dispatch-macro-character" "f_set__1.htm")
            ("set-exclusive-or" "f_set_ex.htm")
            ("set-macro-character" "f_set_ma.htm")
            ("set-pprint-dispatch" "f_set_pp.htm")
            ("set-syntax-from-char" "f_set_sy.htm")
            ("setf" "a_setf.htm")
            ("setq" "s_setq.htm")
            ("seventh" "f_firstc.htm")
            ("shadow" "f_shadow.htm")
            ("shadowing-import" "f_shdw_i.htm")
            ("shared-initialize" "f_shared.htm")
            ("shiftf" "m_shiftf.htm")
            ("short-float" "t_short_.htm")
            ("short-float-epsilon" "v_short_.htm")
            ("short-float-negative-epsilon" "v_short_.htm")
            ("short-site-name" "f_short_.htm")
            ("signal" "f_signal.htm")
            ("signed-byte" "t_sgn_by.htm")
            ("signum" "f_signum.htm")
            ("simple-array" "t_smp_ar.htm")
            ("simple-base-string" "t_smp_ba.htm")
            ("simple-bit-vector" "t_smp_bt.htm")
            ("simple-bit-vector-p" "f_smp_bt.htm")
            ("simple-condition" "e_smp_cn.htm")
            ("simple-condition-format-arguments" "f_smp_cn.htm")
            ("simple-condition-format-control" "f_smp_cn.htm")
            ("simple-error" "e_smp_er.htm")
            ("simple-string" "t_smp_st.htm")
            ("simple-string-p" "f_smp_st.htm")
            ("simple-type-error" "e_smp_tp.htm")
            ("simple-vector" "t_smp_ve.htm")
            ("simple-vector-p" "f_smp_ve.htm")
            ("simple-warning" "e_smp_wa.htm")
            ("sin" "f_sin_c.htm")
            ("single-float" "t_short_.htm")
            ("single-float-epsilon" "v_short_.htm")
            ("single-float-negative-epsilon" "v_short_.htm")
            ("sinh" "f_sinh_.htm")
            ("sixth" "f_firstc.htm")
            ("sleep" "f_sleep.htm")
            ("slot-boundp" "f_slt_bo.htm")
            ("slot-exists-p" "f_slt_ex.htm")
            ("slot-makunbound" "f_slt_ma.htm")
            ("slot-missing" "f_slt_mi.htm")
            ("slot-unbound" "f_slt_un.htm")
            ("slot-value" "f_slt_va.htm")
            ("software-type" "f_sw_tpc.htm")
            ("software-version" "f_sw_tpc.htm")
            ("some" "f_everyc.htm")
            ("sort" "f_sort_.htm")
            ("space" "d_optimi.htm")
            ("special" "d_specia.htm")
            ("special-operator-p" "f_specia.htm")
            ("speed" "d_optimi.htm")
            ("sqrt" "f_sqrt_.htm")
            ("stable-sort" "f_sort_.htm")
            ("standard" "07_ffb.htm")
            ("standard-char" "t_std_ch.htm")
            ("standard-char-p" "f_std_ch.htm")
            ("standard-class" "t_std_cl.htm")
            ("standard-generic-function" "t_std_ge.htm")
            ("standard-method" "t_std_me.htm")
            ("standard-object" "t_std_ob.htm")
            ("step" "m_step.htm")
            ("storage-condition" "e_storag.htm")
            ("store-value" "a_store_.htm")
            ("stream" "t_stream.htm")
            ("stream-element-type" "f_stm_el.htm")
            ("stream-error" "e_stm_er.htm")
            ("stream-error-stream" "f_stm_er.htm")
            ("stream-external-format" "f_stm_ex.htm")
            ("streamp" "f_stmp.htm")
            ("string" "a_string.htm")
            ("string-capitalize" "f_stg_up.htm")
            ("string-downcase" "f_stg_up.htm")
            ("string-equal" "f_stgeq_.htm")
            ("string-greaterp" "f_stgeq_.htm")
            ("string-left-trim" "f_stg_tr.htm")
            ("string-lessp" "f_stgeq_.htm")
            ("string-not-equal" "f_stgeq_.htm")
            ("string-not-greaterp" "f_stgeq_.htm")
            ("string-not-lessp" "f_stgeq_.htm")
            ("string-right-trim" "f_stg_tr.htm")
            ("string-stream" "t_stg_st.htm")
            ("string-trim" "f_stg_tr.htm")
            ("string-upcase" "f_stg_up.htm")
            ("string/=" "f_stgeq_.htm")
            ("string<" "f_stgeq_.htm")
            ("string<=" "f_stgeq_.htm")
            ("string=" "f_stgeq_.htm")
            ("string>" "f_stgeq_.htm")
            ("string>=" "f_stgeq_.htm")
            ("stringp" "f_stgp.htm")
            ("structure" "f_docume.htm")
            ("structure-class" "t_stu_cl.htm")
            ("structure-object" "t_stu_ob.htm")
            ("style-warning" "e_style_.htm")
            ("sublis" "f_sublis.htm")
            ("subseq" "f_subseq.htm")
            ("subsetp" "f_subset.htm")
            ("subst" "f_substc.htm")
            ("subst-if" "f_substc.htm")
            ("subst-if-not" "f_substc.htm")
            ("substitute" "f_sbs_s.htm")
            ("substitute-if" "f_sbs_s.htm")
            ("substitute-if-not" "f_sbs_s.htm")
            ("subtypep" "f_subtpp.htm")
            ("svref" "f_svref.htm")
            ("sxhash" "f_sxhash.htm")
            ("symbol" "t_symbol.htm")
            ("symbol-function" "f_symb_1.htm")
            ("symbol-macrolet" "s_symbol.htm")
            ("symbol-name" "f_symb_2.htm")
            ("symbol-package" "f_symb_3.htm")
            ("symbol-plist" "f_symb_4.htm")
            ("symbol-value" "f_symb_5.htm")
            ("symbolp" "f_symbol.htm")
            ("synonym-stream" "t_syn_st.htm")
            ("synonym-stream-symbol" "f_syn_st.htm")
            ("t" "a_t.htm")
            ("tagbody" "s_tagbod.htm")
            ("tailp" "f_ldiffc.htm")
            ("tan" "f_sin_c.htm")
            ("tanh" "f_sinh_.htm")
            ("tenth" "f_firstc.htm")
            ("terpri" "f_terpri.htm")
            ("the" "s_the.htm")
            ("third" "f_firstc.htm")
            ("throw" "s_throw.htm")
            ("time" "m_time.htm")
            ("trace" "m_tracec.htm")
            ("translate-logical-pathname" "f_tr_log.htm")
            ("translate-pathname" "f_tr_pn.htm")
            ("tree-equal" "f_tree_e.htm")
            ("truename" "f_tn.htm")
            ("truncate" "f_floorc.htm")
            ("two-way-stream" "t_two_wa.htm")
            ("two-way-stream-input-stream" "f_two_wa.htm")
            ("two-way-stream-output-stream" "f_two_wa.htm")
            ("type" "a_type.htm")
            ("type-error" "e_tp_err.htm")
            ("type-error-datum" "f_tp_err.htm")
            ("type-error-expected-type" "f_tp_err.htm")
            ("type-of" "f_tp_of.htm")
            ("typecase" "m_tpcase.htm")
            ("typep" "f_typep.htm")
            ("unbound-slot" "e_unboun.htm")
            ("unbound-slot-instance" "f_unboun.htm")
            ("unbound-variable" "e_unbo_1.htm")
            ("undefined-function" "e_undefi.htm")
            ("unexport" "f_unexpo.htm")
            ("unintern" "f_uninte.htm")
            ("union" "f_unionc.htm")
            ("unless" "m_when_.htm")
            ("unread-char" "f_unrd_c.htm")
            ("unsigned-byte" "t_unsgn_.htm")
            ("untrace" "m_tracec.htm")
            ("unuse-package" "f_unuse_.htm")
            ("unwind-protect" "s_unwind.htm")
            ("update-instance-for-different-class" "f_update.htm")
            ("update-instance-for-redefined-class" "f_upda_1.htm")
            ("upgraded-array-element-type" "f_upgr_1.htm")
            ("upgraded-complex-part-type" "f_upgrad.htm")
            ("upper-case-p" "f_upper_.htm")
            ("use-package" "f_use_pk.htm")
            ("use-value" "a_use_va.htm")
            ("user-homedir-pathname" "f_user_h.htm")
            ("values" "a_values.htm")
            ("values-list" "f_vals_l.htm")
            ("variable" "f_docume.htm")
            ("vector" "a_vector.htm")
            ("vector-pop" "f_vec_po.htm")
            ("vector-push" "f_vec_ps.htm")
            ("vector-push-extend" "f_vec_ps.htm")
            ("vectorp" "f_vecp.htm")
            ("warn" "f_warn.htm")
            ("warning" "e_warnin.htm")
            ("when" "m_when_.htm")
            ("wild-pathname-p" "f_wild_p.htm")
            ("with-accessors" "m_w_acce.htm")
            ("with-compilation-unit" "m_w_comp.htm")
            ("with-condition-restarts" "m_w_cnd_.htm")
            ("with-hash-table-iterator" "m_w_hash.htm")
            ("with-input-from-string" "m_w_in_f.htm")
            ("with-open-file" "m_w_open.htm")
            ("with-open-stream" "m_w_op_1.htm")
            ("with-output-to-string" "m_w_out_.htm")
            ("with-package-iterator" "m_w_pkg_.htm")
            ("with-simple-restart" "m_w_smp_.htm")
            ("with-slots" "m_w_slts.htm")
            ("with-standard-io-syntax" "m_w_std_.htm")
            ("write" "f_wr_pr.htm")
            ("write-byte" "f_wr_by.htm")
            ("write-char" "f_wr_cha.htm")
            ("write-line" "f_wr_stg.htm")
            ("write-sequence" "f_wr_seq.htm")
            ("write-string" "f_wr_stg.htm")
            ("write-to-string" "f_wr_to_.htm")
            ("y-or-n-p" "f_y_or_n.htm")
            ("yes-or-no-p" "f_y_or_n.htm")
            ("zerop" "f_zerop.htm"))))
                
;;; FORMAT character lookup by Frode Vatvedt Fjeld  20030902
;;;
:;; adjusted for ILISP by Nikodemus Siivola 20030903

(defvar common-lisp-hyperspec-format-history nil
  "History of format characters looked up in the Common Lisp HyperSpec.")

(defvar common-lisp-hyperspec-format-characters (make-vector 67 0))


(defun common-lisp-hyperspec-section-6.0 (indices)
  (let ((string (format "%sBody/%s_" 
			common-lisp-hyperspec-root
			(pop indices))))
    (concat string 
	    (mapconcat (lambda (n)
			 (make-string 1 (+ ?a (- n 1))))
		       indices
		       "")
	    ".htm")))

(defun common-lisp-hyperpsec-section-4.0 (indices)
  (let ((string (format "%sBody/sec%s_" 
			common-lisp-hyperspec-root
			(pop indices))))
    (concat string
	    (mapconcat (lambda (n)
			 (format "%d" n))
		       indices
		       "-")	    
	    ".html")))

(defvar common-lisp-hyperspec-section-fun 'common-lisp-hyperspec-section-6.0)

(defun common-lisp-hyperspec-section (indices)
  (funcall common-lisp-hyperspec-section-fun indices))

(defun common-lisp-hyperspec-format (character-name)
   (interactive 
    (list (let ((char-at-point (char-to-string (char-after (point)))))
	    (if (and char-at-point
		     (intern-soft (upcase char-at-point)
				  common-lisp-hyperspec-format-characters))
 	       char-at-point
 	       (completing-read
 		"Look up format control character in Common Lisp HyperSpec: "
 		common-lisp-hyperspec-format-characters nil #'boundp
 		nil nil 'common-lisp-hyperspec-format-history)))))
   (maplist (lambda (entry)
	      (browse-url (common-lisp-hyperspec-section (car entry))))
	    (let ((symbol (intern-soft character-name
				       common-lisp-hyperspec-format-characters)))
	      (if (and symbol (boundp symbol))
		  (symbol-value symbol)
		  (error "The symbol `%s' is not defined in Common Lisp"
			 character-name)))))

(eval-when (load eval)
  (defalias 'hyperspec-lookup-format 'common-lisp-hyperspec-format))

(mapcar (lambda (entry)
	  (let ((symbol (intern (car entry)
				common-lisp-hyperspec-format-characters)))
	    (if (boundp symbol)
		(pushnew (cadr entry) (symbol-value symbol) :test 'equal)
		(set symbol (cdr entry))))
	  (when (and (= 1 (length (car entry)))
		     (not (string-equal (car entry) (upcase (car entry)))))
	    (let ((symbol (intern (upcase (car entry)) 
				  common-lisp-hyperspec-format-characters)))
	      (if (boundp symbol)
		  (pushnew (cadr entry) (symbol-value symbol) :test 'equal)
		  (set symbol (cdr entry))))))
	'(("c" (22 3 1 1)) ("C: Character" (22 3 1 1))
	  ("r" (22 3 2 1)) ("R: Radix" (22 3 2 1))
	  ("d" (22 3 2 2)) ("D: Decimal" (22 3 2-2))
          ("b" (22 3 2 3)) ("B: Binary" (22 3 2 3))
          ("o" (22 3 2 4)) ("O: Octal" (22 3 2 4))
          ("x" (22 3 2 5)) ("X: Hexadecimal" (22 3 2 5))
          ("f" (22 3 3 1)) ("F: Fixed-Format Floating-Point" (22 3 3 1))
          ("e" (22 3 3 2)) ("E: Exponential Floating-Point" (22 3 3 2))
          ("g" (22 3 3 3)) ("G: General Floating-Point" (22 3 3 3))
          ("$" (22 3 3 4)) ("Dollarsign: Monetary Floating-Point" (22 3 3 4))
          ("a" (22 3 4 1)) ("A: Aesthetic" (22 3 4 1))
          ("s" (22 3 4 2)) ("S: Standard" (22 3 4 2))
          ("w" (22 3 4 3)) ("W: Write" (22 3 4 3))
          ("_" (22 3 5 1)) ("Underscore: Conditional Newline" (22 3 5 1))
          ("<" (22 3 5 2)) ("Less-Than-Sign: Logical Block" (22 3 5 2))
          ("i" (22 3 5 3)) ("I: Indent" (22 3 5 3))
          ("/" (22 3 5 4)) ("Slash: Call Function" (22 3 5 4))
          ("t" (22 3 6 1)) ("T: Tabulate" (22 3 6 1))
          ("<" (22 3 6 2)) ("Less-Than-Sign: Justification" (22 3 6 2))
          (">" (22 3 6 3)) ("Greater-Than-Sign: End of Justification" (22 3 6 3))
          ("*" (22 3 7 1)) ("Asterisk: Go-To" (22 3 7 1))
          ("[" (22 3 7 2)) ("Left-Bracket: Conditional Expression" (22 3 7 2))
          ("]" (22 3 7 3)) ("Right-Bracket: End of Conditional Expression" (22 3 7 3))
          ("{" (22 3 7 4)) ("Left-Brace: Iteration" (22 3 7 4))
          ("}" (22 3 7 5)) ("Right-Brace: End of Iteration" (22 3 7 5))
          ("?" (22 3 7 6)) ("Question-Mark: Recursive Processing" (22 3 7 6))
          ("(" (22 3 8 1)) ("Left-Paren: Case Conversion" (22 3 8 1))
          (")" (22 3 8 2)) ("Right-Paren: End of Case Conversion" (22 3 8 2))
          ("p" (22 3 8 3)) ("P: Plural" (22 3 8-3))
          (";" (22 3 9 1)) ("Semicolon: Clause Separator" (22 3 9 1))
          ("^" (22 3 9 2)) ("Circumflex: Escape Upward" (22 3 9 2))
          ("Newline: Ignored Newline" (22 3 9 3))
          ("Nesting of FORMAT Operations" (22 3 10 1))
          ("Missing and Additional FORMAT Arguments" (22 3 10 2))
          ("Additional FORMAT Parameters" (22 3 10 3))))

(provide 'hyperspec)

;;; hyperspec.el ends here
ilisp-5.12.0+cvs.2004.12.26/find-src.lisp0000600000175000001440000007125310020674034016156 0ustar  mvelausers;;; -*- Mode: Lisp -*-
;;;
;;; find-src.lisp --
;;; ILISP source location support definitions for Common Lisp dialects.
;;; New version of the ilisp:source-file function (and friends).
;;; (Based on cmulisp.lisp for the CMU Common Lisp dialect, by Todd Kaufmann,
;;; May 1990; rewritten and extended by Bob Rogers July 2002 through March
;;; 2003.)
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list of
;;; present and past contributors.
;;;
;;; $Id: find-src.lisp,v 1.4 2003/11/27 03:40:29 rgrjr Exp $

(in-package :ilisp)

(defvar *known-definition-types* '(:function :setf :structure
				   #-(or cmu sbcl) :variable
				   #-(and cmu (not pcl)) :class)
  "The order of these tends to control what you get when you ask for them all.")
(defvar *function-spec-result* nil
  "accumulating function spec result.  [it would be nice to make this
obsolete.  -- rgr, 4-Sep-02.]")

;;; Low-level support.

(defun ilisp-find-class (class-name &optional (error-p t) environment)
  ;; it's a bit tacky to do all this at runtime, but on the other hand, cmucl
  ;; can be built without pcl, and this allows ilisp to work either way, without
  ;; having to recompile this file.  [except that this file depends on PCL in
  ;; other ways.  -- rgr, 12-Sep-02.]
  (let ((finder (cond ((find-package :pcl)
			 (intern (string :find-class) :pcl))
		      ((find-package :sb-pcl)
			 (intern (string :find-class) :sb-pcl))
		      (t
			'find-class))))
    (when (fboundp finder)
      (funcall finder class-name error-p environment))))

;;; Patch.

;; [not necessary in cmucl 18e and 19a, but probably in 18d and earlier.  --
;; rgr, 26-Nov-03.]
#+(and cmu (not cmu18e) (not cmu19) (not cmu20))
(defmethod class-name ((class structure-class))
  (slot-value class 'pcl::name))

;;; Definition specifications.

#+allegro
(defun canonicalize-function-spec-and-type (function-spec type)
  ;; Given a Lisp-specific function spec and type, convert them into something
  ;; the emacs code is likely to be able to understand and find.  This is
  ;; currently only necessary for Allegro, which has its own notion of type
  ;; names.  (According to
  ;; file:/usr/local/acl61/doc/pages/operators/excl/record-source-file.htm, ACL
  ;; also has a :special-declaration type, but I haven't observed this in
  ;; practice.  The :variable type is handled compatibly, and the others
  ;; (:operator and :setf-method) are dealt with at a higher level.  -- rgr,
  ;; 16-Sep-02.)
  (case type
    ;; Try to refine the definition type.
    (:type (cond ((or (not (symbolp function-spec))
		      (null function-spec)))
		 ((subtypep function-spec 'condition)
		   (setq type 'define-condition))
		 ((get function-spec 'excl::%structure-definition)
		   (setq type :structure))
		 ((find-class function-spec nil)
		   (setq type :class))))
    (:setf-method
      ;; canonicalize the name/type for this.
      (setq type :function)
      (setq function-spec (list 'setf function-spec)))
    (:compiler-macro (setq type 'define-compiler-macro)))
  (values function-spec type))

(defun make-definition-specification (function-spec type sources)
  ;; Central definition-spec maker.  Should also do type canonicalization here.
  ;; Note that we never fail to report source files just because we can't find
  ;; them; emacs may have a better time of it.
  (let ((result (list :definition)))
    ;; name/type canonicalization.
    #+allegro
    (multiple-value-setq (function-spec type)
      (canonicalize-function-spec-and-type function-spec type))
    ;; source file name canonicalization.
    (when sources
      (unless (listp sources)
	(setq sources (list sources)))
      (when (member :top-level sources)
	;; acl tells us this, but other lisps might usefully return this, too.
	(setq sources (delete :top-level sources))
	(push (format nil "~S is ~A via the Lisp top-level."
		      function-spec
		      (if sources "also defined" "defined only"))
	      (getf (cdr result) :comment)))
      (when sources
	(setf (getf (cdr result) :files)
	      (mapcar #'(lambda (source-file)
			  (handler-case
			      (namestring (truename source-file))
			    (file-error ()
			      (if (stringp source-file)
				  source-file
				  (namestring source-file)))))
		      sources))))
    ;; stuff the results.  (waiting until now puts :name & :type before :files.)
    (when type
      (setf (getf (cdr result) :type) type))
    (when function-spec
      (setf (getf (cdr result) :name) function-spec))
    result))

(defun definition-spec-name (spec) (getf (cdr spec) :name))
(defun definition-spec-type (spec) (getf (cdr spec) :type))

(defun maybe-add-definition-spec (spec)
  (when spec
    (push spec *function-spec-result*)
    spec))

(defun add-definition-source-files (function-spec type sources)
  ;; note that we always create a definition spec to indicate that the
  ;; definition was found, even if there are no sources.
  (maybe-add-definition-spec
    (make-definition-specification function-spec type sources)))

(defun push-format-comment (format-string &rest format-args)
  (push (list :comment
	      (apply #'format nil format-string format-args))
	*function-spec-result*)
  nil)

(defun ilisp-find-function-spec (string package-name)
  ;; function specs are normally symbols, but also include method specs and setf
  ;; functions.
  (let ((package (ilisp-find-package package-name :error-p nil)))
    (cond ((null package)
	    (push-format-comment "Can't find package ~S." package-name)
	    nil)
	  ((zerop (length string))
	    (push-format-comment "Oops; zero-length function name ~S." string)
	    nil)
	  ((some #'(lambda (funky-char) (find funky-char string))
		 '(#\( #\|))
	    ;; nontrivial syntax, e.g. "(method foo (bar))" or "|funky case|".
	    ;; this might generate a read error, though.
	    (let ((*package* package))
	      (read-from-string string)))
	  ((find-symbol (ilisp-symbol-name string) package))
	  (t
	    (push-format-comment "No symbol ~S available in package ~S."
				 string (package-name package))
	    nil))))

;;; source-file

;; Based on the "new version" by Richard Harris  with
;; suggestions by Larry Hunter , circa 21 Nov 1994.

#+(or pcl sbcl)
(defmethod object-source-file ((object definition-source-mixin))
  ;; returns the source file (if any) associated with the metaobject.  (the
  ;; assertion is because i don't understand the general format of this well
  ;; enough.)
  (let ((source (definition-source object)))
    (when source
      (when (consp source)
	(assert (= (length source) 2)))
      (multiple-value-bind (file definition-name)
	  (if (consp source)
	      (values (second source) (first source))
	      ;; [sbcl seems to have simplified this, at least for
	      ;; structure-class objects.  -- rgr, 25-Aug-02.]
	      (values source nil))
	(assert (pathnamep file))
	(when (eq (car definition-name) 'defmethod)
	  (setq definition-name (cons 'method (cdr definition-name))))
	(when (or #-sbcl (member (pathname-type file :case :common)
				 lisp::*load-lp-object-types*
				 :test #'string=)
		  #+sbcl (string= (pathname-type file)
				  sb-fasl:*fasl-file-type*))
	  ;; oops; this is actually the pathname of the binary; try to find a
	  ;; suitable lisp source file, but don't fail if we can't.
	  (dolist (type '("LISP" "CL" "LSP" "L"))
	    (let ((source (probe-file
			    (make-pathname :type type
					   :defaults file :case :common))))
	      (when source
		(setq file source)
		(return t)))))
	(values file definition-name)))))

#+(or pcl sbcl)
(defmethod object-source-file :around ((object standard-accessor-method))
  (with-slots (lambda-list generic-function) object
    (values (call-next-method)
	    ;; return a "normal" method name.
	    (list 'method
		  (generic-function-name generic-function)
		  lambda-list))))

#+(or pcl sbcl)
(defmethod object-source-file :around ((object standard-generic-function))
  ;; [PCL doesn't tell us directly whether an explicit defgeneric form exists
  ;; (there always seems to be a source file defined), but I'm not sure if the
  ;; hack below is right.  -- rgr, 5-Sep-02.]
  (unless (eq (arg-info-lambda-list (slot-value object 'arg-info))
	      :no-lambda-list)
    (call-next-method)))

#+allegro
(defmethod specializer-arg-spec ((specializer aclmop:eql-specializer))
  (list 'eql (mop:eql-specializer-object specializer)))

#+allegro
(defmethod specializer-arg-spec ((specializer class))
  (class-name specializer))

#+allegro
(defmethod function-spec ((method standard-method))
  (append (list 'method
		(generic-function-name (method-generic-function method)))
	  (method-qualifiers method)
	  (list (mapcar #'specializer-arg-spec (method-specializers method)))))

#+allegro
(defmethod function-spec ((gf standard-generic-function))
  (generic-function-name gf))

#+allegro
(defmethod object-source-file ((object metaobject))
  ;; returns the source file (if any) associated with the metaobject.
  (let ((definition-name (function-spec object)) (pathname nil))
    (handler-case
	(progn
	  (setq pathname (excl:source-file definition-name :function))
	  (values (and pathname
		       (truename pathname))
		  definition-name))
      (error ()
	(values pathname definition-name)))))

#+allegro
(defmethod object-source-file ((object class))
  ;; returns the source file (if any) associated with the generic function.
  (let ((definition-name (slot-value object 'excl::name)) (pathname nil))
    (handler-case
	(progn
	  (setq pathname (excl:source-file definition-name :type))
	  (values (and pathname
		       (truename pathname))
		  definition-name))
      (error ()
	(values pathname definition-name)))))

#+allegro
(defmethod object-source-file ((object standard-generic-function))
  ;; Returns the source file (if any) associated with the metaobject.
  ;; [***kludge***: unfortunately, there is no way we can tell in ACL whether a
  ;; generic function has an explicit defgeneric form.  so, we look for
  ;; documentation; if there's documentation, there must be an explicit
  ;; defgeneric.  (we have to examine the excl::plist slot directly, as the
  ;; documentation function can't handle (setf foo) GFs, and sometimes fails
  ;; even on GFs with ordinary symbolic names.)  of course, this fails for
  ;; defgeneric forms that have no documentation.  -- rgr, 9-Sep-02.]
  (with-slots (excl::plist) object
    (when (getf excl::plist 'documentation)
      (call-next-method))))

(defmethod add-method-pathnames ((method standard-method))
  (multiple-value-bind (source method-spec) (object-source-file method)
    (add-definition-source-files method-spec :function source)))

(defmethod add-method-pathnames :around ((method standard-accessor-method))
  ;; these are always defined within the parent defclass form, so we want to
  ;; record that fact.
  (let ((result (call-next-method)))
    (when result
      ;; ["(car (last (method-specializers method)))" is something of a hack,
      ;; but it works for writers as well as readers.  -- rgr, 18-Sep-02.]
      (let ((class (car (last (method-specializers method)))))
	(setf (getf (cdr result) :parent)
	      (make-definition-specification (class-name class) :class
					     (object-source-file class)))))
    result))

(defun find-method-from-spec (method-spec)
  (let ((gf-name (second method-spec)))
    (when (fboundp gf-name)
      (let ((rev-tail (reverse (cddr method-spec))))
	(assert (and (consp rev-tail)
		     (listp (car rev-tail))
		     (every #'keywordp (cdr rev-tail))))
	(find-method (fdefinition gf-name)
		     (nreverse (cdr rev-tail))
		     (mapcar #'ilisp-find-class (car rev-tail))
		     nil)))))

(defmethod add-method-pathnames ((method-spec list))
  ;; given a method spec, e.g. (method foo :after (bar t)), add its source
  ;; files.
  (let ((method (find-method-from-spec method-spec)))
    (when method
      (add-method-pathnames method))))

#+allegro
(defun maybe-annotate-with-structure-parent (definition-spec)
  (let* ((name (definition-spec-name definition-spec))
	 (setf-inverse (cond ((symbolp name)
			       (get name 'excl::setf-inverse))
			     ((eq (first name) 'setf)
			       (get (second name) 'excl::setf-inverse)))))
    (when (and (consp setf-inverse)
	       (eq (car setf-inverse) 'excl::defstruct-slot-defsetf-handler))
      ;; it is also true that (equal (arglist function) '(excl::struct)), but
      ;; unfortunately, i can't figure out how to get the structure name -- or
      ;; any other useful information, for that matter.  so we can't do any
      ;; better than getting the :operator source file name.
      (setf (getf (cdr definition-spec) :parent)
	    (make-definition-specification nil :structure nil)))
    definition-spec))

#+cmu
(defun defstruct-slot-accessor-info (fun)
  ;; [based on the lisp::encapsulation-info fn.  -- rgr, 11-Sep-02.]  [however,
  ;; note that (ext:info function lisp::accessor-for fn-name) also returns the
  ;; structure class in CMUCL.  -- rgr, 15-Sep-02.]
  (if (and (functionp fun)
	   (= (lisp::get-type fun) vm:closure-header-type))
      (values (system:find-if-in-closure
	        #'(lambda (x) (typep x 'structure-class))
		fun)
	      (system:find-if-in-closure
	        #'(lambda (x) (typep x 'kernel:defstruct-slot-description))
		fun))))

#+sbcl
(defun defstruct-slot-accessor-info (fun)
  ;; [based on the lisp::encapsulation-info fn.  -- rgr, 11-Sep-02.]  [however,
  ;; note that (ext:info function lisp::accessor-for fn-name) also returns the
  ;; structure class in CMUCL.  -- rgr, 15-Sep-02.]
  (when (and (functionp fun)
	     (= (the-function-if-defined ((#:widetag-of :sb-impl)
					  (#:get-type :sb-impl)) fun)
		;; <3>
		#.(the-symbol-if-defined
		   ((#:closure-header-widetag :sb-vm)
		    (#:closure-header-type :sb-vm) :eval-p t)))
	     (not (the-function-if-defined
		   ((#:interpreted-function-p :sb-eval) ()) fun)))
    (let ((layout (sb-impl::find-if-in-closure #'sb-kernel::layout-p fun)))
      (when layout
	(let ((info (sb-kernel::layout-info layout))
	      (class #+ignore (slot-value layout 'class)
		     (slot-value (slot-value layout 'class)
				 'sb-kernel::pcl-class)))
	  (values class nil info))))))

;; add-defined-functions takes a symbol or function object.  it
;; returns a pathname for the file the function was defined in.  if it was
;; not defined in some file, then nil is returned.
;;
;; add-defined-functions is from hemlock/rompsite.lisp (cmucl17f), 
;; with added read-time conditionalization to work in older versions
;; of cmucl.  it may need a little bit more conditionalization for
;; some older versions of cmucl.
;;
;; [this was originally the fun-defined-from-pathname fn.  -- rgr, 31-jul-02.]

(defun add-defined-functions (function &optional name)
  "returns the file where function is defined in (if the file can be found).
takes a symbol or function and returns the pathname for the file the
function was defined in.  if it was not defined in some file, nil is
returned."
  (labels (#+(or cmu sbcl)
	   (extract-code (function)
	     ;; given a function, return the code object.  [i barely know what
	     ;; all this means.  -- rgr, 11-Sep-02.]
	     (the-function-if-defined
	         ((#:fun-code-header #+sbcl :sb-kernel #-sbcl :kernel)
		  (#:function-code-header #+sbcl :sb-kernel #-sbcl :kernel))
	       (the-function-if-defined
		   ((#:%simple-fun-self #+sbcl :sb-kernel #-sbcl :kernel)
		    (#:%function-self #+sbcl :sb-kernel #-sbcl :kernel))
		 function)))
	   #+(or cmu sbcl)
	   (extract-sources (code)
	     (let* ((info #+sbcl (sb-kernel:%code-debug-info code)
			  #+cmu
			  (the-function-if-defined ((#:%code-debug-info
						     :kernel)
						    (#:code-debug-info
						     :kernel))
						   code))
		    (sources (and info
				  #+cmu (c::debug-info-source info)
				  #+sbcl (sb-c::debug-info-source info)))
		    (source-names nil))
	       (dolist (source sources)
		 (let ((name #+cmu (c::debug-source-name source)
			     #+sbcl (sb-c::debug-source-name source)))
		   (case #+cmu (c::debug-source-from source)
			 #+sbcl (sb-c::debug-source-from source)
		     (:file
		       (push name source-names))
		     ;; this accesses the c::source-info data installed by the
		     ;; ilisp-compile fn.
		     #-sbcl
		     (:stream
		       (when #+cmu (c::debug-source-info source)
			     #+sbcl (sb-c::debug-source-info source)
			 (let ((file-info
				 (first #+sbcl
					(sb-c::source-info-files
					  (sb-c::debug-source-info source))
					#+cmu
					(c::source-info-files
					  (c::debug-source-info source)))))
			   (when file-info
			     (push #+cmu (c::file-info-name file-info)
				   #+sbcl (sb-c::file-info-name file-info)
				   source-names))))))))
	       (values source-names sources)))
	   #+(or cmu sbcl)
	   (frob (code)
	     (multiple-value-bind (source-names sources)
		 (extract-sources code)
	       (let* ((name (cond (name)
				  ((or (symbolp function) (listp function))
				    function)))
		      (type (if (and (symbolp name)
				     (macro-function name))
				:macro
				:function))
		      (defn (make-definition-specification name type
							   source-names)))
		 (when (and sources (null source-names))
		   (push (format nil "~S was defined via the top level." name)
			 (getf (cdr defn) :comment)))
		 (maybe-add-definition-spec defn)))))
    (typecase function
      ((or symbol cons)
        (let ((fn (extract-function-info-from-name function)))
	  (when fn
	    (add-defined-functions fn function))))
      ;; normal function object types.
      #+cmu	;; [sbcl doesn't have byte functions.  -- rgr, 25-Aug-02.]
      (#.(the-symbol-if-defined ((#:byte-closure #+sbcl :sb-kernel
						 #-sbcl :kernel) ()))
	 (let ((fn (the-function-if-defined
		    ((#:byte-closure-function #+sbcl :sb-kernel
					      #-sbcl :kernel) ()
		     :function-binding-p t)
		    (funcall the-function function))))
	   (add-defined-functions fn name)))
      #+cmu	;; [sbcl doesn't have byte functions.  -- rgr, 25-Aug-02.]
      (#.(the-symbol-if-defined ((#:byte-function :kernel) ()))
	 (frob (c::byte-function-component function)))
      #+cmu	;; [sbcl doesn't have interpreted fns.  -- rgr, 25-Aug-02.]
      (eval:interpreted-function
	;; This hack is necessary because CMUCL does not
	;; correctly record source file information when 'loading'
	;; a non compiled file.
	;; In this case we fall back on the TAGS machinery.
	;; (At least as I understand the code).
	;; Marco Antoniotti 11/22/94.
	(push-format-comment "~S is an interpreted function, ~
			      for which source information is not kept."
			     name))
      (generic-function
        ;; When we find a generic function, we include the defgeneric itself (if
        ;; it exists), followed by all methods.  Often, there is no defgeneric
        ;; and only one method, in which case this allows M-. to work for the
        ;; single defmethod form as if it were a defun.
        (let ((methods (generic-function-methods function)))
	  (push-format-comment "~S is a generic function with ~D method~:P."
			       name (length methods))
	  (let ((source (object-source-file function)))
	    ;; We don't want to include a definition spec for the GF unless the
	    ;; source has an explicit defgeneric form.
	    (when source
	      ;; strictly, the generic function is still a function, but we get
	      ;; a better regular expression if we tell emacs that it is a
	      ;; :generic-function instead.
	      (add-definition-source-files name :generic-function source))
	    (dolist (method methods)
	      (add-method-pathnames method)))))
      #+allegro
      (excl::closure
        (maybe-annotate-with-structure-parent
	  (add-definition-source-files name :function
				       (excl:source-file name :operator))))
      (function
        #+(or cmu sbcl)
	(let ((defn (frob (extract-code function))))
	  (multiple-value-bind (structure-class #-sbcl slot)
	      (defstruct-slot-accessor-info function)
	    (when structure-class
	      ;; defstruct slot accessor function.  [for sbcl, this means that
	      ;; the :files we computed above are bogus.  -- rgr, 20-Sep-02.]
	      (let* ((class-name (class-name structure-class))
		     #-sbcl
		     (constructor
		       (kernel::structure-class-constructor structure-class))
		     (sources
		       ;; [now, why don't we want to do this for CMUCL as well?
		       ;; -- rgr, 30-Mar-03.]
		       #+sbcl (object-source-file structure-class)
		       #-sbcl
		       (and constructor
			    (extract-sources (extract-code constructor)))))
		#-sbcl (push (format nil "~S accesses the ~S slot ~
					 (number ~D) of ~S."
				     name
				     (kernel::dsd-%name slot)
				     (kernel::dsd-index slot)
				     class-name)
			     (getf (cdr defn) :comment))
		#+sbcl (push (format nil "~S accesses a slot of ~S."
				     name class-name)
			     (getf (cdr defn) :comment))
		;; the child's file will be src/code/target-defstruct.lisp,
		;; since it just finds the underlying accessor creator.
		#+sbcl (remf (cdr defn) :files)
		(setf (getf (cdr defn) :parent)
		      (make-definition-specification class-name :structure
						     sources)))))
	  defn)
	#+allegro
	(add-definition-source-files name :function
				     (handler-case
					 (excl:source-file function :operator)
				       (error ()
					 nil))))
      (t
        ;; this should make it obvious we missed something.
        (push-format-comment "Don't know how to find ~
				the source file of ~S as a function."
			     name)))))

(defun make-structure-or-class-definition-spec (class-name type)
  ;; [lumping classes and structures together makes this depend too heavily on
  ;; CLOS.  -- rgr, 2-Sep-02.]
  (let ((class (ilisp-find-class class-name nil)))
    (when (and class
	       ;; the alternatives would be structure-class and :structure.
	       (eq (typep class 'standard-class)
		   (eq type :class)))
      (make-definition-specification class-name type
				     (object-source-file class)))))

(defun find-available-source-info (function-spec definition-type)
  ;; function-spec will be a symbol or list, definition-type a keyword symbol.
  (labels (#+allegro
	   (try-excl-source-file (function-spec type)
	     (assert (not (eq definition-type :any)))
	     (let* ((acl-type
		      ;; functions and macros are handled at a higher level.
		      ;; [kludge: this could be generalized better.  -- rgr,
		      ;; 15-Sep-02.]
		      (case type
			((:class :structure define-condition) :type)
			(define-compiler-macro :compiler-macro)
			(t type)))
		    (source
		      (handler-case
			  (excl:source-file function-spec acl-type)
			(error ()
			  nil)))
		    (defn (make-definition-specification function-spec acl-type
							 source)))
	       ;; Don't confuse classes and structures.
	       (when (or (eq (definition-spec-type defn) type)
			 (not (member definition-type '(:structure :class))))
		 (maybe-annotate-with-structure-parent defn)
		 (maybe-add-definition-spec defn))))
	   (one-type (function-spec type)
	     ;; this returns a definition descriptor if found, else nil.
	     (case type
	       (:function
		 (typecase function-spec
		   (cons
		     (case (car function-spec)
		       (method
			 (add-method-pathnames function-spec))
		       (t
			 (if (string= (car function-spec) :fast-method)
			     ;; [assume this is pcl::fast-method or
			     ;; sb-pcl::fast-method.  -- rgr, 25-Aug-02.]
			     ;; [still don't import those symbols so that they
			     ;; continue to print with package prefixes.  --
			     ;; rgr, 12-Sep-02.]
			     (add-method-pathnames function-spec)
			     ;; otherwise, see if fdefinition can figure it out.
			     (add-defined-functions function-spec)))))
		   (symbol
		     (add-defined-functions function-spec))
		   (t
		     (push-format-comment "Unknown function spec ~S."
					  function-spec))))
	       #+(or pcl sbcl)
	       ((:class :structure)
		 (when (symbolp function-spec)
		   (let ((spec (make-structure-or-class-definition-spec
				 function-spec type)))
		     (when spec
		       ;; if function-spec name a structure, it will also have
		       ;; an associated structure-class, and we'll get two
		       ;; :structure entries if we don't check for duplicates.
		       (unless (find (definition-spec-type spec)
				     *function-spec-result*
				     :key #'(lambda (spec)
					      (and (eq (car spec) :definition)
						   (definition-spec-type
						      spec))))
			 (maybe-add-definition-spec spec))))))
	       #-allegro
	       (:setf
		 (when (symbolp function-spec)
		   (one-type (list 'setf function-spec) :function)))
	       (t
		 ;; [this results in divergent behavior for ACL, but that's only
		 ;; because ACL allows application programmers to extend the set
		 ;; of definition types.  -- rgr, 4-Sep-02.]
		 #+allegro (try-excl-source-file function-spec type)))))
    (case definition-type
      (:any
	#-allegro
	(dolist (known-type *known-definition-types*)
	  (one-type function-spec known-type))
	#+allegro
	(let ((type-alist nil) (need-operator? nil)
	      (known-sources (excl:source-file function-spec t)))
	  (when (and (null (cdr known-sources))
		     (eq (caar known-sources) :type)
		     (fboundp function-spec))
	    ;; [kludge around the fact that acl misrecords slot accessors as
	    ;; :type's when you ask for (excl:source-file function-spec t).  the
	    ;; :operator is actually what's defined; you get an error if you ask
	    ;; for a :type definition.  need to open the bandwidth more so we
	    ;; can use this as a function-parent hint in the search phase.  --
	    ;; rgr, 2-Sep-02.]  [bug: this hack doesn't find the accessor when
	    ;; function-spec is also defined as something else.  it's also
	    ;; hopeless when function-spec is also defined as a class in a
	    ;; different while.  -- rgr, 16-Sep-02.]
	    (setq known-sources nil)
	    (setq need-operator? t))
	  ;; refactor the (type . pathname) returned by excl:source-file when
	  ;; given a type arg of T into (type &rest pathnames), with at most one
	  ;; entry for each type.
	  (dolist (pair known-sources)
	    (destructuring-bind (type . pathname) pair
	      (case type
		(:operator
		  (setq need-operator? t))
		(t
		  (let ((pair (assoc type type-alist)))
		    (unless pair
		      (setq pair (list type))
		      (push pair type-alist))
		    (pushnew pathname (cdr pair) :test #'equalp))))))
	  ;; now we can use the add-definition-source-files interface.  [the
	  ;; maybe-annotate-with-structure-parent call is a kludge here because
	  ;; we can't use the ordinary add-defined-functions interface with
	  ;; (setf foo) specs.  -- rgr, 4-Sep-02.]
	  (dolist (entry type-alist)
	    (destructuring-bind (type &rest pathnames) entry
	      (if (eq type :type)
		  ;; [***kludge***: in acl, reader/writer/accessor methods are
		  ;; inccorrectly recorded as :type definitions.  so if there is
		  ;; no such type we get an error; if there is, we get the wrong
		  ;; file.  -- rgr, 8-Oct-02.]
		  (handler-case
		      (maybe-annotate-with-structure-parent
		        (add-definition-source-files function-spec type
						     pathnames))
		    (error nil))
		  (maybe-annotate-with-structure-parent
		    (add-definition-source-files function-spec type
						 pathnames)))))
	  ;; functions must be handled specially, as excl:source-file will give
	  ;; us a whole pile of pathnames for GF methods, but won't tell us the
	  ;; method specs.
	  (when need-operator?
	    ;; check this first so it shows up afterwards.
	    (one-type function-spec :function)
	    ;; [strangely, (setf foo) generic functions are not handled
	    ;; consistently.  -- rgr, 15-Sep-02.]
	    (when (and (symbolp function-spec)
		       (not (assoc :setf-method type-alist)))
	      (one-type (list 'setf function-spec) :function)))))
      (t
	(one-type function-spec definition-type)))))

(defun source-file-internal (symbol package type)
  ;; this is a separate function without the error wrapper for debugging.
  (let* ((*function-spec-result* nil)
	 (function-spec (ilisp-find-function-spec symbol package))
	 (type (etypecase type
		 (symbol type)
		 (string (if (find #\: type)
			     (read-from-string type)
			     (intern (ilisp-symbol-name type) :keyword)))))
	 ;; this sometimes puts line breaks into messages if enabled.
	 #+(or ansi allegro) (*print-pretty* nil)
	 ;; make sure we get it all!
	 (*print-level* nil) (*print-length* nil)
	 ;; bind *package* so that all symbols are printed with a suitable
	 ;; prefix.  [do this *after* the ilisp-find-function-spec call and the
	 ;; type read-from-string call so that it inherits the real current
	 ;; package.  -- rgr, 15-Sep-02.]
	 (*package* (find-package :ilisp)))
    (when function-spec
      (find-available-source-info function-spec type))
    (when (null *function-spec-result*)
      (push-format-comment "No~@[ ~A~] definitions of ~A."
			   (and (not (eq type :any))
				(string-downcase type))
			   function-spec))
    (print (nreverse *function-spec-result*))
    ;; indicate success.
    t))

(defun source-file (symbol package type)
  "Public interface for finding definition source file information."
  (ilisp-errors
    (source-file-internal symbol package type)))

;;; end of file -- find-src.lisp --
ilisp-5.12.0+cvs.2004.12.26/guile-ilisp.scm0000600000175000001440000004203210140476614016507 0ustar  mvelausers;;;; guile-ilisp.scm --- ILISP support functions for GUILE
;;;; Matthias Koeppe  
;;;
;;; Copyright (C) 2000, 2001, 2002, 2003, 2004 Matthias Koeppe
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: guile-ilisp.scm,v 1.25 2004/08/02 10:14:54 kevinrosenberg Exp $


(define-module (guile-ilisp)
  :use-module (ice-9 debug)
  :use-module (ice-9 session)
  :use-module (ice-9 documentation)
  :use-module (ice-9 regex)
  :use-module (oop goops))

;; This file tries hard to be compatible with Guile versions
;; 1.3.4 through 1.8.x

(define eval-in-package
  ;; A two-argument version of `eval'
  (if (= (car (procedure-property eval 'arity)) 2)
      (lambda (expression environment)	; we have a R5RS eval
	(save-module-excursion
	 (lambda ()
	   (eval expression environment))))
      (lambda (expression environment)	; we have a one-arg eval (Guile <= 1.4)
	(save-module-excursion
	 (lambda ()
	   (set-current-module environment)
	   (eval expression))))))  

(define is-a-generic?
  (if (false-if-exception (eval-in-package '(use-modules (oop goops))
					   (current-module)))
      (lambda (object)
	(is-a? object ))
      (lambda (object)
	#f)))

(define (read-from-string str)
  (call-with-input-string str read))

(define (read-from-string/source str filename line column)
  "Read from string STR, pretending the source is the given FILENAME, LINE, COLUMN."
  (call-with-input-string
   str
   (lambda (port)
     (set-port-filename! port filename)
     (set-port-line! port (- line 1))
     (set-port-column! port (- column 1))
     (read port))))

(define (string->module str)
  (let ((v (call-with-input-string str read)))
    (cond
     ((eq? 'nil v) (current-module))
     ((pair? v) (resolve-module v))
     (else (resolve-module (list v))))))

(define (first-line s)
  (let ((i (string-index s #\newline)))
    (if i
	(substring s 0 i)
	s)))

(define (doc->arglist doc with-procedure?)
  "Parse DOC to find the arglist and return it as a string.  If
WITH-PROCEDURE?, include the procedure symbol."
  (letrec ((texinfo-doc->arglist
	    ;; Guile >= 1.4.1 primitive procedure documentation, passed through
	    ;; TeXinfo:
	    ;;
	    ;;  - primitive: assoc key alist
	    ;;     Behaves like `assq' but uses `equal?' for key comparison.
	    ;;
	    ;; Newer versions of Guile (or is it TeXinfo?) use "Scheme
	    ;; Procedure" rather than "primitive".
	    ;;
	    ;; Continuation lines of arglists have an indentation of
	    ;; 10 chars.
	    (lambda (pattern)
	      (and (>= (string-length doc)
		       (string-length pattern))
		   (string=? (substring doc 0 (string-length pattern))
			     pattern)
		   (let ((start-index
			  (if with-procedure?
			      (string-length pattern)
			      (min (1+ (or (string-index doc #\space
							 (string-length pattern))
					   (string-length pattern)))
				   (or (string-index doc #\newline
						     (string-length pattern))
				       (string-length pattern))))))
		     (let ((eol-index (or (string-index doc #\newline start-index)
					  (string-length doc))))
		       (string-append 
			"("
			(let loop ((bol-index (+ 1 eol-index))
				   (arglist (substring doc start-index eol-index)))
			  (cond 
			   ((and bol-index (>= bol-index (string-length doc)))
			    arglist)
			   ((and (>= (string-length doc) (+ bol-index 10))
				 (string=? (substring doc bol-index (+ bol-index 10))
					   "          "))
			    (let ((eol-index (string-index doc #\newline bol-index)))
			      (loop (and eol-index (+ 1 eol-index))
				    (string-append arglist " " 
						   (substring doc (+ bol-index 10)
							      eol-index)))))
			   (else
			    arglist)))
			")")))))))
    (cond
     ((texinfo-doc->arglist " - primitive: "))
     ((texinfo-doc->arglist " - Scheme Procedure: "))
     ((string=? (substring doc 0 1) "(")
      ;; Guile <= 1.4 primitive procedure documentation and other
      ;; conventions:
      ;;
      ;; (help [NAME])
      ;; Prints useful information.  Try `(help)'.
      ;;
      (if with-procedure?
	  (first-line doc)
	  (let* ((f-l (first-line doc))
		 (index (string-index f-l #\space)))
	    (if index
		(string-append "("
			       (substring f-l
					  (+ index 1)))
		"()"))))     
     (else (string-append "CAN'T PARSE THIS DOCUMENTATION:\n"
			  doc)))))

(define (write-truncated obj port max-length)
  "Write OBJ on PORT, truncated to MAX-LENGTH characters.  Indicate
truncation by an ellipsis."
  (call-with-current-continuation
   (lambda (return)
     (let ((trunc-port
	    (make-soft-port
	     (vector (lambda (c)
		       (display c port)
		       (set! max-length (- max-length 1))
		       (if (not (positive? max-length))
			   (begin
			     (display "..." port)
			     (return #t))))
		     (lambda (s)
		       (cond
			((<= (string-length s) max-length)
			 (display s port)
			 (set! max-length (- max-length (string-length s))))
			(else
			 (display (substring s max-length))
			 (display "...")
			 (return #t))))
		     #f #f #f)
	     "w")))
       (write obj trunc-port)))))

(define (list-length* l)
  "Return two values: The length of the possibly improper list L,
and a boolean that indicates whether the list is proper."
  (let loop ((l l) (len 0))
    (cond
     ((null? l) (values len #t))
     ((pair? l) (loop (cdr l) (1+ len)))
     (else (values len #f)))))

(define (info-message sym obj expensive? arglist-only?)
  "Return an informational message about OBJ, which is the value of SYM.
For procedures, return procedure symbol and arglist, or
fall back to a message on the arity; if ARGLIST-ONLY?, return the
arglist only.  If EXPENSIVE?, take some more effort."
  ;; The code here is so lengthy because we want to return a
  ;; meaningful result even if we aren't allowed to read the
  ;; documentation files (EXPENSIVE? = #f).
  (cond
   ((and (procedure? obj)
	 (procedure-property obj 'arglist))
    => (lambda (arglist)
	 (let ((required-args (car arglist))
	       (optional-args (cadr arglist))
	       (keyword-args (caddr arglist))
	       (allow-other-keys? (cadddr arglist))
	       (rest-arg (car (cddddr arglist))))
	   (with-output-to-string
	     (lambda ()
	       (define (arg-only arg/default)
		 (if (pair? arg/default) (car arg/default) arg/default))
	       (if arglist-only?
		   (begin (write sym)
			  (display ": ")))
	       (write
		(append
		 (if arglist-only?
		     '()
		     (list sym))
		 required-args
		 (if (not (null? optional-args))
		     (cons #:optional (map arg-only optional-args))
		     '())
		 (if (not (null? keyword-args))
		     (cons #:key (map arg-only keyword-args))
		     '())
		 (if allow-other-keys?
		     (list #:allow-other-keys)
		     '())
		 (if rest-arg rest-arg '()))))))))
   ((and (procedure-with-setter? obj)
	 (closure? (procedure obj)))
    (let ((formals (cadr (procedure-source (procedure obj)))))
      (if arglist-only? formals (cons sym formals))))
   ((closure? obj)
    (let ((formals (cadr (procedure-source obj))))
      (if arglist-only?
	  (begin (write sym)
		 (display ": ")))
      (if arglist-only? formals (cons sym formals))))
   ((or
     (and expensive?
	  (false-if-exception
	   ;; object-documentation was introduced in Guile 1.4,
	   ;; There is no documentation for primitives in earlier
	   ;; versions.
	   (object-documentation obj)))
     (and (procedure? obj)
	  (procedure-property obj 'documentation)
	  ;; The documentation property is attached to a primitive
	  ;; procedure when it was read from the documentation file
	  ;; before.
	  ))
    => (lambda (doc)
	 (if arglist-only?
	     (begin (write sym)
		    (display ": ")))
	 (doc->arglist doc (not arglist-only?))))
   ((and (macro? obj)
	 (macro-transformer obj)
	 (closure? (macro-transformer obj))
	 (procedure-documentation (macro-transformer obj)))
    ;; Documentation may be in the doc string of the transformer, as
    ;; is in session.scm (help).
    => (lambda (doc)
	 (doc->arglist doc (not arglist-only?))))
   ((is-a-generic? obj)
    (let ((methods (generic-function-methods obj)))
      (cond
       ((null? methods)
	(string-append "`" (symbol->string sym) "'"
		       " is a generic function with no methods."))
       ((= 1 (length methods))
	(info-message sym (method-procedure (car methods))
		      expensive? arglist-only?))
       (else
	(let loop ((methods methods)
		   (min-arity most-positive-fixnum)
		   (max-arity 0)
		   (rest-argument? #f))
	  (cond
	   ((null? methods)
	    (with-output-to-string
	      (lambda ()
		(display sym) (display ": ")
		(cond
		 (rest-argument?
		  (display min-arity)
		  (display " or more arguments"))
		 ((= min-arity max-arity)
		  (display min-arity)
		  (display " argument")
		  (if (not (= min-arity 1))
		      (display "s")))
		 (else
		  (display min-arity)
		  (display " to ")
		  (display max-arity)
		  (display " arguments")))
		(display "."))))
	   (else
	    (call-with-values
		(lambda ()
		  (list-length* (method-specializers (car methods))))
	      (lambda (len proper?)
		(loop (cdr methods)
		      (min min-arity len)
		      (max max-arity len)
		      (or rest-argument? (not proper?))))))))))))
   ((procedure? obj)
    ;; Return a message about the arity of the procedure.
    (with-output-to-string
      (lambda () (display sym) (display ": ") (arity obj))))
   (else
    (string-append "`" (symbol->string sym) "'"
		   " is bound to "
		   (with-output-to-string
		     (lambda ()
		       (write-truncated obj (current-output-port) 800)))
		   "."))))
  

(define-public (ilisp-print-info-message sym package)
  "Evaluate SYM in PACKAGE and print an informational message about
the value.  For procedures, the arglist is printed.
This procedure is invoked by the electric space key."
  (if (symbol? sym)
      (let ((obj (catch #t
			(lambda ()
			  (eval-in-package sym
					   (string->module package)))
			(lambda args #f))))
		     
	(cond
	 ((and obj
	       (info-message sym obj #f #f))
	  => (lambda (message)
	       (display message)
	       (newline)))))))

(define (if-defined symbol package
			   defined-procedure undefined-procedure)
  (let ((obj (catch #t
		    (lambda ()
		      (list (eval-in-package symbol
					     (string->module package))))
		    (lambda args #f))))
    (if obj
	(defined-procedure (car obj))
	(undefined-procedure))))

(define (strip-parens s)
  (if (and (string=? (substring s 0 1) "(")
	   (string=? (substring s (- (string-length s) 1)) ")"))
      (substring s 1 (- (string-length s) 1))
      s))      

(define (symbol-not-present symbol package)
  (display "Symbol `")
  (display symbol)
  (display "' not present in ")
  (cond
   ((string=? "nil" package)
    (display "the current module `")
    (for-each display (module-name (current-module)))
    (display "'"))
   (else
    (display "module `")
    (display (strip-parens package))
    (display "'")))
  (display ".\n"))

(define-public (ilisp-arglist symbol package)
  "Evaluate SYMBOL in PACKAGE and print the arglist if we have a
procedure. This procedure is invoked by `arglist-lisp'."
  (if-defined symbol package
	      (lambda (obj)
		(cond
		 ((info-message symbol obj #t #t)
		  => (lambda (message)
		       (display message)
		       (newline)))
		 (else
		  (display "Can't get arglist.")
		  (newline))))
	      (lambda ()
		(symbol-not-present symbol package))))

(define-public (ilisp-help symbol package)
  "Evaluate SYMBOL in PACKAGE and print help for it."
  (if-defined symbol package
	      (lambda (obj)
		(let ((doc (object-documentation obj)))
		  (if doc
		      (display doc)
		      (display "No documentation."))
		  (newline)))
	      (lambda ()
		(symbol-not-present symbol package))))

(define (word-separator? ch)
  (or (char=? ch #\-)
      (char=? ch #\:)
      (char=? ch #\_)
      (char=? ch #\/)))

(define (string-pred-rindex str pred)
  (let loop ((index (- (string-length str) 1)))
    (cond
     ((negative? index) #f)
     ((pred (string-ref str index)) index)
     (else (loop (- index 1))))))

(define (separate-fields-before-predicate pred str ret)
  (let loop ((fields '())
	     (str str))
    (cond
     ((string-pred-rindex str pred)
      => (lambda (w) (loop (cons (make-shared-substring str w) fields)
			   (make-shared-substring str 0 w))))
     (else (apply ret str fields)))))

(define (make-word-regexp str)
  (apply string-append
	 (cons "^"
	       (map (lambda (word)
		      (string-append (regexp-quote word) "[^-:/_]*"))
		    (separate-fields-before-predicate word-separator?
						      str list)))))	      

(define-public (ilisp-matching-symbols string package function? external? prefix?)
  (write (map (lambda (sym) (list (symbol->string sym)))
       (let ((regexp (if (eq? prefix? 't)
			 (string-append "^" (regexp-quote string))
			 (make-word-regexp string)))
	     (a-i apropos-internal))
	 (save-module-excursion
	  (lambda ()
	    (set-current-module (string->module package))
	    (a-i regexp))))))
  (newline))

(define (last l)
  (cond ((and (pair? l) (not (null? (cdr l))))
	 (last (cdr l)))
	(else (car l))))

(define-public (ilisp-get-package sequence-of-defines)
  "Get the last module name defined in the sequence of define-module forms."
  ;; First eval the sequence-of-defines.  This will register the
  ;; module with the Guile interpreter if it isn't there already.
  ;; Otherwise `resolve-module' will give us a bad environment later,
  ;; which just makes trouble.
  (let ((name
	 (eval-in-package 
	  (append sequence-of-defines
		  '((module-name (current-module))))
	  (string->module "(guile-user)"))))
    (cond
     ((pair? name)
      ;; This version of Guile has a module-name procedure that
      ;; returns the full module name.  Good.
      (write name))
     (else 
      ;; Now we have the name of the module -- but only the last
      ;; component.  We need to "parse" the sequence-of-defines
      ;; ourselves.
      (let ((last-form (last sequence-of-defines)))
	(cond ((and (pair? last-form)
		    (eq? (car last-form) 'define-module))
	       (write (cadr last-form)))
	      (else (write '(guile-user))))))))
  (newline))

(define-public (ilisp-in-package package)
  (set-current-module (string->module package))
  (process-use-modules '(((guile-ilisp))))
  *unspecified*)

(define-public (ilisp-eval form package filename line)
  "Evaluate FORM in PACKAGE recording FILENAME as the source file
and LINE as the source code line there."
  (eval-in-package
   (read-from-string/source form filename line 1)
   (string->module package)))

(define-public (ilisp-trace symbol package breakp)
  (trace (eval-in-package symbol (string->module package)))
  *unspecified*)

(define-public (ilisp-untrace symbol package)
  (untrace (eval-in-package symbol (string->module package)))
  *unspecified*)

(define (or-map* f list)
  "Apply f to successive elements of l until exhaustion or improper end
or while f returns #f. If returning early, return the return value of f."
  (let loop ((result #f)
	     (l list))
    (or result
	(and (pair? l)
	     (loop (f (car l)) (cdr l))))))

(define-public (ilisp-source-file symbol package)
  "Find the source file of SYMBOL's definition in PACKAGE."
  (catch #t
	 (lambda ()
	   (let ((value (eval-in-package (read-from-string symbol)
					 (string->module package))))
	     (cond
	      ((and (procedure? value)
		    (procedure-source value))
	       => (lambda (source)
		    (and=>
		     (or-map* (lambda (s)
				(false-if-exception
				 (source-property s 'filename)))
			      source)
		     (lambda (filename) (throw 'result filename))))))
	     (write 'nil)))
	 (lambda (key . args)
	   (if (eq? key 'result)
	       (begin (write (car args)) (newline) (write #t))
	       (begin (write 'nil)))))
  (newline))

(define-public (ilisp-macroexpand-1 expression package)
  (write (save-module-excursion
   (lambda ()
     (set-current-module (string->module package))
     (macroexpand-1 (read-from-string expression)))))
  (newline))

(define-public (ilisp-macroexpand expression package)
  (write (save-module-excursion
   (lambda ()
     (set-current-module (string->module package))
     (macroexpand (read-from-string expression)))))
  (newline))

(define-public (ilisp-describe symbol package)
  "Evaluate SYMBOL in PACKAGE and describe its value."
  (let* ((module (resolve-module '(oop goops describe)))
	 (describe (false-if-exception
		    (module-ref module 'describe))))
    (if describe
	(describe (eval-in-package symbol (string->module package)))
	"Need GOOPS for describe.")))

;  Init
; ======
;
; We would like to use ilisp-* functions from all modules. Since functions
; are defined withing (guile-ilisp) module, we have to:
;
;  1) explicitly :use-module (guile-ilisp) in each module in which we
;     want to use ilisp
;
;  2) cheat and put all public symbols to interface of (guile) module.
;     This makes ilisp-* function accessible to all modules without any
;     further effort.
;
; Because I am lazy programmer, I chose 2) - writing (use-modules (...))
; every time I work on some module is very boring and all public functions
; have ilisp-* prefix so name clash is very unlikely.

(module-for-each (lambda (name var)
		   (module-add! the-scm-module name var))
		 (module-public-interface (current-module)))

ilisp-5.12.0+cvs.2004.12.26/icompile.bat0000600000175000001440000000410607656737101016062 0ustar  mvelausers@echo off

rem --------------------------------------------------------------
rem Be sure to customize the following 4 variables for your system
rem --------------------------------------------------------------
set EMACSDIR=C:\bin\emacs
set ILISPDIR=c:\home\site\ilisp
set EMACS=%EMACSDIR%\bin\emacs.exe
rem On some systems, compressing all elc files into one makes ILISP load much faster (however, it makes examining ILISP
rem documentation harder). Set it to "true" if you want to compress the elc files, "false" if you don't want to.
set ALLINONE=false

cd %ILISPDIR%

%EMACS% -batch -l ilisp-mak.el

if not "%ALLINONE%" == "true" goto notall

copy /B ilisp-def.elc+ilisp-sym.elc+ilisp-inp.elc+ilisp-ind.elc+ilisp-prc.elc+ilisp-val.elc+ilisp-out.elc ilisp-all.elc
copy /B ilisp-all.elc+ilisp-mov.elc+ilisp-key.elc+ilisp-prn.elc+ilisp-low.elc+ilisp-doc.elc+ilisp-ext.elc+ilisp-mod.elc ilisp-all.elc
copy /B ilisp-all.elc+ilisp-dia.elc+ilisp-cmt.elc+ilisp-rng.elc+ilisp-hnd.elc+ilisp-utl.elc+ilisp-cmp.elc+ilisp-kil.elc ilisp-all.elc
copy /B ilisp-all.elc+ilisp-snd.elc+ilisp-xfr.elc+ilisp-hi.elc+ilisp-aut.elc+ilisp-cl.elc+ilisp-cmu.elc+ilisp-sbcl.elc ilisp-all.elc
copy /B ilisp-all.elc+ilisp-cl-easy-menu.elc+ilisp-acl.elc+ilisp-kcl.elc+ilisp-luc.elc+ilisp-sch.elc+ilisp-hlw.elc ilisp-all.elc
copy /B ilisp-all.elc+ilisp-xls.elc+ilisp-chs.elc+ilisp-openmcl.elc ilisp-all.elc
copy /B ilisp-all.elc+ilisp-ccl.elc ilisp-all.elc

del ilisp-def.elc ilisp-sym.elc ilisp-inp.elc ilisp-ind.elc ilisp-prc.elc ilisp-val.elc ilisp-out.elc ilisp-mov.elc 
del ilisp-key.elc ilisp-prn.elc ilisp-low.elc ilisp-doc.elc ilisp-ext.elc ilisp-mod.elc ilisp-dia.elc ilisp-cmt.elc 
del ilisp-rng.elc ilisp-hnd.elc ilisp-utl.elc ilisp-cmp.elc ilisp-kil.elc ilisp-snd.elc ilisp-xfr.elc ilisp-hi.elc 
del ilisp-aut.elc ilisp-cl.elc ilisp-cmu.elc ilisp-sbcl.elc ilisp-cl-easy-menu.elc ilisp-acl.elc ilisp-kcl.elc 
del ilisp-luc.elc ilisp-sch.elc ilisp-hlw.elc ilisp-xls.elc ilisp-chs.elc ilisp-openmcl.elc ilisp-ccl.elc

:notall
cd docs
%EMACS% -batch -q -no-site-file ilisp.texi -l texinfmt -f texinfo-format-buffer -f save-buffer
cd .. 
ilisp-5.12.0+cvs.2004.12.26/ilcompat.el0000600000175000001440000000560407556232575015733 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilcompat.el --
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilcompat.el,v 1.5 2002/10/25 12:13:49 kevinrosenberg Exp $

(require 'cl)

;;; Global definitions/declarations

(defconst +ilisp-emacs-version-id+
  (cond ((string-match "XEmacs" emacs-version)
	 'xemacs)
	((string-match "Lucid" emacs-version)
	 (if (string-match "^19.[0-7][^0-9]" emacs-version)
	     'lucid-19
	   'lucid-19-new))
	((string-match "^19" emacs-version)
	 'fsf-19)
	((string-match "^20" emacs-version)
	 'fsf-20)
	((string-match "^21" emacs-version)
	 'fsf-21)
	(t 'fsf-18))
  "The major version of (X)Emacs ILISP is running in.
Declared as '(member fsf-19 fsf-19 fsf-20 fsf-21 lucid-19 lucid-19-new xemacs).
Set in ilcompat.el.")


(defconst +ilisp-emacs-minor-version-number+
  (cond ((eq +ilisp-emacs-version-id+ 'fsf-18) 59)
	((or  (eq +ilisp-emacs-version-id+ 'lucid-19)
	      (eq +ilisp-emacs-version-id+ 'lucid-19-new)
	      )
	 12)			      ; Does emacs-minor-version work?
	((eq +ilisp-emacs-version-id+ 'xemacs) 14)
	(t emacs-minor-version))
  "The minor version of (X)Emacs ILISP is running in.
Set in ilcompat.el.")


;;; Load Emacs version specific compatibility modules

(cond ((or (eq +ilisp-emacs-version-id+ 'lucid-19)
	   (eq +ilisp-emacs-version-id+ 'lucid-19-new))
       (load "illuc19"))
      ((eq +ilisp-emacs-version-id+ 'xemacs) (load "ilxemacs"))
      ((eq +ilisp-emacs-version-id+ 'fsf-18) (load "ilfsf18"))
      ((eq +ilisp-emacs-version-id+ 'fsf-19) (load "ilfsf19"))
      ((eq +ilisp-emacs-version-id+ 'fsf-20) (load "ilfsf20"))
      ((eq +ilisp-emacs-version-id+ 'fsf-21) (load "ilfsf21"))
      )


;;; Misc. bug work-arounds and compatibility bindings

(unless (eval-when-compile (ignore-errors (last '(a . b))))
  ;; From Emacs 19.34's cl.el.
  (defun last (x &optional n)
    "Returns the last link in the list LIST.
With optional argument N, returns Nth-to-last link (default 1)."
    (if n
        (let ((m 0) (p x))
          (while (consp p) (incf m) (pop p))
          (if (<= n 0) p
            (if (< n m) (nthcdr (- m n) x) x)))
      (while (consp (cdr x)) (pop x))
      x)))


(cond ((fboundp 'buffer-substring-no-properties)
       ;; nothing to do (emacs 19-21, xemacs 21)
       )
      ((fboundp 'set-text-properties)
       ;; I believe this is xemacs 20 and before
       (defun buffer-substring-no-properties (start end)
	 (let ((string (buffer-substring start end)))
	   (set-text-properties 0 (length string) nil string)
	   string)))
      (t
       ;; hope that buffer-substring works okay on this platform ;-)
       (defun buffer-substring-no-properties (start end)
	 (buffer-substring start end))))
      
  
;;; Epilogue

(provide 'ilcompat)

;;; end of file -- compat.el --
ilisp-5.12.0+cvs.2004.12.26/ild.el0000600000175000001440000001570407662715264014674 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ILD: A common Common Lisp debugger user interface for ILisp.
;;;   ---Jeffrey Mark Siskind

;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ild.el,v 1.7 2003/05/21 15:12:08 bill_clementson Exp $

;;; Keystroke c-u? What it does
;;; ---------------------------------------------------------
;;; m-a            Abort
;;; m-c            Continue
;;; c-m-n     *    Next stack frame
;;; c-m-p     *    Previous stack frame
;;; c-c <          Top stack frame
;;; c-c >          Bottom stack frame
;;; m-b            Backtrace
;;; c-m-d          Display all locals
;;; c-m-l     *    Display particular local
;;; c-c r          Return
;;; c-m-r          Retry
;;; c-x t          Trap on exit
;;; c-c L          Select Lisp interaction buffer
;;; c-z c-s        Sets compiler options for maximally debuggablity
;;; c-z c-f        Sets compiler options for fastest but least debuggable code

;;; Dependencies
;;; We really just need ILISP Key management.
;;; 19990615 Marco Antoniotti

;;; (require 'ilisp)
(require 'ilisp-key)

(deflocal ild-abort-string nil)
(deflocal ild-continue-string nil)
(deflocal ild-step-string nil)
(deflocal ild-step-string-arg nil)
(deflocal ild-next-string nil)
(deflocal ild-next-string-arg nil)
(deflocal ild-previous-string nil)
(deflocal ild-previous-string-arg nil)
(deflocal ild-top-string nil)
(deflocal ild-bottom-string nil)
(deflocal ild-backtrace-string nil)
(deflocal ild-locals-string nil)
(deflocal ild-local-string-arg nil)
(deflocal ild-return-string nil)
(deflocal ild-retry-string nil)
(deflocal ild-trap-on-exit-string nil)

(defun ild-debugger-command (string)
 (process-send-string (get-buffer-process (current-buffer))
		      (format "%s\n" string)))

(defun ild-prompt ()
 (save-excursion
  (beginning-of-line)
  (comint-skip-prompt)
  (eobp)))

(defun ild-abort ()
 (interactive)
 (if ild-abort-string
     (ild-debugger-command ild-abort-string)
     (beep)))

(defun ild-continue (&optional arg)
 (interactive "P")
 (if (ild-prompt)
     (if ild-continue-string
	 (ild-debugger-command ild-continue-string)
	 (beep))
     (if arg (capitalize-word arg) (capitalize-word 1))))

(defun ild-step (&optional arg)
 (interactive "P")
 (if arg
     (if ild-step-string-arg
	 (ild-debugger-command (format ild-step-string-arg arg))
	 (beep))
     (if ild-step-string
	 (ild-debugger-command ild-step-string)
	 (beep))))

(defun ild-next (&optional arg)
 (interactive "P")
 (if arg
     (if ild-next-string-arg
	 (ild-debugger-command (format ild-next-string-arg arg))
	 (beep))
     (if ild-next-string
	 (ild-debugger-command ild-next-string)
	 (beep))))

(defun ild-previous (&optional arg)
 (interactive "P")
 (if arg
     (if ild-previous-string-arg
	 (ild-debugger-command (format ild-previous-string-arg arg))
	 (beep))
     (if ild-previous-string
	 (ild-debugger-command ild-previous-string)
	 (beep))))

(defun ild-top (&optional arg)
 (interactive "P")
 (if ild-top-string
     (ild-debugger-command ild-top-string)
     (beep)))

(defun ild-bottom (&optional arg)
 (interactive "P")
 (if ild-bottom-string
     (ild-debugger-command ild-bottom-string)
     (beep)))

(defun ild-backtrace (&optional arg)
 (interactive "P")
 (if (ild-prompt)
     (if ild-backtrace-string
	 (ild-debugger-command ild-backtrace-string)
	 (beep))
     (if arg (backward-word arg) (backward-word 1))))

(defun ild-locals (&optional arg)
 (interactive "P")
 (if ild-locals-string
     (ild-debugger-command ild-locals-string)
     (beep)))

(defun ild-local (&optional arg)
 (interactive "P")
 (if arg
     (if ild-local-string-arg
	 (ild-debugger-command (format ild-local-string-arg arg))
	 (beep))
     (if ild-locals-string
	 (ild-debugger-command ild-locals-string)
	 (beep))))

(defun ild-return ()
 (interactive)
 (if ild-return-string
     (ild-debugger-command ild-return-string)
     (beep)))

(defun ild-retry ()
 (interactive)
 (if ild-retry-string
     (ild-debugger-command ild-retry-string)
     (beep)))

(defun ild-trap-on-exit (&optional arg)
 (interactive "P")
 (if ild-trap-on-exit-string
     (ild-debugger-command ild-trap-on-exit-string)
     (beep)))

(defun fast-lisp ()
 "Use the production compiler."
 (interactive)
 (ilisp-send "(progn (proclaim '(optimize (speed 3) (safety 0) (space 0) (compilation-speed 0) (debug 0))) #+akcl (use-fast-links t))"))

(defun slow-lisp ()
 "Use the development compiler."
 (interactive)
 (ilisp-send "(progn (proclaim '(optimize (speed 0) (safety 3) (space 3) (compilation-speed 3) (debug 3))) #+akcl (use-fast-links nil))"))

(defun select-lisp ()
  "Select the lisp buffer in one window mode"
  (interactive)
  (cond ((and (member* ilisp-buffer (buffer-list)
		       :key #'buffer-name
		       :test #'equal)
	      (get-buffer-process (get-buffer ilisp-buffer)))
	 (delete-other-windows)
	 (switch-to-buffer ilisp-buffer))
	(t (lucid)			; put your favorite Lisp here
	   (delete-other-windows))))

;;; This fixes a bug in ILISP 4.1
;;;
;;; Note:
;;; 19990818 Marco Antoniotti
;;; Fixed in the proper place.

;(defun defkey-ilisp (key command &optional inferior-only)
; "Define KEY as COMMAND in ilisp-mode-map and lisp-mode-map unless
;optional INFERIOR-ONLY is T.  If the maps do not exist they will be
;created.  This should only be called after ilisp-prefix is set to the
;desired prefix."
; (if (not ilisp-mode-map) (ilisp-bindings))
; (define-key ilisp-mode-map key command)
; (if (not inferior-only) (define-key lisp-mode-map key command)))

;;; This is a convenient command since c-Z c-W doesn't default to the whole
;;; buffer if there is no region

(defun compile-buffer ()
 "Compile the current buffer"
 (interactive)
 (compile-region-and-go-lisp (point-min) (point-max)))

(defkey-ilisp "\M-a"    'ild-abort         t  "\C-c\C-b\C-a")
(defkey-ilisp "\M-c"    'ild-continue      t  "\C-c\C-b\C-c")
(defkey-ilisp "\C-\M-s" 'ild-step          t  "\C-c\C-b\C-s")
(defkey-ilisp "\C-\M-n" 'ild-next          t  "\C-c\C-b\C-n")
(defkey-ilisp "\C-\M-p" 'ild-previous      t  "\C-c\C-b\C-p")
(defkey-ilisp "\C-c<"   'ild-top           t  "\C-c\C-b\C-v")
(defkey-ilisp "\C-c>"   'ild-bottom        t  "\C-c\C-b\C-w")
(defkey-ilisp "\M-b"    'ild-backtrace     t  "\C-c\C-b\C-b")
(defkey-ilisp "\C-\M-d" 'ild-locals        t  "\C-c\C-b\C-d")
(defkey-ilisp "\C-\M-l" 'ild-local         t  "\C-c\C-b\C-l")
(defkey-ilisp "\C-cr"   'ild-return        t  "\C-c\C-b\C-m")
(defkey-ilisp "\C-\M-r" 'ild-retry         t  "\C-c\C-b\C-r")
(defkey-ilisp "\C-xt"   'ild-trap-on-exit  t  "\C-c\C-b\C-x")
(ilisp-safe-define-key global-map "\C-cL" 'select-lisp "\C-c\C-va")
(ilisp-bind-ilisp-key-for-map lisp-mode-map  "\C-f" 'fast-lisp "\C-b\C-f")
(ilisp-bind-ilisp-key-for-map ilisp-mode-map "\C-f" 'fast-lisp "\C-b\C-f")
(ilisp-bind-ilisp-key-for-map lisp-mode-map  "\C-s" 'slow-lisp "\C-b\C-g")
(ilisp-bind-ilisp-key-for-map ilisp-mode-map "\C-s" 'slow-lisp "\C-b\C-g")

;;; end of file -- ild.el --
ilisp-5.12.0+cvs.2004.12.26/ilfsf18.el0000600000175000001440000000414607556227574015402 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilfsf18.el --
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilfsf18.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $


;;;============================================================================
;;; Prologue

(if (string-match "2\.03" comint-version)
    (fset 'comint-mem 'member))


;;;============================================================================
;;; Functions

(defun add-hook (hook function)
  " Add FUNCTION to HOOK's list.
Arguments are HOOK and FUNCTION. FUNCTION is not added if it's already
on the list."
  (set hook
       (if (boundp hook)
	   (let ((value (symbol-value hook)))
	     (if (and value (or (not (consp value)) (eq (car value) 'lambda)))
		 (setq value (cons value nil)))
	     (if (not (comint-mem function value))
		 (setq value (append value (list function))))
	     value)
	 (list function))))


(defun ilisp-get-input-ring ()
  "Use instead of get-input-ring coming-input-ring or input-ring."
  input-ring)


(defun ilisp-ring-insert (ring input)
  "See 'ring-insert'."
  (ring-insert ring input))


(defun ilisp-temp-buffer-show-function-symbol ()
  "See 'temp-buffer-show-hook'."
  'temp-buffer-show-hook)


(defun set-ilisp-temp-buffer-show-function (val)
  "See 'temp-buffer-show-hook' set function."
  (setq temp-buffer-show-hook val))


(defun ilisp-temp-buffer-show-function ()
  "See 'temp-buffer-show-hook'."
  temp-buffer-show-hook)


(defun ilisp-input-ring-index ()
  "See 'input-ring-index'."
  input-ring-index)


(defun set-ilisp-input-ring-index (n)
  "See 'input-ring-index' set function."
  (setq input-ring-index n))


(defun ilisp-input-ring-size ()
  "See 'input-ring-size'."
  input-ring-size)


(defun set-ilisp-input-ring-size (n)
  "See 'input-ring-size' set function."
  (setq input-ring-size n))


;;;============================================================================
;;; Epilogue

(provide 'compat-fsf18)

;;; end of file -- il-fsf18.el --
ilisp-5.12.0+cvs.2004.12.26/ilfsf19.el0000600000175000001440000000260407556227574015400 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilfsf19.el --
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilfsf19.el,v 1.3 2001/05/12 22:10:53 marcoxa Exp $


;;;============================================================================
;;; Functions

(defun ilisp-get-input-ring ()
  "Use instead of get-input-ring coming-input-ring or input-ring."
  comint-input-ring)


(defun ilisp-ring-insert (ring input)
  (ring-insert ring input))


(defun ilisp-temp-buffer-show-function-symbol ()
  'temp-buffer-show-function)


(defun set-ilisp-temp-buffer-show-function (val)
  (setq temp-buffer-show-function val))


(defun ilisp-temp-buffer-show-function ()
  temp-buffer-show-function)


(defun ilisp-input-ring-index ()
  comint-input-ring-index)


(defun set-ilisp-input-ring-index (n)
  (setq comint-input-ring-index n))


(defun ilisp-input-ring-size ()
  comint-input-ring-size)


(defun set-ilisp-input-ring-size (n)
  (setq comint-input-ring-size n))

(defmacro defgroup (&rest args))

(defmacro defcustom (symbol value doc &rest args)
  `(defvar ,symbol ,value ,doc))


;;;============================================================================
;;; Epilogue

(provide 'compat-fsf-19)

;;; end of file -- fsf19.el --
ilisp-5.12.0+cvs.2004.12.26/ilfsf20.el0000600000175000001440000000242007556227574015364 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilfsf20.el --
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilfsf20.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $


;;;============================================================================
;;; Functions

(defun ilisp-get-input-ring ()
  "Use instead of get-input-ring coming-input-ring or input-ring."
  comint-input-ring)


(defun ilisp-ring-insert (ring input)
  (ring-insert ring input))


(defun ilisp-temp-buffer-show-function-symbol ()
  'temp-buffer-show-function)


(defun set-ilisp-temp-buffer-show-function (val)
  (setq temp-buffer-show-function val))


(defun ilisp-temp-buffer-show-function ()
  temp-buffer-show-function)


(defun ilisp-input-ring-index ()
  comint-input-ring-index)


(defun set-ilisp-input-ring-index (n)
  (setq comint-input-ring-index n))


(defun ilisp-input-ring-size ()
  comint-input-ring-size)


(defun set-ilisp-input-ring-size (n)
  (setq comint-input-ring-size n))


;;;============================================================================
;;; Epilogue

(provide 'compat-fsf-20)

;;; end of file -- ilfsf20.el --
ilisp-5.12.0+cvs.2004.12.26/ilfsf21.el0000600000175000001440000000242007556227574015365 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilfsf21.el --
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilfsf21.el,v 1.1 2002/05/23 15:59:06 marcoxa Exp $


;;;============================================================================
;;; Functions

(defun ilisp-get-input-ring ()
  "Use instead of get-input-ring coming-input-ring or input-ring."
  comint-input-ring)


(defun ilisp-ring-insert (ring input)
  (ring-insert ring input))


(defun ilisp-temp-buffer-show-function-symbol ()
  'temp-buffer-show-function)


(defun set-ilisp-temp-buffer-show-function (val)
  (setq temp-buffer-show-function val))


(defun ilisp-temp-buffer-show-function ()
  temp-buffer-show-function)


(defun ilisp-input-ring-index ()
  comint-input-ring-index)


(defun set-ilisp-input-ring-index (n)
  (setq comint-input-ring-index n))


(defun ilisp-input-ring-size ()
  comint-input-ring-size)


(defun set-ilisp-input-ring-size (n)
  (setq comint-input-ring-size n))


;;;============================================================================
;;; Epilogue

(provide 'compat-fsf-21)

;;; end of file -- ilfsf21.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-acl.el0000600000175000001440000000662107642642410015765 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-acl.el --
;;; ILISP Allegro Common Lisp dialect definition
;;;
;;; Various patches provided by Kimball Collins
;;; 
;;;
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-acl.el,v 1.4 2003/04/02 01:56:20 rgrjr Exp $


;;;%%%Allegro
(defvar ilisp-allegro-init-file "allegro.lisp")

(defun allegro-check-prompt (old new)
  "Compare the break level printed at the beginning of the prompt."
  (let* ((old-level (if (and old (eq 1 (string-match "[0-9]+" old)))
 			(string-to-int (substring old 1))
 			0))
 	 (new-level (if (eq 1 (string-match "[0-9]+" new))
 			(string-to-int (substring new 1))
 			0)))
    (<= new-level old-level)))
 
;;;
(defdialect allegro "Allegro Common LISP"
  common-lisp
  (ilisp-load-init 'allegro ilisp-allegro-init-file)
  (ilisp-load-init 'new-edit-definitions "find-src")
  (setq comint-fix-error ":pop"
	ilisp-reset ":reset"
	comint-continue ":cont"
	comint-interrupt-regexp  "Error: [^\n]* interrupt\)")
  (setq comint-prompt-status 
	(function (lambda (old line)
		    (comint-prompt-status old line 'allegro-check-prompt))))
  ;;  or package> at top-level
  ;; [0-9c]  or package> in error
  ;; (setq comint-prompt-regexp "^\\(\\[[0-9]*c*\\] \\|\\)\\(<\\|\\)[^>]*> ")
  ;; (setq comint-prompt-regexp "^\\(\\[[0-9]+i?c?\\] \\|\\[step\\]\\)?\\(\\|[-A-Za-z0-9]+([0-9]+):\\) ")

  ;; Patch by kpc 94/8/30: allow prompts that look like this:
  ;; USER(23): USER(23):
  (setq comint-prompt-regexp "^\\(\\(\\[[0-9]+i?c?\\] \\|\\[step\\] \\)?\\(\\|[-A-Za-z0-9]+([0-9]+):\\) \\)+")
   
  (setq ilisp-error-regexp
	"\\(ILISP:[^\"]*\\)\\|\\(Error:[^\n]*\\)\\|\\(Break:[^\n]*\\)")

  (setq ilisp-source-types (append ilisp-source-types '(("any"))))

  ;; [use new protocol.  -- rgr, 24-Mar-03.]
  (setq ilisp-find-source-command "(ilisp::source-file %S %S %S)")

  ;; Note:
  ;; 19990920
  ;; The global definition should now take care to find out the
  ;; proper extension.  See file 'ilisp-cl.el'.
  ;; (setq ilisp-binary-command "excl:*fasl-default-type*")

  ;;(setq ilisp-init-binary-command
  ;;	;; Patch provided by kpc 94/8/30: distinguish among
  ;;	;; fasl-incompatible allegro versions
  ;;	"(let ((ext (or #+m68k \"68fasl\"
  ;;		        #+sparc \"sfasl\"
  ;;		        #+iris4d \"ifasl\"
  ;;                    #+dec3100 \"pfasl\"
  ;;                    excl:*fasl-default-type*)))
  ;;           #+allegro-v4.0 (setq ext (concatenate 'string ext \"40\"))
  ;;           #+allegro-v4.1 (setq ext (concatenate 'string ext \"41\"))
  ;;           #+allegro-v4.2 (setq ext (concatenate 'string ext \"42\"))
  ;;           ext)")

  ;; FI:CLMAN support

  (setf ilisp-*use-fi-clman-interface-p* t)

  ;; ILD Support

  (setq ild-abort-string ":pop"
	ild-continue-string ":cont"
	ild-next-string ":dn"
	ild-next-string-arg ":dn %s"
	ild-previous-string ":up"
	ild-previous-string-arg ":up %s"
	ild-top-string ":to"
	ild-bottom-string ":bo"
	ild-backtrace-string ":bt"
	ild-locals-string ":local"
	ild-local-string-arg ":local %s"
	ild-return-string nil		;needs work
	ild-retry-string ":rest"
	ild-trap-on-exit-string ":boe")
  )

(unless allegro-program (setq allegro-program "cl"))

;;; end of file -- ilisp-acl.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-aut.el0000600000175000001440000000274607277332355016033 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-aut.el --
;;; ILISP autoloads.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-aut.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $


(autoload 'lisp-directory "ilisp-src" 
	  "Select directories to search." t)
(autoload 'next-definition-lisp "ilisp-src"
	  "Edit the next definition." t)
(autoload 'edit-definitions-lisp "ilisp-src" 
	  "Edit definitions." t)
(autoload 'search-lisp "ilisp-src" 
	  "Search for pattern in source files." t)
(autoload 'replace-lisp "ilisp-src" 
	  "Relace pattern in source files." t)
(autoload 'who-calls-lisp "ilisp-src"
	  "Show callers of a function." t)
(autoload 'next-caller-lisp "ilisp-src" 
	  "Edit the next caller of a function." t)
(autoload 'edit-callers-lisp "ilisp-src" 
	  "Edit the callers of a function." t)

(autoload 'ilisp-bug "ilisp-bug"
	  "Send a mail message about a bug." t)

;;;%%Changed definitions
(autoload 'mark-change-lisp "ilisp-bat" 
	  "Mark the current defun as changed." t)
(autoload 'list-changes-lisp "ilisp-bat"
	  "List the current LISP changes." t)
(autoload 'clear-changes-lisp "ilisp-bat"
	  "Clear the list of LISP changes." t)
(autoload 'eval-changes-lisp "ilisp-bat"
	  "Evaluate the list of LISP changes." t)
(autoload 'compile-changes-lisp "ilisp-bat"
	  "Compile the list of LISP changes." t)

ilisp-5.12.0+cvs.2004.12.26/ilisp-bat.el0000600000175000001440000001030007277332355015771 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-bat.el --
;;; Inferior LISP interaction package batch submodule.
;;; See ilisp.el for more information.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-bat.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $

(defun mark-change-lisp (arg)
  "Mark the current defun as being changed.
This is to make 'lisp-eval-changes' or 'lisp-compile-changes' work on
it.  With a prefix, unmark."
  (interactive "P")
  (let (point name)
    (save-excursion
      (setq point (lisp-defun-begin)
	    name (lisp-def-name)))
    (if arg
	(let ((marker (car (member* point lisp-changes
				    :test #'equal
				    :key #'marker-position))))
	  (message "%s marked as unchanged" name)
	  (setq lisp-changes (delq marker lisp-changes)))
	(message "%s marked as changed" name)
	(if (not (member* point lisp-changes
			  :test #'equal
			  :key #'marker-position))
	    (let ((new (make-marker)))
	      (set-marker new point)
	      (setq lisp-changes (cons new lisp-changes)))))))

;;;
(defun list-changes-lisp ()
  "List the name of LISP forms currently marked as being changed."
  (interactive)
  (let ((names (reverse (mapcar (function
				 (lambda (change)
				  (save-excursion
				    (set-buffer (marker-buffer change))
				    (goto-char change)
				    (lisp-def-name))))
				lisp-changes))))
    (if names
	(with-output-to-temp-buffer "*Changed-Definitions*"
	  (display-completion-list names)
	  (save-excursion
	    (set-buffer "*Changed-Definitions*")
	    (goto-char (point-min))
	    (kill-line)
	    (insert "Changed LISP forms:")))
	(error "No changed definitions"))))

;;;
(defun clear-changes-lisp ()
  "Clear the list of LISP forms currently marked as being changed."
  (interactive)
  (message "Cleared changes")
  (setq lisp-changes nil))

;;;
(defun lisp-change-handler (&rest args)
  "Handle an error during a batch process by keeping the change on the
list and passing it on to the normal error handler." 
  (let ((change (car ilisp-pending-changes)))
    (when (and comint-errorp
	       (not (member* change lisp-changes
			     :test #'equal
			     :key #'marker-position)))
      (setq lisp-changes (nconc lisp-changes (cons change nil)))))
  (setq ilisp-pending-changes (cdr ilisp-pending-changes))
  (apply comint-handler args))

;;;
(defun lisp-changes (command message)
  "Apply COMMAND to each of the changes and use MESSAGE to print a
message given the name of the change.  If there is a positive prefix,
the change list will not be changed."
  (save-excursion
    (set-buffer (ilisp-buffer))
    (let ((keep (and current-prefix-arg (not (eq current-prefix-arg '-))))
	  (changes (reverse lisp-changes))
	  (lisp-wait-p nil))
      (setq ilisp-pending-changes (nconc ilisp-pending-changes changes)
	    current-prefix-arg nil)	;Prevent buffer insertion
      (if comint-queue-emptied 
	  (save-excursion
	    (setq comint-queue-emptied nil)
	    (set-buffer (get-buffer-create "*Errors*"))
	    (delete-region (point-min) (point-max))))
      (while changes
	(let* ((change (car changes))
	       name)
	  (set-buffer (marker-buffer change))
	  (goto-char change)
	  (setq name (lisp-def-name))
	  (forward-sexp)
	  (funcall command change (point) nil (format message name)
		   nil 'lisp-change-handler)
	  (setq changes (cdr changes))))
      (comint-send-code
       (ilisp-process)
       (function (lambda ()
	 (save-excursion
	   (set-buffer (get-buffer-create "*Last-Changes*"))
	   (delete-region (point-min) (point-max))
	   (insert (save-excursion
		     (set-buffer "*Errors*")
		     (buffer-string)))))))
      (if keep
	  (message "Started, but keeping changes")
	  (message "Started changes")
	  (setq lisp-changes nil)))))

;;;
(defun eval-changes-lisp ()
  "Evaluate the forms marked as being changed.  With prefix, do not
clear the change list."
  (interactive)
  (lisp-changes 'eval-region-lisp "Evaluate changed %s"))

;;;
(defun compile-changes-lisp ()
  "Compile the forms marked as being changed.  With prefix, do not
clear the change list."
  (interactive)
  (lisp-changes 'compile-region-lisp "Compile changed %s"))
ilisp-5.12.0+cvs.2004.12.26/ilisp-bug.el0000600000175000001440000000770507556232575016022 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-bug.el --
;;; ILISP bug stuff.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-bug.el,v 1.3 2002/10/25 12:13:49 kevinrosenberg Exp $


(defun ilisp-bug ()
  "Generate an ilisp bug report."
  (interactive)
  (let ((buffer 
	 (if (y-or-n-p 
	      (format "Is %s the buffer where the error occurred? " 
		      (buffer-name (current-buffer))))
	     (current-buffer))))
    (if (or (not buffer)
	    ;; (not (mail))
	    (not (ignore-errors
		   (progn (compose-mail) t)))
					; 19990615 Marco Antoniotti
					; Somebody complained that
					; MAIL does not use the mail
					; agent chosen by the
					; user. Here is an attempt to
					; fix this.
					;
					; 19990912 Hannu Koivisto
					; the IGNORE-ERRORS may
					; alleviate some quirks in the
					; COMPOSE-MAIL call.
					; cf.  post of
					; 19990908 for details.
	    )
	(progn
	  (message 
	   (if buffer 
	       "Can't send bug report until mail buffer is empty."
	       "Switch to the buffer where the error occurred."))
	  (beep))
      (insert ilisp-bugs-to)
      (search-forward (concat "\n" mail-header-separator "\n"))
      (insert "\nYour problem: \n\n")
      (insert "Type C-c C-c to send\n")
      (insert "======= Emacs state below: for office use only =======\n")
      (forward-line 1)
      (insert (emacs-version))
      (insert 
       (if (string-match "XEmacs" emacs-version)
	   (format "\nWindow System: %s" (console-type) ) ;; XEmacs has no window-system-version
	 (format "\nWindow System: %s %s" window-system window-system-version) ) )
      (let ((mode (save-excursion (set-buffer buffer) major-mode))
	    (match "popper-\\|completer-")
	    (val-buffer buffer)
	    string)
	(if (or (memq mode lisp-source-modes) (memq mode ilisp-modes))
	    (progn
	      (setq match (concat "ilisp-\\|comint-\\|lisp-" match)
		    val-buffer (save-excursion (set-buffer buffer)
					       (or (ilisp-buffer) buffer)))
	      (mapcar (function (lambda (dialect)
				  (setq match (concat (format "%s-\\|" (car dialect))
						      match))))
		      ilisp-dialects)
	      (save-excursion
		(set-buffer buffer)
		(let ((point (point))
		      (start (lisp-defun-begin))
		      (end (lisp-end-defun-text t)))
		  (setq string
			(format "
Mode: %s
Start: %s
End: %s
Point: %s
Point-max: %s
Code: %s"
				major-mode start end point (point-max)
				(buffer-substring-no-properties start end)))))
	      (insert string)))
	(mapatoms
	 (function (lambda (symbol)
		     (if (and (boundp symbol)
			      (string-match match (format "%s" symbol))
			      (not (eq symbol 'ilisp-documentation)))
			 (let ((val (save-excursion
				      (set-buffer val-buffer) 
				      (symbol-value symbol))))
			   (if val
			       (insert (format "\n%s: %s" symbol val))))))))
	(insert (format "\nLossage: %s" (key-description (recent-keys))))
	(if (and (or (memq mode lisp-source-modes)
		     (memq mode ilisp-modes))
		 (ilisp-buffer) 
		 (memq 'clisp (ilisp-value 'ilisp-dialect t))
		 (not (cdr (ilisp-value 'comint-send-queue))))
	    (progn
	      (insert (format "\nLISP: %s"
			      (comint-remove-whitespace
			       (car (comint-send
				     (save-excursion
				       (set-buffer buffer)
				       (ilisp-process))
				     "(lisp-implementation-version)"
				     t t 'version)))))
	      (insert (format "\n*FEATURES*: %s"
			      (comint-remove-whitespace
			       (car (comint-send
				     (save-excursion
				       (set-buffer buffer)
				       (ilisp-process))
				     "(let ((*print-length* nil)
				       (*print-level* nil))
				   (print *features*)
				   nil)"
				     t t 'version)))))))
	(insert ?\n)
	(goto-char (point-min))
	(re-search-forward "^Subject")
	(end-of-line)
	(message "Send with sendmail or your favorite mail program.")))))

;;; end of file -- ilisp-bug.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-ccl.el0000600000175000001440000001022407531601216015755 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-ccl.el --

;;; This file is part of ILISP.
;;; Version: 5.12
;;;
;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
;;;               1993, 1994 Ivan Vasquez
;;;               1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker
;;;               1996, 1997, 1998, 1999 Marco Antoniotti and Rick Campbell
;;;		  2000 Reini Urban
;;;
;;; Other authors' names for which this Copyright notice also holds
;;; may appear later in this file.
;;;
;;; Send mail to 'majordomo@cons.org' to be included in the
;;; ILISP mailing list. 'ilisp@cons.org' is the general ILISP
;;; mailing list were bugs and improvements are discussed.
;;;
;;; ILISP is freely redistributable under the terms found in the file
;;; COPYING.

;;;
;;; Dialect definition for Corman Common Lisp by Roger Corman 
;;; Since 1.4 (fixed with 1.41) there is a debugger with corman.

(require 'cl)

;;; cormanlisp --
;;;
;;; Notes:
;;; 2000-09-08 16:01:20 rurban
;;;   created, based on chs and acl
;;; Problems: 
;;;  * win32 pathdelims get lost on C-c l, but a manual load works.
;;;  * subsequent invocations load the next lisp (clisp in my case) 
;;;    instead of corman.

; Hint:
; Best is to load cl-ilisp.lisp, ilisp-pkg.lisp and cormanlisp.lisp 
; with all required corman patches into cormanlisp at first and save 
; the image.
;
; On cygwin (X)Emacs we have to convert the filenames passed to the lisp.
; ilisp-hi.el:   file-name-hack for elisp
; cl-ilisp.lisp: ilisp-w32-fix-filenames for lisp
; ilisp-cl-easy-menu.el
;   added a Debugger menu section for XEmacs (easy-menu)

; Old ILISP Patches for 5.11:
;   http://xarch.tu-graz.ac.at/autocad/lisp/cormanlisp/ilisp-ccl-5.11.zip
; Cormanlisp fixes: (required for at least CCL 1.5)
;   http://xarch.tu-graz.ac.at/autocad/lisp/cormanlisp/ccl-1.5-patches.zip

; Todo: custom vars for these.
; We really should query the registry. The dll is registered there, 
; so we would also know the version.
; A XEmacs dynamic w32reg emodule is almost ready:
;   http://xarch.tu-graz.ac.at/autocad/lsp_tools/ntemacs/emodules/w32reg/w32reg.c

; define these in ~/.ilisp
;(setq *cormanlisp-dir* "P:/CORMAN~1/CORMAN~1.5/")
(unless (boundp '*cormanlisp-dir*)
  (setq *cormanlisp-dir* "C:/PROGRAM~1/CORMAN~1/CORMAN~1.5/"))

(unless (boundp 'cormanlisp-program)
  (setq cormanlisp-program
	(concatenate 'string *cormanlisp-dir* "clconsole.exe" 
		     " -image " *cormanlisp-dir* "CormanLisp.img")))

;(defvar ilisp-cormanlisp-init-file
;	(concatenate 'string *cormanlisp-dir* "init.lisp"))
(defvar ilisp-cormanlisp-init-file "cormanlisp.lisp")

(defdialect cormanlisp "CormanLisp" common-lisp
  (ilisp-load-init 'ilisp-package-kludge ilisp-cl-ilisp-package-file)
  (ilisp-load-init 'common-lisp ilisp-cl-ilisp-init-file)
  (ilisp-load-init 'cormanlisp ilisp-cormanlisp-init-file)
  (setq
     ilisp-error-regexp  "\\(ILISP:[^\n]*\\)\\|\\(^;;; An error occurred\\)"
     ilisp-find-source-command  "(ilisp:ilisp-source-files \"%s\" \"%s\" \"%s\")"
     ilisp-reset "(debug::debugger-continue)"
     ilisp-block-command "(progn %s)"
     ;; cl overrides
     ilisp-inspect-command nil		 ; no inspector
     ilisp-load-no-compile-query t       ; don't ask "Compile first"
;     ilisp-binary-extension nil ; "fasl" ; avoid compilation
;     ilisp-compile-file-command nil      ; avoid compilation

;     ilisp-*use-frame-for-output* nil	  ; this should go to .ilisp
;     ilisp-bindings-*bind-space-p* nil    ; this should go to .ilisp
     ;; default
     comint-prompt-regexp "^?*"
     ;; comint-prompt-regexp "^\\([0-9]+\\. Break \\[[0-9]+\\]> \\|^[^>]*> \\)"
     comint-fix-error ":C 1"
     comint-continue ":C"
   )

  ;; ILD Support. NIL values mean that more work is needed or that the
  ;; particular command is not available

  (setq ild-abort-string ":QUIT"
	ild-continue-string ":C 1"
	ild-next-string ":NEXT"
	ild-next-string-arg nil
	ild-previous-string ":PREVIOUS"
	ild-previous-string-arg nil
	ild-top-string ":TOP"
	ild-bottom-string ":BOTTOM"
	ild-backtrace-string ":BACKTRACE"
	ild-locals-string nil
	ild-local-string-arg nil
	;ild-return-string "return"
	;ild-retry-string "redo"
	;ild-trap-on-exit-string "break+"
	))

(provide 'ilisp-ccl)

;;; end of file -- ilisp-chs.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-chs.el0000600000175000001440000000771607667556744016036 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-chs.el --
;;; CLISP Common Lisp by Bruno Haible and Michael Stoll dialect definition.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-chs.el,v 1.8 2003/05/30 16:39:47 bill_clementson Exp $

(require 'cl)

;;; clisp-hs-check-prompt doesn't after the first break because the
;;; number of ">" characters doesn't increase.

;;; (defun clisp-hs-check-prompt (old new)
;;;  "Compare the break level printed at the beginning of the prompt."
;;;  (let* ((was-in-break (and old (string-match "Break>" old)))
;;; 	 (old-level (if was-in-break
;;; 			(- (match-end 0) (match-beginning 0))
;;; 			0))
;;; 	 (is-in-break (string-match "Break>" new))
;;; 	 (new-level (if is-in-break
;;; 			(- (match-end 0) (match-beginning 0))
;;; 			0)))
;;;    (<= new-level old-level)))

;;; clisp-hs-check-prompt -- New version
;;; (according to the description in comint-ipc, this should be the
;;; correct behavior)
;;;
;;; 19990912 Martin Atzmuller

(defun clisp-hs-check-prompt (old new)
  "Compare the break level printed at the beginning of the prompt."
  (let* ((was-in (and old
		      (string-match "Break" old)
		      (string-match "[0-9]+" old)))
	 (old-level (if was-in
 			(string-to-int
			 (substring old (match-beginning 0)
				    (match-end 0)))
		      0))
	 (is-in (and
		 (string-match "Break" new)
		 (string-match "[0-9]+" new)))
	 (new-level (if is-in
 			(string-to-int
			 (substring new (match-beginning 0)
				    (match-end 0)))
		      0)))
    (<= new-level old-level)))


;;; clisp-hs --
;;;
;;; Notes:
;;; 19991219 Martin Atzmueller
;;; replaced clisp-hs-check-prompt again.
;;;
;;; 19990912 Martin Atzmueller
;;; replaced clisp-hs-check-prompt with new function
;;;
;;; 19990828 Paolo Amoroso
;;; Added initial support for ILD and modified COMINT-PROMPT-REGEXP (the
;;; previous value didn't take into account the space which is the last
;;; character of the prompt).
;;;
;;; 19990806 Martin Atzmueller
;;; Various changes to make the dialect definition friendlier.
;;;
;;; 19990806 Marco Antoniotti
;;; Since I changed the name of the main dialect, I could conceivably
;;; change the name of the CLISP dialect.

(defvar ilisp-clisp-hs-init-file "cl-chs-init.lisp")

(defdialect clisp-hs "CLISP H.S." common-lisp
  (ilisp-load-init 'clisp-hs ilisp-clisp-hs-init-file)
  (setq
   ilisp-load-or-send-command "(and (or (print \"%s\") t) (load \"%s\"))"
   ilisp-error-regexp
   "\\(ILISP:[^\"]*\\)\\|\\(\\*\\*[^\n]*\\)"

   ilisp-reset "(sys::debug-unwind)"
   ilisp-block-command "(progn %s)"
   ilisp-find-source-command nil
   ilisp-callers-command nil

   ;; Note:
   ;; 19990920
   ;; The global definition should now take care to find out the
   ;; proper extension.  See file 'ilisp-cl.el'.
   ;; ilisp-binary-extension "fas"

   comint-prompt-regexp "^\\([0-9]+\\. Break \\[[0-9]+\\]> \\|[^>]*> \\)"
   comint-interrupt-regexp "\\(\\*\\*\\* - [A-Za-z]*: User break\\)"
   comint-fix-error "(sys::debug-unwind)"
   comint-continue "continue"
   comint-prompt-status
   (function
    (lambda (old line)
     (comint-prompt-status old line 'clisp-hs-check-prompt))))

  ;; ILD Support. NIL values mean that more work is needed or that the
  ;; particular command is not available

  (setq ild-abort-string "(sys::debug-unwind)"
	ild-continue-string "continue"
	ild-next-string "up"
	ild-next-string-arg nil
	ild-previous-string "down"
	ild-previous-string-arg nil
	ild-top-string "top"
	ild-bottom-string "bottom"
	ild-backtrace-string "backtrace"
	ild-locals-string nil
	ild-local-string-arg nil
	ild-step-string "step"
	ild-return-string "return"
	ild-retry-string "redo"
	ild-trap-on-exit-string "break+" ; I'm not sure about this
	))

(unless clisp-hs-program
  (setq clisp-hs-program "clisp -ansi -I")) ; ANSI mode, ILISP friendly

(provide 'ilisp-chs)

;;; end of file -- ilisp-chs.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-cl-easy-menu.el0000600000175000001440000002200407667556745017544 0ustar  mvelausers;;; Ilisp-easy-menu.el --- (easy)menu's on Emacs for Ilisp

;;; Copyright (C) 1996 Holger Schauer
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-cl-easy-menu.el,v 1.8 2003/05/29 19:53:24 bill_clementson Exp $

;; Author: Holger Schauer 
;; Maintainer: Holger.Schauer@gmd.de
;; Keywords: lisp ilisp extensions menu easymenu
;; Version 0.2
;; Status: Should work with any Emacs and easymenu.el (as by Per Abrahamsen)
;; Created: 1996-10-08
;; Last modified: 1996-10-15 (that's 15th October 1996, folks)

;; Where to get it: http://www.uni-koblenz.de/~schauer/uniemacs.html

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, you can either send email to this
;; program's maintainer or write to: The Free Software Foundation,
;; Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.

;;; Commentary:

;; This file and it's extensions have been named ilisp-xemacs-menu before. 
;; As it is ensured now to work with any Emacs with easymenu the file
;; itself and all relevant names (of commands and variables) are renamed. 

;; Use this file as an extension to Ilisp 5.7/5.8 
;; (seee http://www.cs.cmu.edu/~campbell/ilisp/index.html)
;; Put it in a place where (X)Emacs can find it and augment your
;; .emacs like the following to use it.
;; (load-library "ilisp-easy-menu")
;; This needs to be loaded prior to Ilisp !
;; This should give you the menu in any source code buffer and any inferior 
;; ilisp buffer. Be careful: the menu is initialized with add-hook
;; on ilisp-mode-hook and lisp-mode-hook, so if you setq these two
;; hooks afterwards you won't get the menu.
;;
;; If you want to use it with Emacs (not XEmacs) you will want to get rid
;; of the old menu. You can do so by applying the following patches (to
;; Ilisp 5.8 - for 5.7 check for ilisp-update-menu and the loading of the
;; menu, i.e. ilisp-menu and ilisp-mnb)
;; For ilisp.el:
;; 185c185,187
;< (if (not (member +ilisp-emacs-version-id+ '(xemacs lucid-19 lucid-19-new)))
;---
;> (if (and
;>      (not (member +ilisp-emacs-version-id+ '(xemacs lucid-19 lucid-19-new)))
;>      (not (featurep 'ilisp-easy-menu)))
;; For ilisp-utl.el:
;127c127,129
;<   (if (not (member +ilisp-emacs-version-id+ '(xemacs lucid-19 lucid-19-new)))
;---
;>   (if (and (not 
;> 	    (member +ilisp-emacs-version-id+ '(xemacs lucid-19 lucid-19-new)))
;> 	   (not (featurep 'ilisp-easy-menu)))

(require 'easymenu)

(eval-when (load compile eval)
  (when (and ilisp-*use-hyperspec-interface-p*
	     (not (featurep 'hyperspec)))
    (load-library "extra/hyperspec")))

(defvar ilisp-cl-easy-menu
  `("Ilisp"
    [ "Load File" load-file-lisp t ]
    [ "Run Ilisp" run-ilisp t ]
    "--"
    ("Evaluate"
     [ "Eval DWIM" eval-dwim-lisp t ]
     [ "Eval region" eval-region-lisp t ]
     [ "Eval defun" eval-defun-lisp t ]
     [ "Eval next sexp" eval-next-sexp-lisp t ]
     [ "Eval last sexp" eval-last-sexp-lisp t ]
     [ "Eval changes" eval-changes-lisp t ]
     )
    ("Evaluate and Go"
     [ "Eval DWIM" eval-dwim-and-go-lisp t ]
     [ "Eval region" eval-region-and-go-lisp t ]
     [ "Eval defun" eval-defun-and-go-lisp t ]
     [ "Eval next sexp" eval-next-sexp-and-go-lisp t ]
     [ "Eval last sexp" eval-last-sexp-and-go-lisp t ]
     )
    ("Compile"
     [ "File" compile-file-lisp t ]
     [ "Buffer" ilisp-compile-buffer t ]
     [ "Defun" compile-defun-lisp t ]
     [ "Defun and go" compile-defun-and-go-lisp t ]
     [ "Region" compile-region-lisp t ]
     [ "Region and go" compile-region-and-go-lisp t ]
     [ "Compile changes" compile-changes-lisp t ]
     )
    "--"
    ("Editing"
     [ "Edit definitions" edit-definitions-lisp t ]
     [ "Edit next def." next-definition-lisp t ]
     [ "Edit callers" edit-callers-lisp t ]
     [ "Edit next caller" next-caller-lisp t ]
     [ "Insert arguments" arglist-lisp t ]
     "--"
     [ "Find unbalanced paren" find-unbalanced-lisp t ]
     [ "Close all parens" close-all-lisp t ]
     [ "Close and send lisp" close-and-send-lisp t ]
     "--"
     [ "Reindent" reindent-lisp t ]
     [ "Indent sexp" indent-sexp-ilisp t ]
     ;; [ "Indent for comment" lisp-indent-for-comment t ]
     [ "Comment region" comment-region-lisp t ]
     "--"
     [ "Search in Files" search-lisp t ] 
     "--"
     [ "Kill sexp" kill-sexp t ] 
     [ "Kill last sexp" backward-kill-sexp t ]
     "--"
     [ "Macroexpand" macroexpand-lisp t ]
     [ "Macroexpand-1" macroexpand-1-lisp t ]
     "--"
     [ "Begin of def" beginning-of-defun-lisp t ]
     [ "End of defun" end-of-defun-lisp t ]
     )
    ("Documentation"
     [ "Documentation" documentation-lisp t ]
     [ "Describe" describe-lisp t ]
     [ "Inspect" inspect-lisp t ]
     [ "Argument List" arglist-lisp t ]	; Just a test.
     "--"
     ;; With which var can I test if 'fi' is really loaded? Can I just
     ;; use FEATUREP?
     [ "Clman-apropos" fi:clman-apropos nil ] 
     [ "CLtL2"
       cltl2-lookup
      ,ilisp-*use-cltl2-interface-p* ]
      [ "Hyperspec - apropos"
       hyperspec-lookup
       ,ilisp-*use-hyperspec-interface-p* ]
     )
    "--"
    ("Package"
     "--"
     [ "Package" package-lisp t ]
     [ "Set Lisp Package" set-package-lisp t ]
     [ "Set Buffer Package" set-buffer-package-lisp t ]
     )
    "--"
    ("Misc"
     ;; [ "Reset Ilisp" reset-ilisp t ]
     [ "Select Ilisp" select-ilisp t ]
     [ "Switch to lisp" switch-to-lisp t ]
     [ "Abort commands" abort-commands-lisp t ]
     [ "Status of Lisp" status-lisp t ]  
     "--"
     [ "Mark change" mark-change-lisp t ]
     [ "List changes" list-changes-lisp t ]
     [ "Clear changes" clear-changes-lisp t ]
     "--"
     [ "Trace defun" trace-defun-lisp t ]
     [ "Trace defun - break" trace-defun-lisp-break t ]
     )
    "--"
    [ "Reset Ilisp Connection" reset-ilisp t ]
    [ "Repair Ilisp Connection" repair-ilisp t ]
    )
  )

;;; insert "Debug" Menu if ilisp-*enable-ild-support-p*
;;; enable the commands only if inside the debugging loop
;;;
;;; 2000-10-10 17:34:05 rurban
(defconst ilisp-ild-easy-menu
    `("Debug"
     [ "Abort" 	  ild-abort 	(ilisp-ild-p) ]
     [ "Continue" ild-continue 	(ilisp-ild-p) ]
     [ "Next" 	  ild-next 	(ilisp-ild-p) ]
     [ "Previous" ild-previous 	(ilisp-ild-p) ]
     [ "Top" 	  ild-top 	(ilisp-ild-p) ]
     [ "Bottom"   ild-bottom 	(ilisp-ild-p) ]
     [ "Backtrace" ild-backtrace (ilisp-ild-p) ]
     [ "Locals"   ild-locals 	(ilisp-ild-p) ]
     [ "Local"    ild-local 	(ilisp-ild-p) ]
     [ "Return"   ild-return 	(ilisp-ild-p) ]
     [ "Retry"    ild-retry 	(ilisp-ild-p) ]
     [ "Step"     ild-step	(ilisp-ild-p) ]
     [ "Trap on exit" ild-trap-on-exit (ilisp-ild-p) ]
     "--"
     [ "Fast lisp" fast-lisp t ]
     [ "Slow lisp" slow-lisp t ]
     )
    )

(defun ilisp-ild-p ()
  t)

(defun ilisp-insert-menu (menu where what)
  "Insert WHAT into MENU after WHERE"
  (if (position what menu)
      menu
    (let ((i (position (assoc where menu) menu)))
      (setq i    (1+ i)
	    menu (append (butlast menu (- (length menu) i))
			 (list what)
			 (nthcdr i menu))))))
  
(if ilisp-*enable-ild-support-p*
  (setq ilisp-cl-easy-menu 
	(ilisp-insert-menu ilisp-cl-easy-menu "Misc" ilisp-ild-easy-menu)))

;;; ilisp-update-menu
;;;
;;; 19990818 Marco Antoniotti

(defun ilisp-update-menu (status)
  ;; Backward compatibility with old keymap based menus.
  ;; A no-op for the time being.
  )

(defun ilisp-redefine-menu ()
  (easy-menu-remove ilisp-cl-easy-menu)
  (easy-menu-define menubar-ilisp ilisp-mode-map 
		    "Ilisp commands"
		    ilisp-cl-easy-menu)
  (easy-menu-add ilisp-cl-easy-menu 'ilisp-mode-map)
  )

(provide 'ilisp-cl-easy-menu)

;;; Hooks to add the menu.
;;;
;;; Notes:
;;; 19990818 Marco Antoniotti
;;; Since I could have installed a Scheme menu before a CL one, I
;;; could be forced to remove the previous menu.  Now the code does not do
;;; this, but it should.

(add-hook 'ilisp-mode-hook
	  (lambda () 
	    (when (featurep 'easymenu)       
	      (easy-menu-define menubar-ilisp
				ilisp-mode-map 
				"Ilisp commands"
				ilisp-cl-easy-menu) 
	      (easy-menu-add ilisp-cl-easy-menu 'ilisp-mode-map)
	      )))
	 

(add-hook 'lisp-mode-hook
	  (lambda () 
	    (when (featurep 'easymenu)       
	      (easy-menu-define menubar-lisp-ilisp
				lisp-mode-map 
				"lisp commands"
				ilisp-cl-easy-menu) 
	      (when (boundp 'lisp-menu)
		(easy-menu-remove lisp-menu))
	      (easy-menu-add ilisp-cl-easy-menu 'lisp-mode-map)
	      )))

;;; end of file-- ilisp-cl-easy-menu.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-cl.el0000600000175000001440000001052507544411016015617 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-cl.el --
;;; ILISP Common Lisp dialect definition
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-cl.el,v 1.10 2002/09/24 21:39:53 anisotropy9 Exp $

(defvar ilisp-cl-ilisp-package-file "ilisp-pkg.lisp")

(defvar ilisp-cl-ilisp-init-file "cl-ilisp.lisp")


;;; common-lisp --
;;;
;;; Notes:
;;; 19990806 Martin Atzmueller
;;; Added several package related entries.
;;;
;;; 19990806 Marco Antoniotti
;;; MAJOR CHANGE. Changed the name of the dialect to COMMON-LISP

(defdialect common-lisp "Common LISP"
  ilisp
  (setq ilisp-load-or-send-command 
	"(or (and (load \"%s\" :if-does-not-exist nil) t)
             (and (load \"%s\" :if-does-not-exist nil) t))")

  ;; The following line is an incredible kludge to bypass the behavior
  ;; of ilisp-load-init and to stick the package file in front of
  ;; everything.
  ;; Check what ilisp-load-init does to understand why I am forced to
  ;; do this.
  ;; Marco Antoniotti 19941122
  (ilisp-load-init 'ilisp-package-kludge ilisp-cl-ilisp-package-file)

  ;; 19990912 Marco Antoniotti
  ;; Changed the argument below from 'clisp to 'common-lisp.
  (ilisp-load-init 'common-lisp ilisp-cl-ilisp-init-file)
  (setq ilisp-package-separator-regexp
	":+"

	ilisp-package-command
	;;; "(nth-value 0 (ignore-errors (let ((*package* *package*)) %s (package-name *package*))))"
          "(let ((*package* *package*)) (nth-value 0 (ignore-errors %s (package-name *package*))))"

        ilisp-no-package-in-core-regexp
        "^nil"

        ilisp-fallback-package
        ':common-lisp-user

	ilisp-in-package-command-string
	"in-package"
         
	ilisp-defpackage-command-string
	"defpackage"

	ilisp-package-name-command
	"(package-name *package*)"

	ilisp-in-package-command
	"(in-package %S)"

         ilisp-hash-form-regexp
         "\\(^[ \t]*#[+-].\\)\\|\\(^[ \t]*(\\(.*::?\\)?defpackage[ \t\n]\\)\\|\\(^[ \t]*(\\(.*::?\\)?in-package[ \t\n]*\\)"

	ilisp-last-command
	"*"

	ilisp-save-command
	"(progn (ilisp:ilisp-save) %s\n)"

	ilisp-restore-command
	"(ilisp:ilisp-restore)"

	ilisp-block-command
	"(progn %s\n)"

	ilisp-eval-command
	"(ilisp:ilisp-eval \"%s\" \"%s\" \"%s\")"

	ilisp-defvar-regexp
	"(defvar[ \t\n]")

  (setq ilisp-defvar-command 
	"(ilisp:ilisp-eval \"(let ((form '%s)) (progn (makunbound (second form)) (eval form)))\" \"%s\" \"%s\")")

  (setq ilisp-compile-command
	"(ilisp:ilisp-compile \"%s\" \"%s\" \"%s\")"

	ilisp-describe-command
	"(ilisp:ilisp-describe \"%s\" \"%s\")"

	ilisp-inspect-command
	"(ilisp:ilisp-inspect \"%s\" \"%s\")"

	ilisp-arglist-command
	"(ilisp:ilisp-arglist \"%s\" \"%s\")")

  (setq ilisp-documentation-types
	'(("function") ("variable")
	  ("structure") ("type")
	  ("setf") ("class")
	  ("(qualifiers* (class ...))")))

  (setq ilisp-documentation-command
	"(ilisp:ilisp-documentation \"%s\" \"%s\" \"%s\")")

  (setq ilisp-macroexpand-1-command 
	"(ilisp:ilisp-macroexpand-1 \"%s\" \"%s\")")

  (setq ilisp-macroexpand-command
	"(ilisp:ilisp-macroexpand \"%s\" \"%s\")")

  (setq ilisp-complete-command 
	"(ilisp:ilisp-matching-symbols \"%s\" \"%s\" %s %s %s)")

  (setq ilisp-locator 'lisp-locate-clisp)

  (setq ilisp-source-types 
	'(("function") ("macro") ("variable")
	  ("structure") ("type")
	  ("setf") ("class")
	  ("(qualifiers* (class ...))")))

  (setq ilisp-callers-command
	"(ilisp:ilisp-callers \"%s\" \"%s\")"

	ilisp-trace-command
	"(ilisp:ilisp-trace \"%s\" \"%s\" \"%s\")"

	ilisp-untrace-command
	"(ilisp:ilisp-untrace \"%s\" \"%s\")")

  (setq ilisp-directory-command
	"(namestring *default-pathname-defaults*)"

	ilisp-set-directory-command
	"(setq *default-pathname-defaults* (parse-namestring \"%s\"))")

  ;; Note:
  ;; 19990912 Marco Antoniotti
  ;; This is probably the best and simplest way to fix things.
  ;; cfr. Hannu Koivisto's posting on 'ilisp@cons.org'.

  (setf ilisp-binary-command
	"(pathname-type (compile-file-pathname \"ILISP-DUMMY-STRING\"))"

	ilisp-init-binary-command ilisp-binary-command)

  (setq ilisp-load-command
	"(load \"%s\")")

  (setq ilisp-compile-file-command 
	"(ilisp:ilisp-compile-file \"%s\" \"%s\")")

  (setq ilisp-print-info-message-command
	"(ilisp:ilisp-print-info-message \"%s\" \"%s\")" ))

;;; end of file -- ilisp-cl.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-cmp.el0000600000175000001440000003107307556232575016017 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-cmp.el --
;;; ILISP completion
;;; The basic idea behind the completion stuff is to use as much of
;;; the standard Emacs stuff as possible.  The extensions here go out
;;; to the inferior LISP to complete symbols if necessary.  
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-cmp.el,v 1.11 2002/10/25 12:13:49 kevinrosenberg Exp $

(defun ilisp-display-choices (symbol choices)
  "Display the possible choices for SYMBOL in alist CHOICES."
  (with-output-to-temp-buffer "*Completions*"
    (display-completion-list
     (sort 
      (all-completions (lisp-symbol-name symbol) choices)
      'string-lessp))))

;;;%%ilisp-can-complete
(defun ilisp-can-complete (symbol function-p)
  "Return T if ilisp completion can complete SYMBOL from the current table."
  (and ilisp-original 
       (string= (lisp-symbol-package ilisp-original) 
		(lisp-symbol-package symbol))
       (string= (lisp-symbol-delimiter ilisp-original)
		(lisp-symbol-delimiter symbol))
       (lisp-prefix-p (lisp-symbol-name ilisp-original)
		      (lisp-symbol-name symbol))
       (eq function-p ilisp-original-function-p)))

;;;%%ilisp-complete
(defun ilisp-complete (symbol &optional function-p)
  "Return the possible completions for symbol from the inferior LISP.
The type of the result is a list.  If FUNCTION-P is T, only symbols
with function bindings will be considered.  If no package is specified
the buffer package will be used."
  (let* ((choices-string
	  (ilisp-send 
	   (format  (ilisp-value 'ilisp-complete-command) 
		    (lisp-symbol-name symbol) (lisp-symbol-package symbol)
		    function-p
		    (string= (lisp-symbol-delimiter symbol) ":")
		    ilisp-*prefix-match*)
	   (if (not ilisp-complete)
	       (concat "Complete " 
		       (if function-p "function ")
		       (lisp-buffer-symbol symbol)))
	   'complete))
	 choices)
    (if (or (ilisp-value 'comint-errorp t)
	    (ignore-errors (string-match ilisp-error-regexp choices-string)))
	(setq choices 'error)
      (setq choices (read choices-string)
	    choices (if (eq choices 'NIL) nil choices)))
    (unless (listp choices)
      (lisp-display-output choices-string)
      (error "Error completing %s" (lisp-buffer-symbol symbol)))
    (setq ilisp-original symbol
	  ilisp-original-function-p function-p
	  ilisp-original-table choices)))

;;;%%ilisp-completion-table
(defun ilisp-completion-table (symbol function-p)
  "Return the completion table for SYMBOL trying to use the current one.
If FUNCTION-P is T, only symbols with function cells will be returned."
  (if (ilisp-can-complete symbol function-p) 
      ilisp-original-table
      (ilisp-complete symbol function-p)))

;;;%%Minibuffer completion
(defun ilisp-restore-prefix ()
  "Restore the prefix from ilisp-mini-prefix at the start of the minibuffer."
  (if ilisp-mini-prefix
      (save-excursion
	(goto-char (ilisp-minibuffer-prompt-end))
	(insert ilisp-mini-prefix)
	(setq ilisp-mini-prefix nil))))

;;; Support for Emacs 21 minibuffer prompt
(defun ilisp-minibuffer-prompt-end ()
  (if (fboundp 'minibuffer-prompt-end)
      (minibuffer-prompt-end)
    (point-min)))	       

;;;
(defun ilisp-current-choice ()
  "Set up the minibuffer completion table for the current symbol.
If there is a paren at the start of the minibuffer, or there is not an
ilisp-table, this will be from the inferior LISP.  Otherwise, it will
be the ilisp-table."
  (if (or (null ilisp-table) (eq (char-after (ilisp-minibuffer-prompt-end)) ?\())
      (progn
	(let* ((symbol-info (lisp-previous-symbol))
	       (symbol (car symbol-info)))
	  (setq minibuffer-completion-table 
		(ilisp-completion-table symbol ilisp-completion-function-p)))
	(save-excursion 
	  (skip-chars-backward "^: \(")
	  (setq ilisp-mini-prefix (buffer-substring-no-properties (ilisp-minibuffer-prompt-end) (point)))
	  (delete-region (ilisp-minibuffer-prompt-end) (point)))
	;; Nothing can match this table
	(if (not minibuffer-completion-table)
	    (setq minibuffer-completion-table '((" ")))))
      (setq minibuffer-completion-table ilisp-table
	    minibuffer-completion-predicate nil)))

;;;%%Commands
(defvar ilisp-completion-help
  (lookup-key minibuffer-local-must-match-map "?"))
(defun ilisp-completion-help ()
  "Inferior LISP minibuffer completion help."
  (interactive)
  (ilisp-current-choice) 
  (funcall ilisp-completion-help)
  (ilisp-restore-prefix))

;;;
(defvar ilisp-completion
  (lookup-key minibuffer-local-must-match-map "\t"))
(defun ilisp-completion ()
  "Inferior LISP minibuffer complete."
  (interactive)
  (ilisp-current-choice)
  (funcall ilisp-completion)
  (ilisp-restore-prefix))

;;;
(defvar ilisp-completion-word
  (lookup-key minibuffer-local-must-match-map " "))
(defun ilisp-completion-word ()
  "Inferior LISP minibuffer complete word."
  (interactive)
  (if (eq (char-after (ilisp-minibuffer-prompt-end)) ?\()
      (insert " ")
      (ilisp-current-choice)
      (funcall ilisp-completion-word)
      (ilisp-restore-prefix)))

;;;
(defun ilisp-completion-paren ()
  "Only allow a paren if ilisp-paren is T."
  (interactive)
  (if ilisp-paren 
      (if (or (eq last-input-char ?\() (eq (char-after (ilisp-minibuffer-prompt-end)) ?\())
	  (insert last-input-char)
	  (beep))
      (beep)))
      
;;; 
(defvar ilisp-completion-exit 
  (lookup-key minibuffer-local-must-match-map "\n"))
(defun ilisp-completion-exit ()
  "Inferior LISP completion complete and exit."
  (interactive)
  (if (eq (char-after (ilisp-minibuffer-prompt-end)) ?\()
      (progn (find-unbalanced-lisp nil)
	     (exit-minibuffer))
      (if ilisp-no-complete
	  (exit-minibuffer)
	  (if (= (ilisp-minibuffer-prompt-end) (point-max))
	      (exit-minibuffer)
	      (ilisp-current-choice)
	      (unwind-protect (funcall ilisp-completion-exit)
		(ilisp-restore-prefix))))))

;;;%%ilisp-completer
(defun ilisp-completer (symbol function-p)
  "Complete SYMBOL from the inferior LISP.
If FUNCTION-P is T, only function symbols are returned.
Return (SYMBOL LCS-SYMBOL CHOICES UNIQUEP)."
  (let* ((name (lisp-symbol-name symbol))
	 (table (ilisp-completion-table symbol function-p))
	 (choice (and table (try-completion name table))))
    (cond ((eq choice t)		; Name is it
	   (list symbol symbol nil t))
	  ((string= name choice)	; Name is LCS
	   (list symbol symbol (all-completions name table) nil))
	  (choice			; New LCS
	   (let ((symbol
		  (lisp-symbol (lisp-symbol-package symbol) 
			       (lisp-symbol-delimiter symbol)
			       choice)))
	     (list symbol symbol (all-completions choice table) nil)))
	  ((and (not ilisp-*prefix-match*) table)	;Try partial matches
	   (let ((matches
		  (completer name table nil (regexp-quote completer-words))))
	     (cons (lisp-symbol (lisp-symbol-package symbol)
				(lisp-symbol-delimiter symbol)
				(car matches))
		   (cons  (lisp-symbol (lisp-symbol-package symbol)
				       (lisp-symbol-delimiter symbol)
				       (car (cdr matches)))
			  (cdr (cdr matches)))))))))


;;;%%ilisp-read
(defun ilisp-completion-map ()
  "Set up the ilisp-completion-map from lisp-mode-map for the ilisp
readers and return it."
  (if (not ilisp-completion-map)
      (progn
	(if (fboundp 'set-keymap-parent)
	    (progn
	      (setq ilisp-completion-map (make-sparse-keymap))
	      (set-keymap-parent ilisp-completion-map lisp-mode-map))
	  (setq ilisp-completion-map (copy-keymap lisp-mode-map)))
	(define-key ilisp-completion-map " "  'ilisp-completion-word)
	(define-key ilisp-completion-map "\t" 'ilisp-completion)
	(define-key ilisp-completion-map "?" 'ilisp-completion-help)
	(define-key ilisp-completion-map "\M-\t" 'ilisp-completion)
	(define-key ilisp-completion-map "\n" 'ilisp-completion-exit)
	(define-key ilisp-completion-map "\r" 'ilisp-completion-exit)
	(define-key ilisp-completion-map "\C-g" 'abort-recursive-edit)
	(define-key ilisp-completion-map "(" 'ilisp-completion-paren)
	(define-key ilisp-completion-map ")" 'ilisp-completion-paren)
	(define-key ilisp-completion-map "'" nil)
	(define-key ilisp-completion-map "#" nil)
	(define-key ilisp-completion-map "\"" nil)))
  ilisp-completion-map)

;;;
(defun ilisp-read (prompt &optional initial-contents)
  "PROMPT in the minibuffer and return the result.
The optional INITIAL-CONTENTS may be specified as an initial value
Completion of symbols though the inferior LISP is allowed."
  (let ((ilisp-complete t)
	(ilisp-paren t)
	(ilisp-no-complete t)
	(ilisp-completion-package (lisp-buffer-package)))
    (read-from-minibuffer prompt initial-contents
			  (ilisp-completion-map))))

;;;%%lisp-read-program
(defvar lisp-program-map nil
  "Minibuffer map for reading a program and arguments.")


;;;
(defun lisp-read-program (prompt &optional initial)
  "Read a program with PROMPT and INITIAL.
TAB or Esc-TAB will complete filenames."
  (unless lisp-program-map
    (if (fboundp 'set-keymap-parent)
	(progn
	  (setq lisp-program-map (make-sparse-keymap))
	  (set-keymap-parent lisp-program-map minibuffer-local-map))
      (setq lisp-program-map (copy-keymap minibuffer-local-map)))
    (define-key lisp-program-map "\M-\t" 'comint-dynamic-complete)
    (define-key lisp-program-map "\t" 'comint-dynamic-complete)
    (define-key lisp-program-map "?" 'comint-dynamic-list-completions))
  (read-from-minibuffer prompt initial lisp-program-map))


;;;%%ilisp-read-symbol
(defun ilisp-read-symbol (prompt &optional default function-p no-complete)
  "PROMPT in the minibuffer and return a symbol from the inferior LISP.
PROMPT may use an optional DEFAULT. If FUNCTION-P is T, only symbols with
function values will be returned.  If NO-COMPLETE is T, then
uncompleted symbols will be allowed."
  (let* ((ilisp-complete t)
	 (ilisp-no-complete no-complete)
	 (ilisp-completion-package (lisp-buffer-package))
	 (ilisp-completion-function-p function-p)
	 (string (read-from-minibuffer prompt nil (ilisp-completion-map))))
    (if (equal string "")
	default
	(lisp-string-to-symbol string))))

;;;%%ilisp-completing-read
(defun ilisp-completing-read (prompt table &optional default)
  "Read with PROMPT from an alist of TABLE.  No input returns DEFAULT.
Symbols are from table, other specs are in parentheses."
  (let* ((ilisp-complete t)
	 (ilisp-table table)
	 (ilisp-completion-package (lisp-buffer-package))
	 (ilisp-paren
	  (let ((entry table) (done nil))
	    (while (and entry (not done))
	      (setq done (= (elt (car (car entry)) 0) ?\()
		    entry (cdr entry)))
	    done))
	 (string (read-from-minibuffer prompt nil (ilisp-completion-map))))
    (if (string= string "") default string)))



;;;%%complete-lisp
(autoload 'complete "completion" "Complete previous symbol." t)
(defun complete-lisp (mode)
  "Complete the current symbol using information from the current ILISP buffer.
If in a string, complete as a filename.  If called with
a positive prefix force all symbols to be considered.  If called with
a negative prefix, undo the last completion.  Partial completion is
allowed unless ilisp-*prefix-match* is T.  If a symbol starts after a
left paren or #', then only function symbols will be considered.
Package specifications are also allowed and the distinction between
internal and exported symbols is considered."
  (interactive "P")
  (if (< (prefix-numeric-value mode) 0)
      (completer-undo)
      (let* ((filep (save-excursion
		      (skip-chars-backward "^ \t\n")
		      (= (or (char-after (point)) ?\") ?\"))))
	(if filep
	    (comint-dynamic-complete)
	    ;; (ilisp-pathname-complete)
	  (let ((symbol-info (lisp-previous-symbol)))
	    (unless symbol-info
	      (error "Nothing to complete"))
	    (let* ((symbol (car symbol-info))
		   (name (lisp-symbol-name symbol))
		   (choice (ilisp-completer 
			    symbol 
			   (if (not mode) (car (cdr symbol-info)))))
		   (match (lisp-buffer-symbol (car choice)))
		   (lcs (lisp-buffer-symbol (car (cdr choice))))
		   (choices (car (cdr (cdr choice))))
		   (unique (car (cdr (cdr (cdr choice))))))
	      (skip-chars-backward " \t\n")
	      (completer-goto match lcs choices unique 
			      (ilisp-value 'ilisp-symbol-delimiters)
			      completer-words))))
	(message "Completed"))))


;;; ilisp-pathname-complete --
;;; Incomplete :) function.  You are most welcome to provide an
;;; implementation complying with the IIR #1 appeared on ILISP@CONS.ORG.
;;; 19990709 Marco Antoniotti

(defun ilisp-pathname-complete ()
  "Completes the filename, trying to translate LOGICAL-PATHNAMES as well."
  (let ((maybe-logical-pathname-p (save-excursion
				    (skip-chars-backward "^ :\t\n")
				    (= (char-after (point)) ?\:)))
	)
    (if (not maybe-logical-pathname-p)
	(comint-dynamic-complete)
	())))

;;; end of file -- ilisp-cmp.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-cmt.el0000600000175000001440000000451207556232575016021 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-cmt.el --
;;; ILISP comint interface code.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-cmt.el,v 1.3 2002/10/25 12:13:49 kevinrosenberg Exp $


;;;%Process interface
;;;%%Comint 
(defun ilisp-get-old-input ()
  "Snarf the sexp starting at the nearest previous prompt, or NIL if none."
  (save-excursion
    (let* ((begin (lisp-defun-begin))
	   (pmark (process-mark (get-buffer-process (current-buffer))))
	   (once (if (< (point) pmark)
		     (save-excursion (end-of-line) (point))))
	   (end nil)
	   (done nil))
      (condition-case ()
	  (while (and (not done) (< (point) (point-max)))
	    (forward-sexp)
	    (setq end (point))
	    (skip-chars-forward " \t\n")
	    (if (and once (>= (point) once)) (setq done t)))
	(error (setq end nil)))
      (if end (buffer-substring-no-properties begin end)))))

;;;
(defun ilisp-input-filter (str)
  "Don't save anything matching ilisp-filter-regexp or less than
ilisp-filter-length long."
  (and (not (string-match ilisp-filter-regexp str))
       (> (length str) ilisp-filter-length)))

;;;
(defun ilisp-error-filter (output)
  "Keep from OUTPUT only what matches ilisp-error-regexp or everything
if there is no match."
  (if (string-match (ilisp-value 'ilisp-error-regexp) output)
      (substring output (match-beginning 0) (match-end 0))
      output))



(defun newline-and-indent-lisp ()
  "If at the end of the buffer, send the string back to the process
mark with no newline.  Otherwise, insert a newline, then indent.  In
an ilisp buffer the region is narrowed first.  See newline-and-indent
for more information."
  (interactive "*")
  (if ilisp-complete
      (exit-minibuffer)
      (let (input)
	(if (and (= (point) (point-max)) 
		 (memq major-mode ilisp-modes)
		 (setq input (ilisp-get-old-input)))
	    (let ((process (ilisp-process))
		  (comint-send-newline (not comint-send-newline)))
	      (funcall comint-input-sender process input)
	      (set-marker (process-mark process) (point)))
	    (save-restriction
	      (if (memq major-mode ilisp-modes)
		  (narrow-to-region (save-excursion (lisp-input-start))
				    (point-max)))
	      (newline-and-indent))))))

ilisp-5.12.0+cvs.2004.12.26/ilisp-cmu.el0000600000175000001440000000715207642642411016013 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-cmu.el --
;;; ILISP CMU Common Lisp dialect definition
;;;
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-cmu.el,v 1.6 2003/04/02 01:56:20 rgrjr Exp $

(defvar cmulisp-source-directory-regexp 
  "\\/afs\\/cs\\.cmu\\.edu\\/project\\/clisp\\/src\\/[0-9]*\\/"
  "*Regexp to match cmulisp source code directory.")

(defvar cmulisp-local-source-directory
  nil
  "*Where the cmulisp sources really are.")

(defvar ilisp-cmulisp-init-file "cmulisp")

(defun cmulisp-source-directory-fixup-function ()
  (if cmulisp-local-source-directory
      (replace-match cmulisp-local-source-directory)))

(defun cmulisp-check-prompt (old new)
  "Compare the break level printed at the beginning of the prompt."
  (let* ((was-in-break (and old (string-match "]+" old)))
 	 (old-level (if was-in-break
 			(- (match-end 0) (match-beginning 0))
 			0))
 	 (is-in-break (string-match "]+" new))
 	 (new-level (if is-in-break
 			(- (match-end 0) (match-beginning 0))
 			0)))
    (<= new-level old-level)))

;;;
(defdialect cmulisp "CMU Common LISP"
  common-lisp
  (ilisp-load-init 'cmu ilisp-cmulisp-init-file)
  (ilisp-load-init 'new-edit-definitions "find-src")
  (if cmulisp-local-source-directory
      (setq ilisp-source-directory-fixup-alist
	    (list 
	     (cons cmulisp-source-directory-regexp
		   cmulisp-local-source-directory)))
    (message "cmulisp-local-source-directory not set."))
  (setq comint-prompt-regexp "^\\([0-9]+\\]+\\|\\*\\|[-a-zA-Z0-9]*\\[[0-9]+\\]:\\) "
	ilisp-trace-command "(ilisp:cmulisp-trace \"%s\" \"%s\" \"%s\")"
	comint-prompt-status 
	(function (lambda (old line)
		    (comint-prompt-status old line 'cmulisp-check-prompt)))

	ilisp-error-regexp "ILISP:[^\"]*\\|Error [^\n]*\n\n"
	;; The above regexp has been suggested by
	;; hunter@work.nlm.nih.gov (Larry Hunter)


	;; 19991219 Marco Antoniotti
	;; Changed the very low level call to ARGLIST to the more
	;; sophisticated ILISP-ARGLIST.

	;; ilisp-arglist-command "(ilisp:arglist \"%s\" \"%s\")"
	ilisp-arglist-command "(ilisp:ilisp-arglist \"%s\" \"%s\")"

        ilisp-directory-command "(namestring (ext:default-directory))"
        ilisp-set-directory-command "(setf (ext:default-directory) \"%s\")"

	ilisp-find-source-command "(ilisp::source-file %S %S %S)"

	comint-fix-error ":pop"

	comint-continue ":go"

	ilisp-reset ":q"

	comint-interrupt-regexp "Interrupted at"

	;; Note:
	;; 19990920
	;; The global definition should now take care to find out the
	;; proper extension.  See file 'ilisp-cl.el'.
	;;
	;; 19990806 Marco Antoniotti
	;; As Martin Atzmueller has pointed out, these hardcoded
	;; constraints are very nasty.
	;; However, before hacking the code right here, I'd like to
	;; see an all-out solution to the binary file extension problem.

	;; ilisp-binary-extension "sparcf"
	;; ilisp-init-binary-extension "sparcf"
	;; ilisp-binary-command "\"sparcf\""
	)

  ;; ILD Support

  (setq ild-abort-string ":abort"
	ild-continue-string ":go"
	ild-step-string ":step"
	ild-step-string-arg nil
	ild-next-string ":down"
	ild-next-string-arg nil		; needs work
	ild-previous-string ":up"
	ild-previous-string-arg nil	; needs work
	ild-top-string ":bottom"
	ild-bottom-string ":top"
	ild-backtrace-string ":backtrace"
	ild-locals-string ":l"
	ild-local-string-arg "(debug:arg %s)"
	ild-return-string nil		; needs work (debug:debug-return x)
	ild-retry-string nil		; needs work
	ild-trap-on-exit-string nil	; needs work
	)
  )

;;; end of file -- ilisp-cmu.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-def.el0000600000175000001440000004372307542765322015777 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-def.el --
;;; ILISP defvar's
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-def.el,v 1.20 2002/09/21 03:00:07 rgrjr Exp $

;;;%Variables
;;;%%Deflocal
(defvar ilisp-locals '(comint-prompt-regexp 
		       input-ring-size
		       comint-get-old-input
		       comint-input-sentinel
		       comint-input-filter
		       comint-input-sender
		       comint-eol-on-send
		       comint-send-newline
		       comint-always-scroll
		       comint-fix-error
		       comint-continue
		       comint-interrupt-regexp
		       comint-error-regexp
		       comint-output-filter
		       comint-interrupt-start
		       comint-handler
		       comint-update-status
		       comint-prompt-status
		       comint-abort-hook
		       comint-use-prompt-regexp-instead-of-fields)
  "List of ilisp local variables.")

(defun lisp-deflocal (local)
  (unless (memq local ilisp-locals)
    (setq ilisp-locals (cons local ilisp-locals))))


;;;
(defmacro deflocal (variable default &optional documentation)
  "Define an ilisp local variable."
  (` (progn (lisp-deflocal '(, variable))
	    (defvar (, variable) (, default) (, documentation)))))

;;;%%Simple customization

(defcustom ilisp-*prefix*
  (if (and (boundp 'ilisp-*use-fsf-compliant-keybindings*)
           ilisp-*use-fsf-compliant-keybindings*)
      "\C-c"
      "\C-z")
  "Prefix sequence for ilisp commands.")


(deflocal ilisp-program nil
  "*Program and arguments for invoking an inferior LISP.
The program can be an rsh to run on a remote machine.  If there is not
a common file system, the interface files will be sent down the pipe
instead.  The value of this variable is set from DIALECT-program, or
inherited from a less specific dialect if DIALECT-program is nil.")

(defvar ilisp-motd 
  "ILISP V%s  Use M-x ilisp-bug for problems and suggestions."
  "*Message of the day format string for ILISP given VERSION. To
prevent any message from being printed, set this to nil.")

(defvar lisp-wait-p nil
  "*T if LISP eval/compile commands should wait for the result.
A minus prefix to the command will change the sense of this switch
for just the next command.")

(defvar lisp-no-popper 'message
  "*T if all output goes to the inferior LISP rather than in a pop-up window.
'(quote message) if you want output of one line to go to the echo area
(usually the Minibuffer) or to a pop-up window if more.  You should
probably also set comint-always-scroll to T as well so that output is
always visible.")

(defvar ilisp-*use-frame-for-output* t
  "*If T, ILISP uses a frame for its output, rather than a pop-up window.
The output going to the frame is usually multiline.  Single line
output usually goes to the echo area in the minibuffer. If no window
system is running then the value of this variable is ininfluent.")

(defcustom ilisp-*use-fsf-compliant-keybindings* nil
  "*If non-nil,  ILISP will use FSF Emacs compliant keybindings.

In brief, this means all ilisp-specific features will be bound to C-c
KEY, where KEY is a control character, a digit, or one of }, {, >, <,
:, or ;.  In some cases ilisp may rebind a regular Emacs key, if the
new binding does \"the same thing\" as the original binding but in a
way more appropriate for ilisp."
  :type     'boolean
  :version  "20.5"
  :group    'ILisp-interaction
  ;; note: custom-ilisp.el is not loaded yet, so I'm just getting
  ;; ready for the future by specifying a group above.
  )

(defvar lisp-show-status t 
  "*Set to nil to stop showing process status in lisp-mode buffers.")

(defvar ilisp-*prefix-match* nil
  "*If T, when completing through the inferior LISP matches only as a prefix.
This will speed up completion, but you no longer get partial
completion.")

(defvar ilisp-*process-connection-type* nil
  "*Control type of device used to communicate with the inferior LISP.
This is the value of `process-connection-type' used by ILISP buffers.
The default is nil, i.e., use a pipe, so that \"strings can be long\".  On
some systems, it should be set to t, i.e., use a pseudo terminal, or
signalling would not work right.")

(deflocal ilisp-filter-regexp nil
  "*What not to save on an inferior LISP's input history.
Input matching this regexp is not saved on the input history in ilisp
mode.")

(deflocal ilisp-filter-length 3
  "*Do not save strings less than this in the command history.")

(deflocal ilisp-other-prompt nil
  "*Regexp to recognise \"other\" prompts in the inferior LISP.
These 'prompts' are those of non-(read/eval/print) top-levels that
bol-ilisp skips them.")

(deflocal ilisp-raw-echo nil
  "*Set this to T to cause echoing in raw keyboard mode.")

(deflocal ilisp-load-no-compile-query nil
  "*Set this to T to stop load querying about compile.")

;;;%%%Hooks
(defvar ilisp-site-hook nil
  "Hook for site customization of ilisp mode when it is loaded.")

(defvar ilisp-load-hook '()
  "Hook for customizing ilisp mode when it is loaded.")

(defvar ilisp-mode-hook '()
  "Hook for customizing ilisp mode.")

(defvar ilisp-init-hook nil
  "Hook of functions to call on first prompt in inferior LISP.")

(deflocal ilisp-init-hook-local nil
  "Local Hook of functions to call on first prompt in inferior LISP.")

;;;%%Advanced customization
;;;%%%Commands
(deflocal ilisp-reset nil
  "String for resetting the top-level of the inferior LISP.")

(deflocal ilisp-load-or-send-command nil
  "Format string for loading BINARY if possible otherwise loading FILE.
If you can't load either, return NIL.")

(deflocal ilisp-hash-form-regexp nil
  "Regular expression for finding a package specification in a buffer.
The entire sexp starting with this pattern will be passed to
ilisp-package-command to find the package.")

(deflocal ilisp-in-package-command-string nil
  "Regular expression for finding a command that makes some package active.")

(deflocal ilisp-defpackage-command-string nil
  "Regular expression for finding a command that defines a package.")

(deflocal ilisp-package-separator-regexp nil
  "Regular expression that matches the package separator.")

(deflocal ilisp-package-command nil
  "Format string to find the package given PACKAGE.")

(deflocal ilisp-package-name-command nil
  "Format string to return the name of the current package.")

(deflocal ilisp-in-package-command nil
  "Format string to set the package given PACKAGE.")

(deflocal ilisp-last-command nil
  "Format string for getting the last returned value.")

(deflocal ilisp-save-command nil
  "Format string for saving result history given FORM.")

(deflocal ilisp-restore-command nil
  "Format string for restoring result history.")

(deflocal ilisp-block-command nil
  "Format string for grouping FORMS into one.")

(deflocal ilisp-no-package-in-core-regexp nil
  "Regexp that matches to ilisp-package-block-command's result in a
case when the package was not found in core.  Remember to set
`ilisp-fallback-package' too.")

(deflocal ilisp-fallback-package nil
  "Package name to be used when the buffer's real package cannot be found
from the core.")

(deflocal ilisp-eval-command nil
  "Format string for evaluating FORM in PACKAGE from FILE at LINE.")

(deflocal ilisp-defvar-regexp nil
  "Regular expression for identifying a defvar form.")

(deflocal ilisp-defvar-command nil
  "Format string for re-evaluating DEFVAR in PACKAGE from FILE at LINE.")

(deflocal ilisp-describe-command nil
  "Format string for describing FORM in PACKAGE.")

(deflocal ilisp-compile-command nil
  "Format string for compiling FORM in PACKAGE.")

(deflocal ilisp-inspect-command nil
  "Format string for inspecting FORM in PACKAGE.")

(deflocal ilisp-arglist-command nil
  "Format string for arglist of SYMBOL in PACKAGE.")

(deflocal ilisp-documentation-types nil
  "((\"type\") ...) possible LISP documentation types.")

(deflocal ilisp-documentation-command nil
  "Format string for documentation given SYMBOL in PACKAGE and TYPE.")

(deflocal ilisp-macroexpand-1-command nil
  "Format string for top-level macroexpand given FORM and PACKAGE.")

(deflocal ilisp-macroexpand-command  nil
  "Format string for macroexpand given FORM and PACKAGE.")

(deflocal ilisp-complete-command nil
  "Format string for finding possibly matching symbols.
Given SYMBOL, PACKAGE, FUNCTIONP, EXTERNALP and PARTIAL-MATCHP, it
should print '((string) (string) ...)'.")

(deflocal ilisp-callers-command nil
  "Format for finding the callers of SYMBOL in PACKAGE.
The function should print out callers with one per line.")

(deflocal ilisp-trace-command nil
  "Format for tracing SYMBOL in PACKAGE.")
(deflocal ilisp-untrace-command nil
  "Format for untracing SYMBOL in PACKAGE.")

(deflocal ilisp-directory-command nil
  "Format for getting default DIRECTORY.")
(deflocal ilisp-set-directory-command nil
  "Format for setting default DIRECTORY.")

(deflocal ilisp-binary-command nil
  "Command to return the extension for binary files.")

(deflocal ilisp-binary-extension nil
  "*The extension to use for LISP binaries.
If there is an ilisp-binary-command, this string will be determined at
initialization time.")

(deflocal ilisp-init-binary-command nil
  "Command to return the extension for initialization binary files.")

(deflocal ilisp-init-binary-extension nil
  "The extension for initialization binary files.
If there is an ilisp-init-binary-command, this string will be
determined at initialization time.")

(deflocal ilisp-load-command nil
  "Format string for loading a file in LISP given FILE.")

(deflocal ilisp-compile-file-command nil
  "Format string for compiling a file in LISP given FILE and EXTENSION.")

(deflocal ilisp-print-info-message-command nil
  "Format string for printing argument list information etc. given a STRING.")

;;;%%%%Source
(deflocal ilisp-source-types nil
  "Alist of strings for source types.
The strings can be either symbols or list expressions since the input
accepts symbols or open ended lists as type specifiers.")

(deflocal ilisp-find-source-command nil
  "Format string for finding the source file that defined SYMBOL in PACKAGE.
It should return NIL if no source is found.")

(deflocal ilisp-locator nil
  "Function that finds the next SYMBOL TYPE definition in the current buffer.
The complete argument list is \(SYMBOL TYPE FIRST-P BACK-P): FIRST-P
is T the first time it is called in a buffer.  BACK-P is T to move
backwards.")

(deflocal ilisp-calls-locator nil
  "Function  that finds calls to SYMBOL in the current buffer.
The complete argument list is \(SYMBOL TYPE FIRST-P BACK-P )FIRST-P is
T the first time it is called in a buffer.  BACK-P is T to move
backwards.")

(deflocal ilisp-source-directory-fixup-alist
    nil
  "*Alist of matchers to be used in conjuction with 'edit-definition-alist'.
The elements of the alist have the form (REGEXP . FIXUP-FUNCTION)
which will be applied to lists of source filenames to be used with
'edit-definitions-list'.  FIXUP-FUNCTION takes no arguments and should
use replace-match to fix the filenames.")


;;;%%%Misc
(deflocal ilisp-use-map nil "Keymap to use in ILISP mode.")

(defvar ilisp-bugs-to "ilisp@cons.org" "Who to send bug reports to.")

(defvar ilisp-modes '(ilisp-mode) "List of all inferior ilisp modes.")

(defvar lisp-source-modes '(lisp-mode scheme-mode)
  "Used to determine if a buffer contains Lisp source code.
If it's loaded into a buffer that is in one of these major modes, it's
considered a lisp source file by find-file-lisp, load-file-lisp and
compile-file-lisp. Used by these commands to determine defaults.")

(deflocal ilisp-no-newline nil
  "Set to T to stop ilisp from inserting a newline after a command.")

(deflocal ilisp-error-filter nil "Function to filter error output.")

(deflocal ilisp-error-regexp nil "Regular expression to match error.")

(deflocal ilisp-symbol-delimiters nil
  "Delimiters found around symbols.")

;;;%%Program
(defvar ilisp-completion-map nil "Keymap for reading ilisp readers.")

(defvar ilisp-epoch-running (and (boundp 'epoch::version) epoch::version)
  "Non-nil if epoch is running.")

(defvar ilisp-*version*
  "5.12.0" ;; ILISP-VERSION marker
  "ILISP version.")

(defvar ilisp-*directory* nil "The directory that ilisp is found in.")

(defvar ilisp-mode-map nil "Key map for ILISP.")

(defvar ilisp-raw-map  nil
  "Keyboard map for sending characters directly to the inferior LISP.")

(defvar ilisp-raw-message "Raw keyboard mode until C-g"
  "Message for how to stop raw mode.")

(defvar ilisp-buffer nil "Name of selected ilisp buffer.")

(defvar ilisp-status nil "Status string for selected ilisp buffer.")

(defvar ilisp-buffers nil "List of ILISP buffers.")

(defvar ilisp-dialects nil "List of ILISP dialects.")

(deflocal ilisp-load-inits nil
  "Alist of dialect files to load when initializing an inferior LISP.
By default the file will be loaded from the ilisp-directory.")

;;; This is useful to have a clause in ilisp code like:
;;; (if (memq 'allegro (ilisp-value 'ilisp-dialect)) 
;;;     allegro-code
;;;     normal-code)
(deflocal ilisp-dialect nil
  "List of the dialects that defined the current inferior LISP.")

(defvar ilisp-initialized nil
  "List of buffer names that have been initialized.")

(deflocal ilisp-initializing nil
  "Set to T while waiting for inferior LISP to get initialized.")

(deflocal ilisp-load-files nil "List of files being loaded.")

(defvar lisp-changes nil
  "List of markers for changed forms.")

(deflocal ilisp-pending-changes nil
  "List of changes that are pending, but have not been confirmed yet.")

;;;%%%Completion
;;; Dynamically bound variables for controlling reading

(defvar ilisp-complete nil "T if in minibuffer completion mode.")

(defvar ilisp-no-complete nil "T if incomplete symbols are allowed.")

(defvar ilisp-table nil "Completion table for ilisp readers.")

(defvar ilisp-paren nil "T if paren is allowed in ilisp readers.")

(defvar ilisp-completion-package nil 
  "Package of buffer requesting completion.")

(defvar ilisp-completion-function-p nil
  "T if only symbols with function values are allowed.")

;;; State variables for ilisp reading

(defvar ilisp-mini-prefix nil "Package and qualification from minibuffer.")

(defvar ilisp-original nil "Original string for ilisp completion.")

(defvar ilisp-original-function-p nil "Function-p for ilisp completion.")

(defvar ilisp-original-table nil "Completion table for ilisp-original.")

;;;%Buffer
;;;%Packages

(defvar buffer-package 'not-yet-computed "Cached package name.")

(defvar buffer-mode-name nil "Original mode name.")

(defvar lisp-buffer-package nil "T if in lisp-buffer-package.")

(defvar lisp-dont-cache-package nil 
  "If Non-Nil then refind the most recent in-package each time.")

;;;%Globals from ilisp-ext.el
;;;

(defvar ilisp-ext-load-hook nil "Hook to run when extensions are loaded.")

(defvar left-delimiter "\(" "*Left delimiter for find-unbalanced.")

(defvar right-delimiter "\)" "*Right delimiter for find-unbalanced.")

(defvar lisp-fill-marker (make-marker)
  "Keeps track of point so that it does not move during a reindent-lisp.")

(defvar ilisp-comment-marker (make-marker)
  "Marker for end of a comment region.")

(defvar ilisp-last-message nil)

(defvar ilisp-last-prompt nil)

(defvar lisp-prev-l/c-dir/file nil
  "Saves the (directory . file) pair used in the last file handling command.
A \"file handling command\" may be 'find-file-lisp', 'load-file-lisp'
or 'compile-file-lisp' command. Used for determining the default in
the next one.")

(defvar ilisp-last-buffer nil
  "The last used LISP buffer.")


;;; ilisp-bindings-*bind-right-bracket-p*

(defcustom ilisp-bindings-*bind-right-bracket-p*
  nil
  "If non-nil the key ']' will be bound to #'close-all-lisp."
  :group 'ILisp-interaction)

;;; ilisp-bindings-*bind-space-p*
(defcustom ilisp-bindings-*bind-space-p*
  t
  "If non-nil the 'SPACE' key will be bound to #'ilisp-arglist-message-lisp-space."
  :group 'ILisp-interaction)

;;; ilisp-arglist-message-space-lisp --
;;;
;; 19990806 Martin Atzmueller

(defvar ilisp-*arglist-message-lisp-space-p* t
  "If T display the arglist or value of a function/symbol after a #\\Space.
Set to 'all if you want the arglist or value of a function/symbol
to be printed.")

(defvar ilisp-*arglist-message-switch-back-p* nil
  "If T, the edited buffer is selected after the arglist has been displayed.")

(defvar ilisp-*use-frame-for-arglist-output-p* t
  "If T, ILISP uses a distinct frame for its arglist output.
Otherwise ILISP uses the default 'lisp-display-ouput'.
The output going to the frame is usually multiline. If no window
system is running then the value of this variable is ininfluent.
Default is T.

Note: this can be set once before startup. Changing this after startup
will not have any effect! This effectively means, that this variable
must be set here. It relies on ilisp-*use-frame-for-output*, too.
Only if both are t the output will be sent to a frame.")

(defvar ilisp-*enable-ilisp-special-frame-p* nil
  "If T, the ILISP inferior lisp buffer-name will be in
special-display-buffer-names; therefore the lisp-interaction buffer
will be in a 'special' seperate frame.")

(defvar ilisp-*enable-imenu-p* t
  "Enables/disables loading/use of IMENU.
It  provides for a index of all functions in a file. Default is T.")


;;; ilisp-enable-easy-menu-p --
;;;
;; 19990806 Martin Atzmueller

(defvar ilisp-*enable-cl-easy-menu-p* t
  "Set to t if you want the new (and better!) menu for ILISP CL.")

(defvar ilisp-*enable-scheme-easy-menu-p* nil
  "Set to t if you want the new (and better!) menu for ILISP Scheme.")


;;; ilisp-*enable-ild-support-p*
;;; 19990818 Marco Antoniotti

(defvar ilisp-*enable-ild-support-p* t
  "Enables/disables loading of ILD package by J. M. Siskind.
Default is T.")


;;; ilisp-*use-hyperspec-interface-p*
;;; 19990820 Marco Antoniotti

(defvar ilisp-*use-hyperspec-interface-p* t
  "Enables/disables loading of the 'hyperspec' module provided with ILISP.
Default is T.")

(defvar ilisp-*use-fi-clman-interface-p* nil
  "Enables/disables use of Franz Inc's 'fi:clman' module.
Default is NIL.")

(defvar ilisp-*use-cltl2-interface-p* t
  "Enables/disables loading of the CLtL2 lookup module provided with ILISP.
Default is T.")

;;; end of file -- ilisp-def.lisp --
ilisp-5.12.0+cvs.2004.12.26/ilisp-dia.el0000600000175000001440000001720007424243021015747 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-dia.el --
;;; ILISP Dialect definition code.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-dia.el,v 1.7 2002/01/25 11:48:33 mkoeppe Exp $


;;;%%CUSTOMIZING DIALECTS
;;;
;;; ILISP is already set up with support for a number of dialects.
;;; Each dialect has a command NAME that will start an inferior LISP
;;; of that dialect.  NAME-hook is a hook that will run after the
;;; default settings for NAME are set up.  NAME-program is the default
;;; program for NAME. A prefix when starting a dialect will cause you
;;; to be prompted for the buffer name and the program.  When setting
;;; something in a hook, you should use the most general dialect that
;;; makes sense. Dialect definitions and their hooks are executed from
;;; least specific to most specific.  They will be executed before the
;;; inferior LISP is started.
;;;
;;; These are the currently supported dialects.  The dialects
;;; are listed so that the indentation correponds to the hierarchical
;;; relationship between dialects.
;;; common-lisp
;;;   allegro
;;;   clisp     (Haible and Stoll)
;;;   lispworks (Harlequin)
;;;   lucid
;;;   cmulisp
;;;   sbcl    (really a derivative of CMUCL)
;;;   kcl
;;;     akcl
;;;     ibcl
;;;     ecl
;;;     gcl
;;;   openmcl
;;; scheme
;;;   oaklisp
;;;   Scheme->C (still "in fieri")
;;;   scm
;;;   chez (Chez Scheme)
;;;   stk
;;;     snow (stk without Tk)
;;;   guile (yep! Here it comes. Still incomplete though)
;;;
;;; If anyone figures out support for other dialects I would be happy
;;; to include it in future releases.
;;;
;;; ;;; Example of local changes and extensions to ilisp mode
;;; (setq ilisp-load-hook
;;;       '(lambda ()
;;;         ;; Change the allegro lisp program
;;;         (setq allegro-program "/usr/misc/bin/lisp")
;;;         ;; Add a new key binding
;;;         (defkey-ilisp "\C-\M-a" 'arglist-lisp)
;;;         ;; Define a new subdialect to run on another machine.
;;;         (defdialect cmlisp "Connection Machine LISP."
;;;           lucid
;;;           (setq ilisp-program
;;;            "rsh power /usr/local/cm/bin/starlisp"))))
;;;
;;; ;;; Automatically load a new subdialect
;;; (autoload 'cmlisp "ilisp" "Run an inferior CM lisp." t)
;;;
;;; To define a new dialect use the macro defdialect.  For examples,
;;; look at the dialect definitions in this file.  There are hooks and
;;; variables for almost anything that you are likely to need to
;;; change.  The relationship between dialects is hierarchical with
;;; the root values being defined in setup-ilisp.  For a new dialect,
;;; you only need to change the variables that are different than in
;;; the parent dialect.


;;;
;;; ILISP dialect definition code.
;;;

(require 'cl)

;;;%Dialects
(defun lisp-add-dialect (dialect)
  "Add DIALECT as a supported ILISP dialect."
  (when (not (member* dialect ilisp-dialects :key #'car :test #'equal))
    (setq ilisp-dialects
	  (cons (list dialect) ilisp-dialects))))

;;;
(defun ilisp-start-dialect (buffer program setup)
  ;; Allow dialects to be started from command line
  (when (eq current-prefix-arg 0)
    (setq current-prefix-arg nil))
  (setq ilisp-last-buffer (current-buffer)
	buffer (if current-prefix-arg
		   (read-from-minibuffer "Buffer: " buffer)
		   buffer))
  (funcall setup buffer)
  (setq ilisp-program
	(or program 
	    (if current-prefix-arg
		(lisp-read-program "Program: " ilisp-program)
		ilisp-program)))
  (ilisp buffer setup))

;;;
(defmacro defdialect (dialect full-name parent &rest body)
  "Define a new ILISP dialect.
DIALECT is the name of the function to invoke the inferior LISP. The
hook for that LISP will be called DIALECT-hook.  The default program
will be DIALECT-program.  FULL-NAME is a string that describes the
inferior LISP.  PARENT is the name of the parent dialect."

  (let ((setup (read (format "setup-%s" dialect)))
	(hook (read (format "%s-hook" dialect)))
	(program (read (format "%s-program" dialect)))
	(dialects (format "%s" dialect)))
    (`
     (progn
       (defvar (, hook) nil (, (format "*Inferior %s hook." full-name)))
       (defvar (, program) nil
	 (, (format "*Inferior %s default program." full-name)))
       (defun (, setup) (buffer)
	 (, (format "Set up for interacting with %s." full-name))
	 (, (read (format "(setup-%s buffer)" parent)))
	 (,@ body)
	 (setq ilisp-program (or (, program) ilisp-program)
	       ilisp-dialect (cons '(, dialect) ilisp-dialect))
	 (run-hooks '(, (read (format "%s-hook" dialect)))))
       (defun (, dialect) (&optional buffer program)
	 (, (format "Create an inferior %s.  With prefix, prompt for buffer and program."
		   full-name))
	 (interactive (list nil nil))
	 (ilisp-start-dialect (or buffer (, dialects)) 
			      program 
			      '(, setup))
	 (setq (, program) ilisp-program))
       (lisp-add-dialect (, dialects))))))

;;;%%ilisp
(defun setup-ilisp (buffer)
  "Set up for interacting with an inferior LISP."
  (set-buffer (get-buffer-create "*ilisp-send*"))
  (kill-all-local-variables)
  (lisp-mode)
  (setq ilisp-buffer (format "*%s*" buffer))
  (when ilisp-*enable-ilisp-special-frame-p*
    (push ilisp-buffer special-display-buffer-names))
  (set-buffer (get-buffer-create ilisp-buffer))
  (setq major-mode 'ilisp-mode
	mode-name "ILISP")
  (lisp-mode-variables t)

  ;; Set variables to nil
  (let ((binary ilisp-binary-extension)
	(init ilisp-init-binary-extension)
	(vars ilisp-locals))
    (dolist (var vars)
      (make-local-variable var)
      (set var nil))

    ;; Preserve from initialization
    (when binary (setq ilisp-binary-extension binary))
    (when init (setq ilisp-init-binary-extension init)))
  ;; Comint defaults
  (set-ilisp-input-ring-size 200)
  (setq comint-prompt-regexp "^[^<> ]*>+:? *"
	comint-use-prompt-regexp-instead-of-fields t ; Emacs 21 fields don't seem to work with comint-ipc (?)
	comint-get-old-input 'ilisp-get-old-input
	comint-input-sentinel (function ignore)
	comint-input-filter 'ilisp-input-filter
	comint-input-sender 'comint-default-send
	comint-eol-on-send t)

  ;; Comint-ipc defaults
  (setq comint-send-newline t
	comint-always-scroll nil
	comint-output-buffer " *Output*"
	comint-error-buffer " *Error Output*"
	comint-error-regexp "^\"ILISP:"
	comint-output-filter (function identity)
	comint-interrupt-start 'comint-interrupt-start
	comint-handler 'ilisp-handler
	comint-update-status 'ilisp-update-status
	comint-prompt-status 'comint-prompt-status
	comint-abort-hook 'ilisp-abort-handler)

  (setq ilisp-use-map ilisp-mode-map
	ilisp-init-hook-local '((lambda ()
                                  (ilisp-init nil nil t)
                                  (run-hooks 'ilisp-init-hook)))
	ilisp-filter-regexp "\\`\\s *\\(:\\(\\w\\|\\s_\\)*\\)?\\s *\\'"
	ilisp-filter-length 3
	ilisp-error-filter 'ilisp-error-filter
	ilisp-error-regexp ".*" 

	;; 20000216 Marco Antoniotti
	;; Removed the 'dot' (.) from the set of symbol delimiters.
	;; This allows the correct handling of symbols like
	;; CL.ENV:*OS*.
	;; The relevant code is in 'lisp-previous-symbol' et al. in
	;; 'ilisp-snd.el'.
	;; ilisp-symbol-delimiters "^ \t\n\('\"#.\)<>"
	ilisp-symbol-delimiters "^ \t\n\('\"#\)<>"
	ilisp-program "lisp"
	ilisp-locator 'lisp-locate-ilisp
	ilisp-calls-locator 'lisp-locate-calls)

  (run-hooks 'ilisp-mode-hook))


(defun run-ilisp ()
  "Create an inferior LISP prompting for dialect.
With prefix, prompt for buffer name as well."
  (interactive)
  (let ((dialect (completing-read "Dialect: " ilisp-dialects nil t)))
    (if (not (zerop (length dialect)))
	(call-interactively (read dialect)))))


;;; end of file -- ilisp-dia.lisp --
ilisp-5.12.0+cvs.2004.12.26/ilisp-doc.el0000600000175000001440000005145507307417542016004 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-doc.el --
;;; ILISP mode documentation
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-doc.el,v 1.5 2001/06/06 12:17:38 mna Exp $

(defconst ilisp-documentation
  "Major mode for interacting with an inferior Lisp process.  Runs a
Lisp interpreter as a subprocess of Emacs, with Lisp I/O through an
Emacs buffer.  If you have problems, use `M-x ilisp-bug' in the buffer
where you are having a problem to send a bug report.

To start a Lisp use `M-x run-ilisp', or a specific dialect like `M-x
allegro'.  If called with a prefix you will be prompted for a buffer
name and a program to run.  The default buffer name is the name of the
dialect.  The default program for a dialect will be the value of
`DIALECT-program' or the value of `ilisp-program' inherited from a
less specific dialect.  If there are multiple Lisp's, use the dialect
name or `select-ilisp' \(\\[select-ilisp]) to select the current ILISP
buffer.

Currently supported Lisp dialects include (some of them may be only
partially supported):
 common-lisp
   allegro
   clisp-hs
   cmulisp
   kcl
     akcl
       gcl
       ecl
     ibcl
   lispworks
   lucid
     liquid
   sbcl
 scheme
   chez
   guile
   oaklisp
   Scheme->C
   scm
   snow
   stk
 xlisp
   xlispstat

Customization: Starting a dialect runs the hooks on `comint-mode-hook'
and `ilisp-mode-hook' and then `DIALECT-hook's specific to dialects in
the nesting order above.  On the very first prompt in the inferior
Lisp, the hooks on `ilisp-init-hook' are run.  For more information on
creating a new dialect or variables to set in hooks, see ilisp.el.

Most of these key bindings work in both Lisp Mode and ILISP mode.
There are a few additional and-go bindings found in Lisp Mode.
\\{ilisp-use-map}
There are also a few bindings found in global-map including:
  \\[ilisp-bury-output] `ilisp-bury-output'
  \\[ilisp-scroll-output] `ilisp-scroll-output'
  \\[previous-buffer-lisp] `previous-buffer-lisp'
  \\[switch-to-lisp] `switch-to-lisp'

ILISP has a very flexible means for displaying output from the
underlying lisp.  All output is funneled through the function bound to
`ilisp-display-output-function'.  That function gets a single
argument, the string to display, and should make it visible to the
user.  The default display function, `ilisp-display-output-default',
displays one-line output in the echo area and longer output in a
shrink-wrapped typeout window.  This typeout window can be manipulated
with \\[ilisp-bury-output] `ilisp-bury-output',
\\[ilisp-scroll-output] `ilisp-scroll-output', and
\\[ilisp-grow-output] `ilisp-grow-output'.

An alternative to typeout windows is to always have the inferior Lisp
buffer visible and have all output go there.  If your are using the
default display function, then setting `lisp-no-popper' to t will
cause all output to go to the inferior Lisp buffer.  Setting
`comint-always-scroll' to t will cause process output to always be
visible.  If a command gets an error, you will be left in the break
loop.

Here are the supplied display functions:
 `ilisp-display-output-default'
 `ilisp-display-output-adaptively'
 `ilisp-display-output-in-echo-area'
 `ilisp-display-output-in-typeout-window'
 `ilisp-display-output-in-lisp-listener'

Each ILISP buffer has a command history associated with it.  Commands
that do not match `ilisp-filter-regexp' and that are longer than
`ilisp-filter-length' and that do not match the immediately prior
command will be added to this history.  `comint-previous-input'
\(\\[comint-previous-input]) and `comint-next-input'
\(\\[comint-next-input]) cycle through the input history.
`comint-previous-similar-input' \(\\[comint-previous-similar-input])
cycles through input that has the string typed so far as a prefix.

See `comint-mode' documentation for more information on comint
commands.

A number of commands refer to \"defun\".  A \"defun\" is a list that
starts at the left margin in a Lisp buffer, or after a prompt in the
ILISP buffer.  So the commands refer to the \"defun\" that contains
point.

There are two keyboard modes for interacting with the inferior Lisp,
\"interactive\" and \"raw\".  Normally you are in interactive mode
where keys are interpreted as commands to Emacs and nothing is sent to
the inferior Lisp unless a specific command does so.  In raw mode, all
characters are passed directly to the inferior Lisp without any
interpretation as Emacs commands.  Keys will not be echoed unless
`ilisp-raw-echo' is t.  Raw mode can be turned on interactively by
`raw-keys-ilisp' \(\\[raw-keys-ilisp]) and will continue until you
type \\[keyboard-quit].  Raw mode can also be turned on/off by
inferior Lisp functions if `io-bridge-ilisp' \(\\[io-bridge-ilisp])
has been executed in the inferior Lisp interactively or on a hook.  To
turn on raw mode, a function should print ^[1^] and to turn it off
should print ^[0^].

When you send something to Lisp, the status light will reflect the
progress of the command.  If you type top-level forms ahead of the
processing, the status may indicate ready when the Lisp is actually
running.  In a lisp mode buffer the light will reflect the status of
the currently selected inferior Lisp unless `lisp-show-status' is nil.
If you want to find out what command is currently running, use the
command `status-lisp' \(\\[status-lisp]).  If you call it with a
prefix, the pending commands will be displayed as well.

If you want to abort the last command you can use \\[keyboard-quit].
If you want to abort all commands, you should use the command
`abort-commands-lisp' \(\\[abort-commands-lisp]).  Commands that are
aborted will be put in the buffer *Aborted Commands* so that you can
see what was aborted.  If you want to abort the currently running
top-level command, use `interrupt-subjob-ilisp'
\(\\[interrupt-subjob-ilisp]).  As a last resort, \\[panic-lisp] will
reset the ILISP state without affecting the inferior Lisp so that you
can see what is happening.  If you become totally frustrated, you can
also try \\[repair-ilisp].

`bol-ilisp' \(\\[bol-ilisp]) will go after the prompt as defined by
`comint-prompt-regexp' or `ilisp-other-prompt' or to the left margin
with a prefix.

`return-ilisp' \(\\[return-ilisp]) knows about prompts and sexps.  If
an sexp is not complete, it will indent properly.  When an entire sexp
is complete, it is sent to the inferior Lisp together with a new line.
If you edit old input, the input will be copied to the end of the
buffer first.

`close-and-send-lisp' \(\\[close-and-send-lisp]) will close the
current sexp, indent it, then send it to the current inferior Lisp.

`indent-line-ilisp' \(\\[indent-line-ilisp]) indents for Lisp.  With
prefix, shifts rest of expression rigidly with the current line.

`newline-and-indent-lisp' \(\\[newline-and-indent-lisp]) will insert a
new line and then indent to the appropriate level.  If you are at the
end of the inferior Lisp buffer and an sexp, the sexp will be sent to
the inferior Lisp without a trailing newline.

`indent-sexp-ilisp' \(\\[indent-sexp-ilisp]) will indent each line in
the next sexp.

`backward-delete-char-untabify' \(\\[backward-delete-char-untabify])
converts tabs to spaces as it moves back.

`delete-char-or-pop-ilisp' \(\\[delete-char-or-pop-ilisp]) will delete
prefix characters unless you are at the end of an ILISP buffer in
which case it will pop one level in the break loop.

`reset-ilisp', \(\\[reset-ilisp]) will reset the current inferior
Lisp's top-level so that it will no longer be in a break loop.

`switch-to-lisp' \(\\[switch-to-lisp]) will pop to the current ILISP
buffer or if already in an ILISP buffer, it will return to the buffer
that last switched to an ILISP buffer.  With a prefix, it will also go
to the end of the buffer.  If you do not want it to pop, set
`pop-up-windows' to nil.

`call-defun-lisp' \(\\[call-defun-lisp]) will put a call to the
current defun in the inferior Lisp and go there.  If it is a \(def*
name form, it looks up reasonable forms of name in the input history
unless called with a prefix. If not found, \(name or *name* will be
inserted.  If it is not a def* form, the whole defun will be put in
the buffer.

`reposition-window-lisp' \(\\[reposition-window-lisp]) will scroll the
current window to show as much of the current defun and its
introductory comments as possible without moving the point.  If called
with a prefix, the point will be moved if necessary to show the start
of the defun.  If called more than once with the first line of the
defun showing, the introductory comments will be shown or suppressed.

`previous-buffer-lisp' \(\\[previous-buffer-lisp]) will switch to the
last visited buffer in the current window or the Nth previous buffer
with a prefix.

`find-unbalanced-lisp' \(\\[find-unbalanced-lisp]) will find
unbalanced parens in the current buffer.  When called with a prefix it
will look in the current region.

`close-all-lisp' \(\\[close-all-lisp]) will close all outstanding
parens back to the containing form, or a previous left bracket which
will be converted to a left parens.  If there are too many parens,
they will be deleted unless there is text between the last paren and
the end of the defun.  If called with a prefix, all open left brackets
will be closed.

`reindent-lisp' \(\\[reindent-lisp]) will reindent the current
paragraph if in a comment or string.  Otherwise it will close the
containing defun and reindent it.

`comment-region-lisp' \(\\[comment-region-lisp]) will put prefix
copies of `comment-start' before and `comment-end's after the lines in
region.  To uncomment a region, use a minus prefix.

The very first inferior Lisp command executed may send some forms to
initialize the inferior Lisp.

Each time an inferior Lisp command is executed, the last form sent can be
seen in the \*ilisp-send* buffer.

The first time an inferior Lisp mode command is executed in a Lisp
Mode buffer, the package will be determined by using the regular
expression `ilisp-hash-form-regexp' to find a package sexp and then
passing that sexp to the inferior Lisp through
`ilisp-package-command'.  For the CLISP dialect, this will find the
first \(in-package PACKAGE) form in the file.  A buffer's package will
be displayed in the mode line.  `set-buffer-package-lisp'
\(\\[set-buffer-package-lisp]) will update the current package from
the buffer.  If it is called with a prefix, the package can be set
manually.  If a buffer has no specification, forms will be evaluated
in the current inferior Lisp package.  `package-lisp'
\(\\[package-lisp]) will show the current package of the inferior
Lisp.  `set-package-lisp' \(\\[set-package-lisp]) will set the
inferior Lisp package to the current buffer's package or to a manually
entered package with a prefix.

`describe-lisp', `inspect-lisp', `arglist-lisp', `documentation-lisp',
`macroexpand-1-lisp', `macroexpand-lisp`, `edit-definitions-lisp',
`who-calls-lisp', `edit-callers-lisp' and `trace-defun-lisp' will
switch whether they prompt for a response or use a default when called
with a negative prefix.  If they are prompting, there is completion
through the inferior Lisp by using TAB or M-TAB.  When you are
entering an expression in the minibuffer, all of the normal ILISP
commands like `arglist-lisp' also work.

Commands that work on a function will use the nearest previous
function symbol.  This is either a symbol after a #' or the symbol at
the start of the current list.

`describe-lisp' \(\\[describe-lisp]) will describe the previous sexp.
`inspect-lisp' \(\\[inpsect-lisp]) will inspect the previous sexp.  If
there is no previous-sexp and you are in an ILISP buffer, the previous
result will be described or inspected.

`arglist-lisp' \(\\[arglist-lisp]) will return the arglist of the
current function.  With a numeric prefix, the leading paren will be
removed and the arglist will be inserted into the buffer.

`documentation-lisp' \(\\[documentation-lisp]) infers whether function
or variable documentation is desired.  With a negative prefix, you can
specify the type of documentation as well.  With a positive prefix the
documentation of the current function call is returned.

If the Franz online Common Lisp manual is available, and
`ilisp-*use-fi-clman-interface-p*' is set to t, `fi:clman'
\(\\[fi:clman]) will get information on a specific symbol.
`fi:clman-apropos' \(\\[fi:clman-apropos]) will get information
apropos a specific string.  Some of the documentation is specific to
the Allegro dialect, but most of it is for standard Common Lisp.

`macroexpand-lisp' \(\\[macroexpand-lisp]) and `macroexpand-1-lisp'
\(\\[macroexpand-1-lisp]) will be applied to the next sexp.  They will
insert their result into the buffer if called with a numeric prefix.

`complete-lisp' \(\\[complete-lisp]) will try to complete the previous
symbol in the current inferior Lisp.  Partial completion is supported
unless `ilisp-*prefix-match*' is set to t.  \(If you set it to t,
inferior Lisp completions will be faster.)  With partial completion,
\"p--n\" would complete to \"position-if-not\" in Common Lisp.  If the
symbol follows a left paren or a #', only symbols with function cells
will be considered.  If the symbol starts with a \* or you call with a
positive prefix all possible completions will be considered.  Only
external symbols are considered if there is a package qualification
with only one colon.  The first time you try to complete a string the
longest common substring will be inserted and the cursor will be left
on the point of ambiguity.  If you try to complete again, you can see
the possible completions.  If you are in a string, then filename
completion will be done instead.  And if you try to complete a
filename twice, you will see a list of possible completions.  Filename
components are completed individually, so /u/mi/ could expand to
/usr/misc/.  If you complete with a negative prefix, the most recent
completion \(symbol or filename) will be undone.

`complete' \(\\[complete]) will complete the current symbol to the
most recently seen symbol in Emacs that matches what you have typed so
far.  Executing it repeatedly will cycle through potential matches.
This is from the TMC completion package and there may be some delay as
it is initially loaded.

`trace-defun-lisp' \(\\[trace-defun-lisp]) traces the current defun.
When called with a numeric prefix the function will be untraced.

`trace-defun-lisp-break' \(\\[trace-defun-lisp-break]) traces the
current defun but sets a breakpoint in the function if possible.  When
called with a numeric prefix the function will be untraced.

`default-directory-lisp' \(\\[default-directory-lisp]\) sets the
default inferior Lisp directory to the directory of the current
buffer.  If called in an inferior Lisp buffer, it sets the Emacs
default-directory the Lisp default directory.

The eval/compile commands evaluate or compile the forms specified.  If
any of the forms contain an interactive command, then the command will
never return.  To get out of this state, you need to use
`abort-commands-lisp' \(\\[abort-commands-lisp]).  The eval/compile
commands verify that their expressions are balanced and then send the
form to the inferior Lisp.  If called with a positive prefix, the
result of the operation will be inserted into the buffer after the
form that was just sent.  If `lisp-wait-p' is t, then Emacs will
display the result of the command in the minibuffer or a pop-up
window.  If `lisp-wait-p' is nil, (the default) the send is done
asynchronously and the results will be brought up only if there is
more than one line or there is an error.  In this case, you will be
given the option of ignoring the error, keeping it in another buffer
or keeping it and aborting all pending sends.  If there is not a
command already running in the inferior Lisp, you can preserve the
break loop.  If called with a negative prefix, the sense of
`lisp-wait-p' will be inverted for the next command.  The and-go
versions will perform the operation and then immediately switch to the
ILISP buffer where you will see the results of executing your form.
If `eval-defun-and-go-lisp' \(\\[eval-defun-and-go-lisp]) or
`compile-defun-and-go-lisp' \(\\[compile-defun-and-go-lisp]) is called
with a prefix, a call for the form will be inserted as well.

When an eval is done of a single form matching `ilisp-defvar-regexp',
the corresponding symbol will be unbound and the value assigned again.

When `compile-defun-lisp' \(\\[compile-defun-lisp]) is called in an
inferior Lisp buffer with no current form, the last form typed to the
top-level will be compiled.

The following commands all deal with finding things in source code.
The first time that one of these commands is used, there may be some
delay while the source module is loaded.  When searching files, the
first applicable rule is used: 1) try the inferior Lisp, 2) try a tags
file if defined, 3) try all buffers in one of `lisp-source-modes' or
all files defined using `lisp-directory'.

`lisp-directory' \(\\[lisp-directory]) defines a set of files to be
searched by the source code commands.  It prompts for a directory and
sets the source files to be those in the directory that match entries
in `auto-mode-alist' for modes in `lisp-source-modes'.  With a
positive prefix, the files are appended.  With a negative prefix, all
current buffers that are in one of `lisp-source-modes' will be
searched.  This is also what happens by default.  Using this command
stops using a tags file.

`edit-definitions-lisp' \(\\[edit-definitions-lisp]) will find a
particular type of definition for a symbol.  It tries to use the rules
described above.  The files to be searched are listed in the buffer
\*Edit-Definitions*.  If `lisp-edit-files' is nil, no search will be
done if not found through the inferior Lisp.  The variable
`ilisp-locator' contains a function that when given the name and type
should be able to find the appropriate definition in the file.  There
is often a flag to cause your Lisp to record source files that you
will need to set in the initialization file for your Lisp.  The
variable is `\*record-source-files*' in both Allegro and Lucid.  Once
a definition has been found, `next-definition-lisp'
\(\\[next-definition-lisp]) will find the next definition.  \(Or the
previous definition with a prefix.)

`edit-callers-lisp' \(\\[edit-callers-lisp]) will generate a list of
all of the callers of a function in the current inferior Lisp and edit
the first caller using `edit-definitions-lisp'.  Each successive call
to `next-caller-lisp' \(\\[next-caller-lisp]) will edit the next
caller.  \(Or the previous caller with a prefix.)  The list is stored
in the buffer \*All-Callers*.  You can also look at the callers by
doing `who-calls-lisp' \(\\[who-calls-lisp]).

`search-lisp' \(\\[search-lisp]) will search the current tags files,
Lisp directory files or buffers in one of `lisp-source-modes' for a
string or a regular expression when called with a prefix.
\\[next-definition-lisp] will find the next definition.  \(Or the
previous definition with a prefix.)

`replace-lisp' \(\\[replace-lisp]) will replace a string (or a regexp
with a prefix) in the current tags files, Lisp directory files or
buffers in one of `lisp-source-modes'.

The following commands all deal with making a number of changes all at
once.  The first time one of these commands is used, there may be some
delay as the module is loaded.  The eval/compile versions of these
commands are always executed asynchronously.

`mark-change-lisp' \(\\[mark-change-lisp]) marks the current defun as
being changed.  A prefix causes it to be unmarked.
`clear-changes-lisp' \(\\[clear-changes-lisp]) will clear all of the
changes.  `list-changes-lisp' \(\\[list-changes-lisp]) will show the
forms currently marked.

`eval-changes-lisp' \(\\[eval-changes-lisp]), or
`compile-changes-lisp' \(\\[compile-changes-lisp]) will evaluate or
compile these changes as appropriate.  If called with a positive
prefix, the changes will be kept.  If there is an error, the process
will stop and show the error and all remaining changes will remain in
the list.  All of the results will be kept in the buffer
*Last-Changes*.

File commands in `lisp-source-mode' buffers keep track of the last
used directory and file.  If the point is on a string, that will be
the default if the file exists.  If the buffer is one of
`lisp-source-modes', the buffer file will be the default.  Otherwise,
the last file used in a `lisp-source-mode' will be used.

`find-file-lisp' \(\\[find-file-lisp]) will find a file.  If it is in
a string, that will be used as the default if it matches an existing
file.  Symbolic links are expanded so that different references to the
same file will end up with the same buffer.

`load-file-lisp' \(\\[load-file-lisp]) will load a file into the inferior
Lisp.  You will be given the opportunity to save the buffer if it has
changed and to compile the file if the compiled version is older than
the current version.

`compile-file-lisp' \(\\[compile-file-lisp]) will compile a file in
the current inferior Lisp.")
ilisp-5.12.0+cvs.2004.12.26/ilisp-ext.el0000600000175000001440000004052507556232575016042 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-ext.el --
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-ext.el,v 1.4 2002/10/25 12:13:49 kevinrosenberg Exp $

;;; Lisp mode extensions from the ILISP package.
;;; Copyright (C) 1990, 1991, 1992 Chris McConnell, ccm@cs.cmu.edu.

;;; This file may become part of GNU Emacs.

;;; GNU Emacs is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY.  No author or distributor
;;; accepts responsibility to anyone for the consequences of using it
;;; or for whether it serves any particular purpose or works at all,
;;; unless he says so in writing.  Refer to the GNU Emacs General Public
;;; License for full details.

;;; Everyone is granted permission to copy, modify and redistribute
;;; GNU Emacs, but only under the conditions described in the
;;; GNU Emacs General Public License.   A copy of this license is
;;; supposed to have been given to you along with GNU Emacs so you
;;; can know your rights and responsibilities.  It should be in a
;;; file named COPYING.  Among other things, the copyright notice
;;; and this notice must be preserved on all copies.

;;; When loaded this file adds new functionality to emacs lisp mode
;;; and lisp mode. 
;;; 
;;; Default bindings:
;;;
;;; M-x find-unbalanced-lisp find unbalanced parens in the current
;;; buffer.  With a prefix in the current region. 
;;;
;;; ] Close all open parentheses back to the start of the containing
;;; sexp, or to a previous left bracket which will be converted to a
;;; left paren.
;;;
;;; M-q Reindent comments or strings in paragraph chunks or reindent
;;; the containing sexp.
;;;
;;; M-x comment-region-lisp inserts prefix copies of the comment-start
;;; character before lines in the region and the comment-end character
;;; at the end of each line.  If called with a negative prefix, that
;;; many copies are removed.
;;;
;;; C-M-r repositions the first line of the current defun to the top
;;; of the current window.
;;;
;;; C-M-l switches the current window to the previously seen buffer.
;;;
;;; EXAMPLE .emacs:
;;;
;;; (setq ilisp-ext-load-hook 
;;;   '(lambda () (define-key global-map "\C-\M-l" 'previous-buffer-lisp)))
;;; (require 'ilisp-ext)

;;;%Syntax
;;; This makes it so that .'s are treated as normal characters so that
;;; 3.141 gets treated as a single lisp token.  This does cause dotted
;;; pairs to be treated weird though.
(modify-syntax-entry ?. "_" lisp-mode-syntax-table)

;;; Brackets match
(modify-syntax-entry ?\[ "(]" lisp-mode-syntax-table)
(modify-syntax-entry ?\] ")[" lisp-mode-syntax-table)



;;;%Superbrackets
(defun close-all-lisp (arg)
  "Unless you are in a string, insert right parentheses as necessary
to balance unmatched left parentheses back to the start of the current
defun or to a previous left bracket which is then replaced with a left
parentheses.  If there are too many right parentheses, remove them
unless there is text after the extra right parentheses.  If called
with a prefix, the entire expression will be closed and all open left
brackets will be replaced with left parentheses."
  (interactive "P")
  (let* ((point (point))
	 (begin (lisp-defun-begin))
	 (end (lisp-end-defun-text))
	 inserted
	 (closed nil))
    (goto-char point)
    (if (or (car (cdr (cdr (lisp-in-string begin end))))
	    (save-excursion (beginning-of-line)
			    (looking-at "[ \t]*;")))
	(insert "]")
	(if (= begin end)
	    (error "No sexp to close.")
	    (save-restriction
	      (narrow-to-region begin end)
	      (if (< point begin) 
		  (setq point begin)
		  (if (> point end)
		      (setq point end)))
	      ;; Add parens at point until either the defun is closed, or we
	      ;; hit a square bracket.
	      (goto-char point)
	      (insert ?\))		;So we have an sexp
	      (while (progn
		       (setq inserted (point))
		       (condition-case () 
			   (progn (backward-sexp)
				  (or arg 
				      (not (eq (char-after (point)) ?\[))))
			 (error (setq closed t) nil)))
		;; With an arg replace all left brackets
		(if (and arg (= (char-after (point)) ?\[))
		    (progn
		      (delete-char 1)
		      (insert ?\()
		      (backward-char)))
		(forward-sexp)
		(insert ?\)))
	      (if (< (point) point)
		  ;; We are at a left bracket
		  (let ((left (point)))
		    (delete-char 1)
		    (insert ?\()
		    (backward-char)
		    (forward-sexp))
		  ;; There was not an open left bracket so close at end
		  (delete-region point inserted)
		  (goto-char begin)
		  (if (condition-case () (progn
					   (forward-sexp)
					   (<= (point) end))
			(error nil))
		      ;; Delete extra right parens
		      (let ((point (point)))
			(skip-chars-forward " \t)\n")
			(if (or (bolp) (eobp))
			    (progn
			      (skip-chars-backward " \t\n")
			      (delete-region point (point)))
			    (error
			     "There is text after the last right parentheses.")))
		      ;; Insert parens at end changing any left brackets
		      (goto-char end)
		      (while 
			  (progn
			    (insert ?\))
			    (save-excursion
			      (condition-case ()
				  (progn (backward-sexp)
					 (if (= (char-after (point)) ?\[)
					     (progn
					       (delete-char 1)
					       (insert ?\()
					       (backward-char)))
					 (> (point) begin))
				(error (delete-backward-char 1)
				       nil))))))))))))

;;;%Reindentation

;;;
(defun reindent-lisp ()
  "Indents code depending partially on context (comments or strings).
If in a comment, indent the comment paragraph bounded by
non-comments, blank lines or empty comment lines.  If in a string,
indent the paragraph bounded by string delimiters or blank lines.
Otherwise go to the containing defun, close it and reindent the code
block."
  (interactive)
  (let ((region (lisp-in-string))
	(comment (concat "[ \t]*" comment-start "+[ \t]*")))
    (set-marker lisp-fill-marker (point))
    (back-to-indentation)
    (cond (region
	   (or (= (char-after (point)) ?\")
	       (and (< (point) (car region)) (goto-char (car region)))
	       (re-search-backward "^$" (car region) 'end))
	   (let ((begin (point))
		 (end (car (cdr region)))
		 (fill-prefix nil))
	     (forward-char)
	     (re-search-forward "^$" end 'end)
	     (if (= (point) end)
		 (progn (skip-chars-forward "^\n")
			(if (not (eobp)) (forward-char))))
	     (fill-region-as-paragraph begin (point))))
	  ((looking-at comment)
	   (let ((fill-prefix
		  (buffer-substring-no-properties
		   (progn (beginning-of-line) (point))
		   (match-end 0))))
	     (while (and (not (bobp)) (lisp-in-comment comment))
	       (forward-line -1))
	     (if (not (bobp)) (forward-line 1))
	     (let ((begin (point)))
	       (while (and (lisp-in-comment comment) (not (eobp)))
		 (replace-match fill-prefix)
		 (forward-line 1))
	       (if (not (eobp))
		   (progn (forward-line -1)
			  (end-of-line)
			  (forward-char 1)))
	       (fill-region-as-paragraph begin (point)))))
	  (t
	   (goto-char lisp-fill-marker)
	   (close-all-lisp 1)
	   (lisp-defun-begin)
	   (indent-sexp-ilisp)))
  (goto-char lisp-fill-marker)
  (set-marker lisp-fill-marker nil)
  (message "Done")))

;;;%Comment region
(defun comment-region-lisp (start end prefix)
  "If prefix is positive, insert prefix copies of comment-start at the
start and comment-end at the end of each line in region.  If prefix is
negative, remove all comment-start and comment-end strings from the
region."
  (interactive "r\np")
  (save-excursion
    (goto-char end)
    (if (and (not (= start end)) (bolp)) (setq end (1- end)))
    (goto-char end)
    (beginning-of-line)
    (set-marker ilisp-comment-marker (point))
    (untabify start end)
    (goto-char start)
    (beginning-of-line)
    (let* ((count 1)
	   (comment comment-start)
	   (comment-end (if (not (equal comment-end "")) comment-end)))
      (if (> prefix 0)
	  (progn
	    (while (< count prefix)
	      (setq comment (concat comment-start comment)
		    count (1+ count)))
	    (while (<= (point) ilisp-comment-marker)
	      (beginning-of-line)
	      (insert comment)
	      (if comment-end (progn (end-of-line) (insert comment-end)))
	      (forward-line 1)))
	  (setq comment (concat comment "+"))
	  (while (<= (point) ilisp-comment-marker)
	    (back-to-indentation)
	    (if (looking-at comment) (replace-match ""))
	    (if comment-end
		(progn
		  (re-search-backward comment-end)
		  (replace-match "")))
	    (forward-line 1)))
      (set-marker ilisp-comment-marker nil))))

;;;%Movement
;;; beginning-of-defun-lisp and end-of-defun-lisp are overloaded by ilisp.el
(defun beginning-of-defun-lisp (&optional stay)
  "Go to the next left paren that starts at the left margin."
  (interactive)
  (beginning-of-defun))

;;;
(defun end-of-defun-lisp ()
  "Go to the next left paren that starts at the left margin."
  (interactive)
  (let ((point (point)))
    (beginning-of-line)
    (re-search-forward "^[ \t\n]*[^; \t\n]" nil t)
    (back-to-indentation)
    (if (not (bolp)) (beginning-of-defun-lisp t))
    (lisp-end-defun-text t)
    (if (= point (point))		;Already at end so move to next end
	(lisp-skip (point-max))
	(if (not (or (eobp)
		     (= (char-after (point)) ?\n)))
	    (lisp-end-defun-text t)))))

;;;%%Reposition-window
(defun count-screen-lines-lisp (start end)
  "Return the number of screen lines between start and end."
  (save-excursion
    (save-restriction
      (narrow-to-region start end)
      (goto-char (point-min))
      (vertical-motion (- (point-max) (point-min))))))

;;;
(defun count-screen-lines-signed-lisp (start end)
  "Return number of screen lines between START and END; returns a negative
number if END precedes START."
  (interactive "r")
  (let ((lines (count-screen-lines-lisp start end)))
    (if (< start end) lines (- lines))))

;;; This was written by Michael D. Ernst
(defun reposition-window-lisp (&optional arg)
  "Make the current definition and/or comment visible, move it to the
top of the window, or toggle the visibility of comments that precede
it.  Leaves point unchanged unless supplied with prefix ARG.  If the
definition is fully onscreen, it is moved to the top of the window.
If it is partly offscreen, the window is scrolled to get the
definition \(or as much as will fit) onscreen, unless point is in a
comment which is also partly offscreen, in which case the scrolling
attempts to get as much of the comment onscreen as possible.
Initially reposition-window attempts to make both the definition and
preceding comments visible.  Further invocations toggle the visibility
of the comment lines.  If ARG is non-nil, point may move in order to
make the whole defun visible \(if only part could otherwise be made
so), to make the defun line visible \(if point is in code and it could
not be made so, or if only comments, including the first comment line,
are visible), or to make the first comment line visible \(if point is
in a comment)."
  (interactive "P")
  (let* ((here (point))
	 ;; change this name once I've gotten rid of references to ht.
	 ;; this is actually the number of the last screen line
	 (ht (- (window-height (selected-window)) 2))
	 (line (count-screen-lines-lisp (window-start) (point)))
	 (comment-height
	  ;; The max deals with the case of cursor between defuns.
	  (max 0
	       (count-screen-lines-signed-lisp
		;; the beginning of the preceding comment
		(save-excursion
		  (if (not (and (bolp) (eq (char-after (point)) ?\()))
		      (beginning-of-defun-lisp))
		  (beginning-of-defun-lisp)
		  (end-of-defun-lisp)
		  ;; Skip whitespace, newlines, and form feeds.
		  (re-search-forward "[^\\s \n\014]")
		  (backward-char 1)
		  (point))
		here)))
	 (defun-height 
	     (count-screen-lines-signed-lisp
	      (save-excursion
	       (end-of-defun-lisp)	;associate comment with next defun 
	       (beginning-of-defun-lisp)
	       (point))
	      here))
	 ;; This must be positive, so don't use the signed version.
	 (defun-depth
	     (count-screen-lines-lisp
	      here
	      (save-excursion (end-of-defun-lisp) (point))))
	 (defun-line-onscreen-p
	     (and (<= defun-height line) (<= (- line defun-height) ht))))
    (cond ((or (= comment-height line)
	       (and (= line ht)
		    (> comment-height line)
		    ;; if defun line offscreen, we should be in case 4
		    defun-line-onscreen-p))
	   ;; Either first comment line is at top of screen or (point at
	   ;; bottom of screen, defun line onscreen, and first comment line
	   ;; off top of screen).  That is, it looks like we just did
	   ;; recenter-definition, trying to fit as much of the comment
	   ;; onscreen as possible.  Put defun line at top of screen; that
	   ;; is, show as much code, and as few comments, as possible.
	   (if (and arg (> defun-depth (1+ ht)))
	       ;; Can't fit whole defun onscreen without moving point.
	       (progn (end-of-defun-lisp) (beginning-of-defun-lisp)
		      (recenter 0))
	       (recenter (max defun-height 0))))
	  ((or (= defun-height line)
	       (= line 0)
	       (and (< line comment-height)
		    (< defun-height 0)))
	   ;; Defun line or cursor at top of screen, OR cursor in comment
	   ;; whose first line is offscreen.
	   ;; Avoid moving definition up even if defun runs offscreen;
	   ;; we care more about getting the comment onscreen.
	   (cond ((= line ht)
		  ;; cursor on last screen line (and so in a comment)
		  (if arg (progn (end-of-defun-lisp) 
				 (beginning-of-defun-lisp)))
		  (recenter 0))
		 ;; This condition, copied from case 4, may not be quite right
		 ((and arg (< ht comment-height))
		  ;; Can't get first comment line onscreen.
		  ;; Go there and try again.
		  (forward-line (- comment-height))
		  (beginning-of-line)
		  ;; was (reposition-window)
		  (recenter 0))
		 (t
		  (recenter (min ht comment-height))))
	   ;; (recenter (min ht comment-height))
	   )
	  ((and (> (+ line defun-depth -1) ht)
		defun-line-onscreen-p)
	   ;; Defun runs off the bottom of the screen and the defun
	   ;; line is onscreen.  Move the defun up.
	   (recenter (max 0 (1+ (- ht defun-depth)) defun-height)))
	  (t
	   ;; If on the bottom line and comment start is offscreen
	   ;; then just move all comments offscreen, or at least as
	   ;; far as they'll go.  Try to get as much of the comments
	   ;; onscreen as possible.
	   (if (and arg (< ht comment-height))
	       ;; Can't get defun line onscreen; go there and try again.
	       (progn (forward-line (- defun-height))
		      (beginning-of-line)
		      (reposition-window-lisp))
	       (recenter (min ht comment-height)))))))

;;;
(defun previous-buffer-lisp (n)
  "Switch to Nth previously selected buffer.  N defaults to the number
of windows plus 1.  That is, no argument switches to the most recently
selected buffer that is not visible.  If N is 1, repeated calls will
cycle through all buffers; -1 cycles the other way.  If N is greater
than 1, the first N buffers on the buffer list are rotated."
  (interactive "P")
  (if (not n)
      (switch-to-buffer nil)
      (let ((buffer-list (buffer-list)))
	(setq n (prefix-numeric-value n))
	(cond ((= n 1)
	       (bury-buffer (current-buffer))
	       (setq n 2))
	      ((< n 0)
	       (setq buffer-list (nreverse buffer-list)
		     n (- n)))
	      (t nil))
	(while (and (> n 1) buffer-list)
	  (setq n (1- n)
		buffer-list (cdr buffer-list))
	  (while (eq (elt (buffer-name (car buffer-list)) 0) ? )
	    (setq buffer-list (cdr buffer-list))))
	(if buffer-list
	    (switch-to-buffer (car buffer-list))
	    (error "There aren't that many buffers")))))

;;;%Bindings
(define-key emacs-lisp-mode-map "\M-q"    'reindent-lisp)
(define-key emacs-lisp-mode-map "\M-\C-a" 'beginning-of-defun-lisp)
(define-key emacs-lisp-mode-map "\M-\C-e" 'end-of-defun-lisp)
(unless ilisp-*use-fsf-compliant-keybindings*
  ;; FSF Emacs 20 has `reposition-window' bound to C-M-l
  ;; and `isearch-backward-regexp' bound to C-M-r
  (define-key emacs-lisp-mode-map "\C-\M-r" 'reposition-window-lisp))
(when ilisp-bindings-*bind-right-bracket-p*
  (define-key emacs-lisp-mode-map "]"       'close-all-lisp))

(define-key lisp-mode-map       "\M-q"    'reindent-lisp)
(when ilisp-bindings-*bind-right-bracket-p*
  (define-key lisp-mode-map       "]"       'close-all-lisp))
(unless ilisp-*use-fsf-compliant-keybindings*
  ;; FSF Emacs 20 has `reposition-window' bound to C-M-l
  ;; and `isearch-backward-regexp' bound to C-M-r
  (define-key lisp-mode-map       "\C-\M-r" 'reposition-window-lisp)
  (define-key global-map          "\M-\C-l" 'previous-buffer-lisp))

;;;
(run-hooks 'ilisp-ext-load-hook)
(provide 'ilisp-ext)

;;; end of file -- ilisp-ext.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-hi.el0000600000175000001440000007226107665000236015630 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-hi.el --
;;; ILISP high level interface functions Lisp <-> Emacs
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-hi.el,v 1.20 2003/05/27 23:51:10 bill_clementson Exp $

;;;%Eval/compile
(defun lisp-send-region (start end switch message status format
			       &optional handler)
  "Sends a region to the lisp buffer and execute a 'command' on it.
Given START, END, SWITCH, MESSAGE, STATUS, FORMAT and optional
HANDLER send the region between START and END to the lisp buffer and
execute the command defined by FORMAT on the region, its package and
filename.  If called with a positive prefix, the results will be
inserted at the end of the region.  If SWITCH is T, the command will
be sent and the buffer switched to the inferior LISP buffer.  if
SWITCH is 'call, a call will be inserted.  If SWITCH is 'result the
result will be returned without being displayed.  Otherwise the
results will be displayed in a popup window if lisp-wait-p is T and
the current-prefix-arg is not '- or if lisp-wait-p is nil and the
current-prefix-arg is '-.  If not displayed in a pop-up window then
comint-handler will display the results in a pop-up window if they are
more than one line long, or they are from an error.  STATUS will be
the process status when the command is actually executing.  MESSAGE is
a message to let the user know what is going on."
  (if (= start end) (error "Region is empty"))
  (let ((sexp (lisp-count-pairs start end ?\( ?\)))
	(string (buffer-substring-no-properties start end)))
    (setq string
	  (format (ilisp-value format)
		  (lisp-slashify
		   (if (= sexp 1)
		       string
		       (format (ilisp-value 'ilisp-block-command) string)))
		  (lisp-buffer-package)
		  (buffer-file-name) 
		  (save-excursion	; start line
		    (goto-char (min start end))
		    (beginning-of-line)
		    (1+ (count-lines 1 (min start end))))))
    (let ((result 
	   (ilisp-send
	    string message status
	    (cond ((memq switch '(t call)) switch)
		  ((or (not (eq lisp-wait-p (lisp-minus-prefix))) 
		       current-prefix-arg
		       (eq switch 'result)) nil)
		  (t 'dispatch))
	    handler)))

      (if (and result
               (not (eq switch 'result)))
	  (if current-prefix-arg
	      (save-excursion
		(goto-char end)
		(insert ?\n)
		(insert result))
	    ;; Display the output in the usual way.
	    (lisp-display-output result)))
      result)))

;;;%%Eval
(defun eval-region-lisp (start end &optional switch message status handler)
  "Evaluate the current region."
  (interactive "r")
  (setq message (or message 
		    (concat "Evaluate " (lisp-region-name start end))))
  (let ((defvar (ilisp-value 'ilisp-defvar-regexp t)))
    (if (and defvar
	     (save-excursion
	       (goto-char start)
	       (skip-chars-forward " \t\n")
	       (and (let ((case-fold-search t)) (looking-at defvar))
		    (progn (forward-sexp) (skip-chars-forward " \t\n" end)
			   (= (point) end)))))
	(lisp-send-region start end switch message (or status 'defvar)
			  'ilisp-defvar-command handler)
	(lisp-send-region start end switch message (or status 'eval)
			  'ilisp-eval-command handler))))

;;;
(defun eval-next-sexp-lisp (&optional switch)
  "Evaluate the next sexp."
  (interactive)
  (let (start end)
    (save-excursion
      (setq start (point))
      (forward-sexp)
      (setq end (point)))
    (eval-region-lisp start end switch
		      (format "Evaluate %s" (buffer-substring-no-properties start end)))))

;;;
(defun eval-last-sexp-lisp (&optional switch)
  "Evaluate the last sexp."
  (interactive)
  (let (start end)
    (save-excursion
      (backward-char 1)
      (if (looking-at "\\s\)") 
          (progn
            (forward-char 1) 
	    (setq end (point))
            (backward-list 1)))
      (setq start (point)))
    (eval-region-lisp start end switch
		      (format "Evaluate %s" (buffer-substring-no-properties start end)))))

;;;
(defun eval-defun-lisp (&optional switch)
  "Evaluate the current form."
  (interactive)
  (let* ((form (lisp-defun-region-and-name))
	 (result
	  (eval-region-lisp (car form) (car (cdr form)) (or switch 'result)
			    (format "Evaluating %s" (car (cdr (cdr form)))))))
    ;; Display the returned value. -fmw
    (lisp-display-output result)))

(defun eval-dwim-lisp (&optional switch)
  "Evaluate DWIM (Do What I Mean).
If a region is selected, evaluate the region.  If the cursor is on or
immediately after a ')', evaluate the last sexp.  If the cursor is on
or immediately before a '(', evaluate the next sexp. If the cursor is
inside a defun, evaluate the defun. If the cursor is inside a
top-level sexp, evaluate the top-level sexp. Tests are done in the
order specified in these comments, so if there is any ambiguity, make
certain that the cursor is either on a parenthesis (for the eval
last/next commands or not directly before/after/on a parenthesis for
the eval defun/top-level commands."
  (interactive)
  (save-excursion
    (cond
     ((not (equal mark-active nil)) (eval-region-lisp (mark) (point) switch))
     ((or (looking-at "\\s\)")
	  (save-excursion
	    (backward-char 1)
	    (looking-at "\\s\)")))
      (if (looking-at "\\s\)")
	  (forward-char 1)) 
      (eval-last-sexp-lisp switch))
     ((or (looking-at "\\s\(")
	  (save-excursion
	    (forward-char 1)
	    (looking-at "\\s\(")))
      (if (looking-at "\\s\(")
	  (backward-char 1)) 
      (eval-next-sexp-lisp switch))
     (t (eval-defun-lisp switch)))))

;;;%%%And go
(defun eval-region-and-go-lisp (start end)
  "Evaluate the current region and switch to the current ILISP buffer."
  (interactive "r")
  (eval-region-lisp start end t))

(defun eval-next-sexp-and-go-lisp (&optional switch)
  "Evaluate the next sexp and switch to the current ILISP buffer."
  (interactive)
  (eval-next-sexp-lisp t))

(defun eval-last-sexp-and-go-lisp (&optional switch)
  "Evaluate the last sexp and switch to the current ILISP buffer."
  (interactive)
  (eval-last-sexp-lisp t))

(defun eval-defun-and-go-lisp ()
  "Evaluate the current defun and switch to the current ILISP buffer.
With prefix, insert a call as well."
  (interactive)
  (eval-defun-lisp (if current-prefix-arg 
		       (progn
			 (setq current-prefix-arg nil)
			 'call)
		       t)))

(defun eval-dwim-and-go-lisp (&optional switch)
  "Evaluate DWIM and switch to the current ILISP buffer."
  (interactive)
  (eval-dwim-lisp t))

;;;%%Compile
(defun compile-region-lisp (start end &optional switch message status handler)
  "Compile the current region."
  (interactive "r")
  (lisp-send-region
   start end
   (or switch 'result)			; Default to return the result.
   (or message (concat "Compile " (lisp-region-name start end)))
   (or status 'compile)
   'ilisp-compile-command 
   handler))


;;; ilisp-compile-buffer --
;;;
;;; 19990806 Martin Atzmueller

(defun ilisp-compile-buffer ()
  (interactive)
  (let ((old-point (point)))
    (mark-whole-buffer)
    (unwind-protect
      (let ((result
              (compile-region-lisp (point) (mark) 'result
                                   (format "Compiling Buffer %s"
                                           (buffer-name (current-buffer))))))
        (lisp-display-output result))
      (goto-char old-point)
      (set-mark old-point)
      (or (and (fboundp 'deactivate-mark)
               (deactivate-mark))
          (and (fboundp 'zmacs-deactivate-region)
               (zmacs-deactivate-region)))
      ;; ... and go implicitly -> you see what's going on!
      (switch-to-lisp t))))


;;; ilisp-eval-buffer --
;;;
;;; 19990806 Martin Atzmueller

(defun ilisp-eval-buffer ()
  (interactive)
  (mark-whole-buffer)
  (eval-region-lisp (point) (mark)))

    
;;;
(defun compile-defun-lisp (&optional switch)
  "Compile the current defun.
If no current defun compile  the last command in the input-ring of
an ILISP buffer."
  (interactive)
  (let* ((form (lisp-defun-region-and-name))
	 (start (car form))
	 (end (car (cdr form))))
    (if (and (= start end) (memq major-mode ilisp-modes))
	(save-excursion
	  (let ((form (ring-ref (ilisp-get-input-ring) 
				(ilisp-input-ring-index))))
	    (set-buffer "*ilisp-send*")
	    (delete-region (point-min) (point-max))
	    (insert form)
	    (compile-defun-lisp)))
      ;; Display the value returned by the compilation. -fmw
      ;; [and fake it if the compiler was silent.  -- rgr, 23-Aug-02.]
      (let* ((thing (car (cdr (cdr form))))
	     (result (compile-region-lisp start end (or switch 'result)
					  (format "Compiling %s" thing))))
	(lisp-display-output (if (equal result "")
				 (format "Compiled %s" thing)
				 result))))))

;;;%%%And-go
(defun compile-region-and-go-lisp (start end)
  "Compile the current region and switch to the current ILISP buffer."
  (interactive "r")
  (compile-region-lisp start end t))

(defun compile-defun-and-go-lisp ()
  "Compile the current defun and switch to the current ILISP buffer."
  (interactive)
  (compile-defun-lisp 
   (if current-prefix-arg
       (progn
	 (setq current-prefix-arg nil)
	 'call)
       t)))

;;; 2002-05-20 09:38:07 rurban
;;; Ivan's ange-ftp hack: "/user@server:~/xx.lisp" => "~/xx.lisp"  
;;; Reini's cygwin hack: "/cygdrive/r/xx.lisp"     => "r:/xx.lisp"
(defun file-name-hack (file-name)
  "Strip ange-ftp and cygwin pathnames prefixes for the native local lisp"
  (cond ((string-match "/.*?@.*:" file-name)
	 (substring file-name (match-end 0)))
	((not (eq system-type 'cygwin32)) file-name) ; verified on XEmacs
	;; assume cygwin clisp on cygwin (X)Emacs
	((eq ilisp-dialect 'clisp-hs) file-name)
	;; => w32 path for non-cygwin lisps only.
	((string-equal "/cygdrive/" (subseq file-name 0 10))
	 (concat (subseq file-name 10 11) ":" (subseq file-name 11)))
	(t file-name)))

;;;
(defun compile-file-lisp (file-name &optional extension)
  "Compile a Lisp file in the current inferior LISP and go there."
  (interactive (comint-get-source
		"Compile Lisp file: " lisp-prev-l/c-dir/file
		lisp-source-modes nil))
  (comint-check-source file-name)	; Check to see if buffer needs saved.
  (setq lisp-prev-l/c-dir/file (cons (file-name-directory    file-name)
				     (file-name-nondirectory file-name)))
  (ilisp-init t)
  (let ((file-name (file-name-hack file-name)))
    (ilisp-send
     (format (ilisp-value 'ilisp-compile-file-command) file-name
	     (or extension (ilisp-value 'ilisp-binary-extension)))
     (concat "Compile " file-name) 'compile
     t)))


;;;
(defun ilisp-compile-inits ()
  "Compile the initialization files for the current inferior LISP dialect."
  (interactive)
  (ilisp-init t)
  (let ((files (ilisp-value 'ilisp-load-inits t)))
    (dolist (f files)
      (compile-file-lisp 
       (expand-file-name (cdr f) ilisp-*directory*)
       (ilisp-value 'ilisp-init-binary-extension t)))))


;;;
(defun close-and-send-lisp ()
  "Close and indent the current sexp then send it to the inferior
LISP." 
  (interactive)
  (reindent-lisp)
  (if (memq major-mode ilisp-modes)
      (return-ilisp)
      (eval-defun-lisp)))

;;;%Special commands
(defun describe-lisp (sexp)
  "Describe the current sexp using ilisp-describe-command.
With a negative prefix, prompt for the expression.  If in an ILISP
buffer, and there is no current sexp, describe ilisp-last-command."
  (interactive
   (list
    (if (lisp-minus-prefix)
	(ilisp-read "Describe: " (lisp-previous-sexp t))
	(if (memq major-mode ilisp-modes)
	    (if (= (point)
		   (process-mark (get-buffer-process (current-buffer))))
		(or (ilisp-value 'ilisp-last-command t)
		    (error "No sexp to describe."))
		(lisp-previous-sexp t))
	    (lisp-previous-sexp t)))))
  (let ((result
	 (ilisp-send
	  (format (ilisp-value 'ilisp-describe-command) 
		  (lisp-slashify sexp) (lisp-buffer-package))
	  (concat "Describe " sexp)
	  'describe)))
    (lisp-display-output result)))

;;;
(defun inspect-lisp (sexp)
  "Inspect the current sexp using ilisp-inspect-command.
With a prefix, prompt for the expression.  If in an ILISP buffer, and
there is no current sexp, inspect ilisp-last-command."
  (interactive
   (list
    (if current-prefix-arg
	(ilisp-read "Inspect: " (lisp-previous-sexp t))
	(if (memq major-mode ilisp-modes)
	    (if (= (point)
		   (process-mark (get-buffer-process (current-buffer))))
		(or (ilisp-value 'ilisp-last-command t)
		    (error "No sexp to inspect."))
		(lisp-previous-sexp t))
	    (lisp-previous-sexp t)))))
  (ilisp-send
   (format (ilisp-value 'ilisp-inspect-command) 
	   (lisp-slashify sexp) (lisp-buffer-package))
   (concat "Inspect " sexp)
   'inspect t))

;;;
(defun arglist-lisp (symbol)
  "Return the arglist of the currently looked at function.
With a numeric prefix, the arglist will be inserted.  With a negative
one, the symbol will be prompted for."
  (interactive
   (let* ((function (lisp-function-name)))
     (list (if (lisp-minus-prefix)
	       (ilisp-read-symbol
		(format "Arglist [%s]: " (lisp-buffer-symbol function))
		function t)
	     function))))
  (if (null symbol)
      (error "No symbol")
    (let* ((arglist
	    (ilisp-send
	     (format (ilisp-value 'ilisp-arglist-command)
		     (lisp-symbol-name symbol) 
		     (lisp-symbol-package symbol))
	     nil
	     'args))
	   (position (string-match "(" arglist)))
      ;; Insert just the stuff after the open paren,
      ;; but display everything the inferior lisp prints.
      (cond ((and (not (ilisp-value 'comint-errorp t))
		  current-prefix-arg position)
	     (let ((temp (point)))
	       (insert (substring arglist (1+ position)))
	       (goto-char temp)))

	    (t
	     (lisp-display-output arglist))))))


;;;
(defun documentation-lisp (symbol type)
  "Return the documentation of the previous symbol.
It uses 'ilisp-documentation-command'.  If the symbol is at the start
of a list, it is assumed to be a function, otherwise variable
documentation is searched for.  With a minus prefix, prompt for the
symbol and type. With a numeric prefix always return the current
function call documentation."
  (interactive
   (if (lisp-minus-prefix)
       (let* ((symbol-info (lisp-previous-symbol))
	      (symbol (car symbol-info))
	      (doc (ilisp-read-symbol 
		    (format "Documentation [%s]: " 
			    (lisp-buffer-symbol symbol))
		    symbol))
	      (default (if (car (cdr symbol-info))
			   'function
			   'variable))
	      (types (ilisp-value 'ilisp-documentation-types t))
	      (type
	       (if types
		   (ilisp-completing-read
		    (if default
			(format "Type [%s]: " default)
			"Type: ")
		    types
		    default))))
	 (list doc (if (stringp type) (read type) type)))
       (if current-prefix-arg
	   (list (lisp-function-name) 'function)
	   (let* ((symbol-info (lisp-previous-symbol)))
	     (list (car symbol-info)
		   (if (car (cdr symbol-info))
		       'function
		       'variable))))))
  (lisp-display-output
   (ilisp-send
    (format (ilisp-value 'ilisp-documentation-command)
	    (lisp-symbol-name symbol) (lisp-symbol-package symbol) type)
    (format "Documentation %s %s" type (lisp-buffer-symbol symbol))
    'doc)))

;;;%%Macroexpand
(defun lisp-macroexpand-form ()
  "Return the next form for macroexpanding."
  (save-excursion
    (skip-chars-forward " \t\n")
    (let* ((begin (point))
	   (end (progn (forward-sexp) (point)))
	   (form (buffer-substring-no-properties begin end)))
      (list
       (if (lisp-minus-prefix)
	   (ilisp-read "Macroexpand: " form)
	   form)))))

;;;
(defun macroexpand-lisp (form &optional top)
  "Macroexpand the next sexp until it is no longer a macro.
With a prefix, insert into buffer."
  (interactive (lisp-macroexpand-form))
  (if (string-match "(\\([^ \t\n)]*\\)" form)
      (let ((message (concat "Macroexpand"
			     (if top "-1 " " ")
			     (substring form
					(match-beginning 1)
					(match-end 1))))
	    result)
	(setq result
	      (ilisp-send
	       (format
		(ilisp-value
		 (if top
		     'ilisp-macroexpand-1-command
		     'ilisp-macroexpand-command))
		(lisp-slashify form)
		(lisp-buffer-package)
		(buffer-file-name))
	       message 'expand))
	(if current-prefix-arg
	    (save-excursion (forward-sexp) (insert ?\n) (insert result))
	    (lisp-display-output result)))
      (error "Not a form: %s" form)))

(defun macroexpand-1-lisp (form)
  "Macroexpand the next sexp once.  With a prefix, insert into buffer."
  (interactive (lisp-macroexpand-form))
  (macroexpand-lisp form t))



;;;%%Trace
(defun trace-defun-lisp-break (function)
  "Trace FUNCTION without arg, untrace with.
Prompt for function with negative prefix.  Default function is the
current defun.
Trace with :break set."
  (interactive
   (let ((function (lisp-defun-name)))
     (if (lisp-minus-prefix)
	 (list (ilisp-read-symbol
		(format (if current-prefix-arg 
			    "Untrace [%s]: "
			    "Trace [%s]: ")
			(lisp-buffer-symbol function))
		function
		t))
	 (list function))))
  (trace-defun-lisp-internal function (not current-prefix-arg)))

(defun trace-defun-lisp (function)
  "Trace FUNCTION without arg, untrace with.
Prompt for function with negative prefix.  Default function is the
current defun."
  (interactive
   (let ((function (lisp-defun-name)))
     (if (lisp-minus-prefix)
	 (list (ilisp-read-symbol
		(format (if current-prefix-arg 
			    "Untrace [%s]: "
			    "Trace [%s]: ")
			(lisp-buffer-symbol function))
		function
		t))
	 (list function))))
  (trace-defun-lisp-internal function nil))

(defun trace-defun-lisp-internal (function breakp)
  (cond (function
	  (let ((result
		  (ilisp-send
		    (if current-prefix-arg
			(format (ilisp-value 'ilisp-untrace-command)
				(lisp-symbol-name function)
				(lisp-symbol-package function))
		      (format (ilisp-value 'ilisp-trace-command)
			      (lisp-symbol-name function)
			      (lisp-symbol-package function)
			      breakp))
		    (format "%srace %s" (if current-prefix-arg "Unt" "T") 
			    (lisp-buffer-symbol function))
		    (if current-prefix-arg 'untrace 'trace)
		    ;; Change to always wait, so we can see the
		    ;; result.  -fmw, 10/13/93
		    ;; (if lisp-wait-p nil 'dispatch)
		    nil)))
	    ;; Display the value returned -fmw
	    (lisp-display-output result)))
	(t
	  (error "No function to %strace" (if current-prefix-arg "un" "")))))



;;;%%Default-directory
(defun default-directory-lisp (&optional buffer)
  "Set the inferior LISP default directory.
The default directory of the optional BUFFER is used is available.  If
you are in an inferior LISP buffer, set the default directory to the
current directory of the LISP."
  (interactive)
  (if (and (not buffer)
	   (memq major-mode ilisp-modes)
           (ilisp-value 'ilisp-directory-command))
      (let ((dir (ilisp-send
		  (ilisp-value 'ilisp-directory-command)
		  (format "Getting LISP directory")
		  'dir)))
	(if (ilisp-value 'comint-errorp t)
	    (progn
	      (lisp-display-output dir)
	      (error "Error getting directory"))
	    (setq default-directory (read dir)
		  lisp-prev-l/c-dir/file (cons default-directory nil))
	    (message "Default directory is %s" default-directory)))
      (let ((directory
	     (expand-file-name (save-excursion
				 (set-buffer (or buffer (current-buffer)))
				 default-directory))))
	(ilisp-send
	 (format (ilisp-value 'ilisp-set-directory-command) directory)
	 (format "Set %s's directory to %s" 
		 (buffer-name (ilisp-buffer))
		 directory)
	 'dir
	 ;; (if lisp-wait-p nil 'dispatch)
	 ;; The above line might cause problems with Lispworks.
	 ;; I just set the default to 'nil'. It shouldn't harm.
	 ;; Marco Antoniotti: Jan 2 1995.
	 ))))
  

;;;
(defun load-file-lisp (file-name)
  "Load a lisp file into the current inferior LISP and go there."
  (interactive (comint-get-source "Load Lisp file: " lisp-prev-l/c-dir/file
				  lisp-source-modes nil))
  (comint-check-source file-name)	; Check to see if buffer needs saved.
  (setq lisp-prev-l/c-dir/file (cons (file-name-directory    file-name)
				     (file-name-nondirectory file-name)))
  (ilisp-init t)
  (let* ((extension (ilisp-value 'ilisp-binary-extension t))
	 (binary (lisp-file-extension file-name extension)))
    (save-excursion
      (set-buffer (ilisp-buffer))
      (unless (eq comint-send-queue comint-end-queue)
        (if (y-or-n-p "Abort commands before loading? ")
            (abort-commands-lisp)
          (message "Waiting for commands to finish")
          (while (not (eq comint-send-queue comint-end-queue))
            (accept-process-output)
            (sit-for 0))))
      (when (and (car (comint-send-variables (car comint-send-queue)))
                 (y-or-n-p "Interrupt top level? "))
        (let ((result (comint-send-results (car comint-send-queue))))
          (interrupt-subjob-ilisp)
          (while (not (cdr result))
            (accept-process-output)
            (sit-for 0)))))
    (unless (string= "system" (file-name-extension file-name))
      (if (file-newer-than-file-p file-name binary)
          (when (and (not ilisp-load-no-compile-query)
                     extension (y-or-n-p "Compile first? "))
            ;; Load binary if just compiled
            (message "")
            (compile-file-lisp file-name)
            (setq file-name binary))
        ;; Load binary if it is current
        (when (file-readable-p binary)
          (setq file-name binary))))
    (switch-to-lisp t t)
    (let ((file-name (file-name-hack file-name)))
      (comint-sender
       (ilisp-process)
       (format (ilisp-value 'ilisp-load-command) file-name))
      (message "Loading %s" file-name))))


;;;%Source
;;;%File operations
;;;
(defun lisp-find-file (file &optional pop no-name)
  "Find FILE, optionally POPping.
The optional NO-NAME arg is obsolete."
  ;; [Formerly, if NO-NAME is nil and there is a buffer with a name that is the
  ;; same as the final pathname component, lisp-find-file selected that buffer
  ;; instead of reading the file associated with the full path name.  This
  ;; feature was used only by edit-definitions-lisp (via lisp-locate-definition)
  ;; and replace-lisp, where it may have helped for remote lisps without shared
  ;; file access, but only if you happen not to have duplicate file names.  In
  ;; the 21st century, remote file access is more common; by the same token, so
  ;; are duplicate file names.  -- rgr, 26-Aug-02.]
  (if pop
      (lisp-pop-to-buffer (find-file-noselect file))
      (find-file file)))

;;;
(defun find-file-lisp (file-name)
  "Find a file.
If point is on a string that points to an existing
file, that will be the default.  If the buffer is one of
lisp-source-modes, the buffer file will be the default.  Otherwise,
the last file used in a lisp-source-mode will be used."
  (interactive
   (comint-get-source "Find file: "
		      lisp-prev-l/c-dir/file
		      lisp-source-modes nil))
  (setq lisp-prev-l/c-dir/file (cons (file-name-directory    file-name)
				     (file-name-nondirectory file-name)))
  (lisp-find-file file-name nil t))


;;; ilisp-arglist-message-lisp-space --
;;;
;;; 19990806 Martin Atzmueller

(defun ilisp-arglist-message-lisp-space ()
  "Displays the value of the argument list of a symbol followed by #\\Space.
This function is intended to be bound to the #\\Space key so that,
after being enabled it will display the arglist or value of a specific
symbol after the symbol has been typed in followed by #\\Space."
  (interactive)
  (when (and ilisp-*arglist-message-lisp-space-p* ; only if enabled and...
             (ignore-errors             ; we can print info
               (ilisp-value 'ilisp-print-info-message-command t))
	     (ignore-errors
	       (or (equal (ilisp-value 'ilisp-status) " :ready")
		   (equal (ilisp-value 'ilisp-status) " :error")))
	     (or (eql (current-buffer) (ilisp-buffer)) ; if in
					; ILISP-Buffer, or else 
		 (ignore-errors (lisp-buffer-package))))
    (let* ((old-point (point))
	   (last-char (progn (ignore-errors (backward-char))
			     (unless (eql (point) old-point)
			       (buffer-substring-no-properties old-point (point)))))

	   (string
             (buffer-substring-no-properties old-point
                               (progn
                                 (goto-char old-point)
                                 (ignore-errors (backward-sexp))
                                 (point))))
	   (prefix-char 
             (let ((save (ignore-errors
                           (goto-char old-point)
                           (backward-sexp)
                           (backward-char)
                           (point))))
               (when save
                 (buffer-substring-no-properties save (1+ save)))))
	   (double-quote-pos (and string (string-match "\"" string)))
	   (paren-pos (and string
			   (string-match "(" string)))
	   (ilisp-symbol-avec-package
             (unless (eql paren-pos 0)
               (lisp-string-to-symbol
                (if (and double-quote-pos (eql double-quote-pos 0)
                         string (ignore-errors (elt string 2)))
                  (substring string 1 -1)
                  string))))
	   (symbol (lisp-symbol-name ilisp-symbol-avec-package))
           (package (lisp-symbol-package ilisp-symbol-avec-package)))
      (flet ((no-arglist-output-p ()
               (or (and last-char 
                        (or;; don't do silly things after comment character
                          (equal last-char ";")
                          ;; do something only if directly after a sexp.
                          (equal last-char " ")))
		   ;; could be something like #+foo, #-foo, or #:foo, any of
		   ;; which is likely to lose.
		   (and string
			(string-match "^#" string))
                   double-quote-pos;; there is no output  for strings only.
                   (not (and symbol (stringp symbol) (> (length symbol) 0)))
                   (string-match "^\. " symbol)
                   (string-match "^\\\\" symbol))))

        (goto-char old-point)
        (unless (no-arglist-output-p)
          ;; only output for functions within brackets; too much lisp-traffic!
          ;; or ilisp-*arglist-message-lisp-space-p* has to be set to 'all
          (when (or (equal prefix-char "(")
                    (eql ilisp-*arglist-message-lisp-space-p* 'all))
            (ilisp-arglist-message-lisp ilisp-symbol-avec-package))))))
  (self-insert-command (prefix-numeric-value current-prefix-arg)))
    

;;; ilisp-arglist-message-lisp --
;;;
;;; Notes:
;;; 19990806 Martin Atzmueller
;;; created
;;;
;;; 19991218 Marco Antoniotti
;;; The double quote processing is very dubious. Basically we want to
;;; strip the double quotes when the resulting string in 'arglist' is
;;; *just* a double-quoted string.  But the current code does not do
;;; that. As a matter of fact it may remove a lot of initial non white
;;; characters.  Hence the fix (i.e. the removal).

;;; arglist functions

(defun ilisp-arglist-message-lisp (symbol)
  "Returns the arglist of the currently looked at function as Message.
With a numeric prefix, the arglist will be inserted.  With a negative one,
the symbol will be prompted for."
  (interactive
   (let* ((function (lisp-function-name)))
     (list (if (lisp-minus-prefix)
	       (ilisp-read-symbol
		(format "Arglist [%s]: " (lisp-buffer-symbol function))
		function t)
	     function))))

  (if (null symbol)
      (error "ilisp-arglist-message-lisp: null symbol")
    (let* ((arglist
	    (ilisp-send
	     (format (ilisp-value 'ilisp-print-info-message-command)
		     (lisp-symbol-name symbol) 
		     (lisp-symbol-package symbol))
             ""
	     'args
	     nil))
	   (output arglist))

      ;; Insert just the stuff after the double-quotes
      ;; but display everything the inferior lisp prints.
      (cond ((and (not (ilisp-value 'comint-errorp t))
		  current-prefix-arg)
	     (let ((temp (point)))
	       (insert output)
	       (goto-char temp)))
	    (t
	     ;; display output only if it is _not_ the empty string!
	     (when (and output (stringp output) (> (length output) 0))
	       (if (equal lisp-no-popper t)
		   (message "%s" output)
                   (lisp-display-output output))))))))

;;; Original version

;;; (defun ilisp-arglist-message-lisp (symbol)
;;;   "Returns the arglist of the currently looked at function as Message.
;;; With a numeric prefix, the arglist will be inserted.  With a negative one,
;;; the symbol will be prompted for."
;;;   (interactive
;;;    (let* ((function (lisp-function-name)))
;;;      (list (if (lisp-minus-prefix)
;;; 	       (ilisp-read-symbol
;;; 		(format "Arglist [%s]: " (lisp-buffer-symbol function))
;;; 		function t)
;;; 	     function))))

;;;   ;; (message "ilisp-arglist-message-lisp: symbol = %s\n" symbol)
;;;   (if (null symbol)
;;;       (error "ilisp-arglist-message-lisp: null symbol")
;;;     (let* ((arglist
;;; 	    (ilisp-send
;;; 	     (format (ilisp-value 'ilisp-print-info-message-command)
;;; 		     (lisp-symbol-name symbol) 
;;; 		     (lisp-symbol-package symbol))
;;; 	     nil
;;; 	     'args))
;;; 	   (position (string-match "\"" arglist))
;;; 	   (output (if position
;;; 		       (substring arglist (1+ position) -1)
;;; 		     arglist)))

;;;       ;; (message ">>> '%s'\n>>> '%s'\n" arglist output)

;;;       ;; Insert just the stuff after the double-quotes
;;;       ;; but display everything the inferior lisp prints.
;;;       (cond ((and (not (ilisp-value 'comint-errorp t))
;;; 		  current-prefix-arg position)
;;; 	     (let ((temp (point)))
;;; 	       (insert output)
;;; 	       (goto-char temp)))
;;; 	    ((string-match "ILisp-Message" arglist)
;;; 	     ;; don't do anything
;;; 	     nil)
;;; 	    (t
;;; 	     (if (equal lisp-no-popper t)
;;; 		 (message "%s" output)
;;; 	       (lisp-display-output output)))))))


;;; end of file -- ilisp-hi.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-hlw.el0000600000175000001440000000717107531601216016015 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-hlw.el --
;;; ILISP LispWorks Common Lisp dialect definition
;;;
;;; Independently written by:
;;;
;;; Jason Trenouth: jason@harlequin.co.uk
;;; Qiegang Long: qlong@cs.umass.edu
;;;
;;; Upgraded for LW 4 and bugs fixed by Pekka P. Pirinen
;;; (pekka@harlequin.co.uk) and later merged together by Jason.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-hlw.el,v 1.3 2002/08/23 21:40:09 anisotropy9 Exp $


(defvar ilisp-lispworks-init-file "lispworks.lisp")

;; may use Qiegang's instead? "[-A-Z]+ [0-9]+ : \\([0-9]+\\) >"

(defun lispworks-break-level (prompt)
  (let ((position nil))
    (if (and prompt (setq position (string-match ": [0-9]+" prompt)))
	(string-to-int (substring prompt (+ 2 position)))
      0)))


;;; lispworks-check-prompt --
;;;
;;; Notes:
;;; 19990806 Marco Antoniotti
;;; Many Changes form Harlequin and other sources have been
;;; included. Mostly dealing with LW 4.x.

(defun lispworks-check-prompt (old new)
  "Compare the break level printed at the beginning of the prompt."
  (<= (lispworks-break-level new) (lispworks-break-level old)))

;;; Qiegang's prompt matcher "^\\([-A-Z]+ [0-9]+ >\\)\\|\\([-A-Z]+ [0-9]+ : [0-9]+ >\\) "
;;; Qiegang's error matcher "\\(ILISP:[^\"]*\\)\\|\\(Error: [^\n]*\\)\\|\\(Break.[^\n]*\\)"

(defdialect lispworks "LispWorks"
  common-lisp
  (ilisp-load-init 'lispworks ilisp-lispworks-init-file)
  (setq comint-fix-error ":a"
	;; ilisp-reset ":a" ; LW doesn't have a multi-level abort yet.
	ilisp-reset ":a :t" ; LW 4 (In LW 3.2 this only anorts one level)
	comint-continue ":c"
	comint-interrupt-regexp  "Break\\.\n.*")
  (setq comint-prompt-status 
	(function (lambda (old line)
	  (comint-prompt-status old line 'lispworks-check-prompt))))
  ;;  or package> at top-level
  ;; [0-9c]  or package> in error
  ;; (setq comint-prompt-regexp "^\\(\\[[0-9]*c*\\] \\|\\)\\(<\\|\\)[^>]*> ")
  (setq comint-prompt-regexp "^[A-Z=][-a-z0-9A-Z:= ]*[$%#>]+ *") 

  ;; 19990806 Marco Antoniotti
  ;; You may want to use the commented one instead.
  ;; (setq ilisp-error-regexp "ILISP:[^\"]*\\|Error: [^\n]*\\|Break\\.[^\n]*")
  (setq ilisp-error-regexp "ILISP [0-9]* : [0-9]* > ")

  (setq ilisp-source-types (append ilisp-source-types '(("any"))))
  (setq ilisp-directory-command "(lw:current-pathname)")
  (setq ilisp-set-directory-command "(hcl:change-directory \"%s\")")
  (setq ilisp-find-source-command 
	"(ilisp:ilisp-source-files \"%s\" \"%s\" \"%s\")")

  ;;; 19990806 Unknown Author (blame Marco Antoniotti for this)
  (setq ilisp-package-command
 	"(let ((*package* *package*)
                #+LispWorks3 (lw::*handle-old-in-package* :quiet)
                #-LispWorks3 (hcl:*handle-old-in-package* :quiet))
            %s (package-name *package*))")

  ;;; 19990806 Unknown Author (blame Marco Antoniotti for this)
  ;;;
  ;;; Notes:
  ;;; 19990806 Marco Antoniotti
  ;;; I inserted these here, but I have not throughly checked them.
  ;;; In particular, the value for ILISP-RESTORE-COMMAND looks funny.
  (setq ilisp-save-command ":ilisp-send %s"
	ilisp-restore-command (function (lambda ())))

  ;; Note:
  ;; 19990920
  ;; The global definition should now take care to find out the
  ;; proper extension.  See file 'ilisp-cl.el'.
  ;; (setq ilisp-binary-command "system::*binary-file-type*")
  ;; (setq ilisp-init-binary-command "system::*binary-file-type*")
  
  )


(unless lispworks-program
  (setq lispworks-program "lispworks"))

(provide 'ilisp-lw)

;;; end of file -- ilisp-hlw.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-hnd.el0000600000175000001440000000532707277332355016011 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-hnd.el --
;;; ILISP Error handler
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-hnd.el,v 1.3 2001/05/12 22:10:53 marcoxa Exp $


;; Do not handle errors by default.
(defvar ilisp-handle-errors nil)

;;;
(defun ilisp-handler (error-p wait-p message output prompt)
  "Given ERROR-P, WAIT-P, MESSAGE, OUTPUT and PROMPT, show the message
and output if there is an error or the output is multiple lines and
let the user decide what to do."
  (if (not ilisp-handle-errors)
      (progn
	(if message
	    (progn
	      (setq ilisp-last-message message
		    ilisp-last-prompt prompt)
	      (if (not wait-p) (lisp-display-output output))))
	nil)
    (if (and (not wait-p)
	     (setq output (comint-remove-whitespace output))
	     (or error-p (string-match "\n" output)))
	(let* ((buffer (ilisp-output-buffer ilisp-output t))
	       (out (if error-p 
			(funcall ilisp-error-filter output)
		      output))
	       (key
		(if (and error-p (not (comint-interrupted)))
		    (comint-handle-error
		     out
     "SPC-scroll, I-ignore, K-keep, A-abort sends and keep or B-break: "
		     '(?i ?k ?a ?b))
		  (comint-handle-error 
		   out 
	   "SPC-scroll, I-ignore, K-keep or A-abort sends and keep: "
		   '(?i ?k ?a))))
	       (clear comint-queue-emptied))
	  (if (= key ?i)
	      (progn
		(message "Ignore message")
		(if buffer 
		    (funcall
		     (ilisp-temp-buffer-show-function)
		     buffer)
		  (ilisp-bury-output))
		t)
	    (save-excursion
	      (set-buffer (get-buffer-create "*Errors*"))
	      (if clear (delete-region (point-min) (point-max)))
	      (goto-char (point-max))
	      (insert message)
	      (insert ?\n)
	      (insert out) 
	      (insert "\n\n"))
	    (if clear (setq comint-queue-emptied nil))
	    (if (= key ?a)
		(progn 
		  (message "Abort pending commands and keep in *Errors*")
		  (comint-abort-sends)
		  t)
	      (if (= key ?b)
		  (progn 
		    (comint-insert
		     (concat comment-start comment-start comment-start
			     message "\n"
			     output "\n" prompt))
		    (message "Preserve break") nil)
		(message "Keep error in *Errors* and continue")
		t))))
      t)))

;;;
(defun ilisp-abort-handler ()
  "Handle when the user aborts commands."
  (setq ilisp-initializing nil
	ilisp-load-files nil)
  (let ((add nil))
    (while ilisp-pending-changes
      (if (not (memq (car ilisp-pending-changes) lisp-changes))
	  (setq add (cons (car ilisp-pending-changes) add)))
      (setq ilisp-pending-changes (cdr ilisp-pending-changes)))
    (setq lisp-changes (nconc lisp-changes add))))
ilisp-5.12.0+cvs.2004.12.26/ilisp-imenu.el0000600000175000001440000001727507556232575016365 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-out.el --
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-imenu.el,v 1.6 2002/10/25 12:13:49 kevinrosenberg Exp $


(require 'imenu)

;;; modified for a better display of function+arglist! 
;;; let tokens contain spaces and test with string-equal.

(defun imenu--completion-buffer (index-alist &optional prompt)
  "Let the user select from INDEX-ALIST in a completion buffer with PROMPT.

Returns t for rescan and otherwise a position number."
  ;; Create a list for this buffer only when needed.
  (let ((name (thing-at-point 'symbol))
	choice)
    (cond (prompt)
	  ((and name (imenu--in-alist name index-alist))
	   (setq prompt (format "Index item (default %s): " name)))
	  (t (setq prompt "Index item: ")))
    (if (eq imenu-always-use-completion-buffer-p 'never)
  	(setq name (completing-read prompt
  				    index-alist
 				    nil t nil 'imenu--history-list name))
      (save-window-excursion
	;; Display the completion buffer
	(with-output-to-temp-buffer "*Completions*"
	  (display-completion-list
	   (all-completions "" index-alist )))
	(let ((minibuffer-setup-hook
	       (function
		(lambda ()
		  (let ((buffer (current-buffer)))
		    (save-excursion
		      (set-buffer "*Completions*")
		      (setq completion-reference-buffer buffer)))))))
	  ;; Make a completion question
	  (setq name (completing-read prompt
				      index-alist
				      #'string-equal
                                      t nil 'imenu--history-list name)))))
    (cond ((not (stringp name))
	   nil)
	  ((string= name (car imenu--rescan-item))
	   t)
	  (t
	   (setq choice (assoc name index-alist))
	   (if (imenu--subalist-p choice)
	       (imenu--completion-buffer (cdr choice) prompt)
	     choice)))))
;;;---

;;;
;;; Patch for ilisp-imenu
;;; 

;; Intent is to allow users to customize what forms can
;; define types, variables, etc.  At the moment, this is
;; hardcoded in ilisp-imenu-create-lisp-index.
;; This file replaces and enhances that. function.

(defvar ilisp-*defining-form-regexp* "^(def"
  "Regular expression indicating that the form will define something.")

(defvar ilisp-*type-defining-forms*
  '(deftype defstruct defclass define-condition)
  "Symbols that announce the definition of a new lisp type.
Don't change this variable -- rather
customize ilisp-*user-type-defining-forms*")

(defvar ilisp-*user-type-defining-forms* nil
  "*List of user defined symbols which define new lisp types.")

(defvar ilisp-*variable-defining-forms*
  '(defvar defconstant defparameter)
  "Symbols that announce the definition of a lisp variable.
Don't change this variable -- rather customize
ilisp-*user-variable-defining-forms*")

(defvar ilisp-*user-variable-defining-forms* nil
  "*List of user defined symbols which define new lisp variables.")
 
(defvar ilisp-*function-defining-forms* '(defun defmethod defmacro defgeneric)
  "Symbols that announce the definition of a new new lisp function.
Don't change this variable -- rather customize
ilisp-*user-function-defining-forms*")


(defvar ilisp-*user-function-defining-forms* nil
  "*List of user defined symbols which define new lisp functions.")


(defun ilisp-build-optimal-regexp (key)
  "Build an optimal regular expression to match tokens used to define
things of class KEY, which can be `:types' or `:variables'."
  (regexp-opt (mapcar #'symbol-name
		      (remove-duplicates
		       (ecase key
			 (:types (append ilisp-*type-defining-forms*
					 ilisp-*user-type-defining-forms*))
			 (:variables (append ilisp-*variable-defining-forms*
					     ilisp-*user-variable-defining-forms*))
			 (:functions (append ilisp-*function-defining-forms*
					     ilisp-*user-function-defining-forms*)))))))


(defun ilisp-imenu-create-lisp-index ()
  ;; `imenu-create-index-function' is set to this.
  ;; generates a nested index of definitions.
  (let ((index-fun-alist '())
	(index-var-alist '())
        (index-const-alist '())
	(index-type-alist '())
	(index-unknown-alist '())
	(prev-pos nil)
	)
    (goto-char (point-max))
    (imenu-progress-message prev-pos 0)

    ;; This will be a bit slower at runtime, but hey, we don't
    ;; rebuild the index very often, and at least this way,
    ;; we'll get it right.  [ap 13/5/2001]
    (let ((type-defining-form-regexp (ilisp-build-optimal-regexp :types))
	  (variable-defining-form-regexp (ilisp-build-optimal-regexp :variables))
	  (function-defining-form-regexp (ilisp-build-optimal-regexp :functions)))
      ;; Search for the function
      (while (beginning-of-defun)
	(imenu-progress-message prev-pos nil t)
	(save-match-data
	  (and (looking-at ilisp-*defining-form-regexp*)
	       (save-excursion
		 (down-list 1)
		 (cond ((looking-at variable-defining-form-regexp)
			(forward-sexp 2)
			(push (ilisp-imenu-general--name-and-position)
			      index-var-alist))
		       ((looking-at type-defining-form-regexp)
			(forward-sexp 2)
			(push (ilisp-imenu-general--name-and-position)
			      index-type-alist)) 
		       ((looking-at function-defining-form-regexp)
			(forward-sexp 2)
			(push (ilisp-imenu-function--name-and-position)
			      index-fun-alist)) 
		       (t
			(forward-sexp 2)
			(push (ilisp-imenu-general--name-and-position)
			      index-unknown-alist)))))))
      (imenu-progress-message prev-pos 100)
      (when index-var-alist
	(push (cons "Variables" index-var-alist) index-fun-alist))
      (when index-type-alist
	(push (cons "Types" index-type-alist) index-fun-alist))
      (when index-unknown-alist
	(push (cons "Syntax-unknown" index-unknown-alist) index-fun-alist))

      index-fun-alist)))


;; Return the previous+current sexp and the location of the sexp (its
;; beginning) without moving the point.
(defun ilisp-imenu-function--name-and-position ()
  (save-excursion
    (forward-sexp -1)
    ;; [ydi] modified for imenu-use-markers
    (let* ((beg (if imenu-use-markers (point-marker) (point)))
           (end (progn (forward-sexp) (point)))
           (name (buffer-substring-no-properties beg end))
           (beg2 (progn (forward-sexp) (forward-sexp -1) (point)))
           (end2 (progn (forward-sexp) (point)))
           (args (buffer-substring-no-properties beg2 end2)))
      (cons (concat name " " args) 
	    beg))))


(defun ilisp-imenu-general--name-and-position ()
  (save-excursion
    (forward-sexp -1)
    ;; [ydi] modified for imenu-use-markers
    (let ((beg (if imenu-use-markers (point-marker) (point)))
	  (end (progn (forward-sexp) (point))))
      (cons (buffer-substring-no-properties beg end)
	    beg))))


(defun ilisp-imenu-extract-index-name ()
  ;; `imenu-extract-index-name-function' is set to this.
  ;; generates a flat index of definitions in a lisp file.
  (save-match-data
    (and (looking-at "(def")
	 (condition-case nil
	     (progn
	       (down-list 1)
	       (forward-sexp 2)
	       (let ((beg (point))
		     (end (progn (forward-sexp -1) (point))))
		 (buffer-substring-no-properties beg end)))
	   (error nil)))))

;;;---

;;;###autoload
(defun ilisp-imenu-add-menubar-index ()
  "Add an Imenu \"Index\" entry on the menu bar for the current buffer.

A trivial interface to `imenu-add-to-menubar' suitable for use in a hook."
  (interactive)
  (imenu-add-to-menubar "Index"))


(add-hook 'lisp-mode-hook
          	  (lambda () 
                    (when (featurep 'imenu)
                      (setq imenu-extract-index-name-function
                            'ilisp-imenu-extract-index-name)
                      (setq imenu-create-index-function
                            'ilisp-imenu-create-lisp-index)
                      (ilisp-imenu-add-menubar-index))))

;;; end of file -- ilisp-imenu.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-ind.el0000600000175000001440000000207707277332355016011 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-ind.el --
;;; ILISP indentation
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-ind.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $


;;;%Indentation
(defun indent-line-ilisp (&optional whole-exp)
  "Indent current line as Lisp code.
With argument, indent any additional lines of the same expression
rigidly along with this one.  This is restricted to the current buffer input."
  (interactive "P")
  (save-restriction
    (if (memq major-mode ilisp-modes)
	(narrow-to-region (save-excursion (lisp-input-start)) (point-max)))
    (lisp-indent-line whole-exp)))

;;;
(defun indent-sexp-ilisp ()
  "Indent each line of the list starting just after point."
  (interactive)
  (save-restriction
    (if (memq major-mode ilisp-modes)
	(narrow-to-region (save-excursion (lisp-input-start)) (point-max)))
    (indent-sexp)))

;;; end of file -- ilisp-ind.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-inp.el0000600000175000001440000000173307277332355016023 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-inp.el --
;;; ILISP input functions
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-inp.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $

;;;%%Input 
(defun lisp-at-start ()
  "Return `point' when at start of an input expression in an inferior Lisp."
  (save-excursion
    (let ((point (point)))
      (beginning-of-line)
      (comint-skip-prompt)
      (if (= point (point))
	  point))))


(defun lisp-input-start ()
  "Go to the start of the input region."
  (let* ((pmark (process-mark (get-buffer-process (current-buffer)))))
    (if (>= (point) pmark)
	(goto-char pmark)
	(progn 
	  (end-of-line)
	  (if (re-search-backward comint-prompt-regexp (point-min) 'stay)
	      (comint-skip-prompt)
	      (point))))))

;;; end of file -- ilisp-inp.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-kcl.el0000600000175000001440000001020307436207217015771 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-kcl.el --
;;; ILISP Kyoto Common Lisp dialect definition and derivative.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-kcl.el,v 1.5 2002/02/24 16:02:23 amoroso Exp $

;;;%%%KCL--these dialects by Tom Emerson
;;; kcl-check-prompt doesn't after the first break because the
;;; number of ">" characters doesn't increase.

(defun kcl-check-prompt (old new)
  "Compare the break level printed at the beginning of the prompt."
  (let* ((was-in-break (and old (string-match ">+" old)))
 	 (old-level (if was-in-break
 			(- (match-end 0) (match-beginning 0))
 			0))
 	 (is-in-break (string-match ">+" new))
 	 (new-level (if is-in-break
 			(- (match-end 0) (match-beginning 0))
 			0)))
    (<= new-level old-level)))

;;;
(defdialect kcl "Kyoto Common LISP" common-lisp
  (setq comint-prompt-regexp "^>+"
        ilisp-error-regexp "Error: [^\n]*"
        ilisp-binary-extension "o"
        ilisp-init-binary-extension "o"
	ilisp-binary-command "\"o\""
        comint-fix-error ":q"
        comint-continue ":r"
	comint-prompt-status
	(function
	 (lambda (old line)
	   (comint-prompt-status old line 'kcl-check-prompt)))))
(if (not kcl-program) (setq kcl-program "kcl"))

;;;%%%AKCL
(defdialect akcl "Austin Kyoto Common LISP" kcl
  (setq comint-prompt-regexp "^[-A-Z]*>+")

  ;; ILD Support

  (setq ild-abort-string ":q"
	ild-continue-string ":r"
	ild-next-string ":up"
	ild-next-string-arg ":up %s"
	ild-previous-string ":down"
	ild-previous-string-arg ":down %s"
	ild-top-string ":down 1000000"
	ild-bottom-string ":up 1000000"
	ild-backtrace-string ":bt"
	ild-locals-string ":fr"
	ild-local-string-arg ":loc %s"
	ild-return-string ":r"
	ild-retry-string nil		; needs work
	ild-trap-on-exit-string nil	; needs work
	)
   )
(if (not akcl-program) (setq akcl-program "akcl"))


;;;%%%IBCL
(defdialect ibcl "Ibuki Common LISP" kcl
  (setq comint-prompt-regexp "^[-A-Z]*>+\\|^[-A-Z]* ->"
        comint-interrupt-regexp ">>Condition: Terminal Interrupt"
        comint-continue ":q"
        ilisp-reset ":q!"
        ilisp-error-regexp ">>Error:[^\n]*"))
(if (not ibcl-program) (setq ibcl-program "ibcl"))


;;; GCL and ECL (at least) have slightly different compilers and
;;; runtimes, hence we need to provide different extensions for their
;;; init files.
;;; Marco Antoniotti  19951028.

;;; GCL -- I assume it is exactly as AKCL.
;;; Should check whether it is similar to IBUKI.

(defdialect gcl "GNU Common LISP" akcl
  (setq comint-prompt-regexp "^>+"
	ilisp-binary-extension "o"
        ilisp-init-binary-extension "gcl.o"
	ilisp-binary-command "\"o\""
	ilisp-init-binary-command "\"gcl.o\""
	)

  ;; ILD Support

  (setq ild-abort-string ":q"
	ild-continue-string ":r"
	ild-next-string ":up"
	ild-next-string-arg ":up %s"
	ild-previous-string ":down"
	ild-previous-string-arg ":down %s"
	ild-top-string ":down 1000000"
	ild-bottom-string ":up 1000000"
	ild-backtrace-string ":bt"
	ild-locals-string ":fr"
	ild-local-string-arg ":loc %s"
	ild-return-string ":r"
	ild-retry-string nil		; needs work
	ild-trap-on-exit-string nil	; needs work
	)
  )

(if (not gcl-program) (setq gcl-program "gcl"))


;;; ECL -- Beppe Attardi's developments over AKCL
;;;        Currently maintained by Juan Jose Garcia-Ripoll

(defdialect ecl "EcoLisp Common LISP" akcl
  (setq comint-prompt-regexp "^\\([A-Z].*\\)?>+ "
        ilisp-error-regexp "Broken at [^\n]*"
        comint-fix-error ":pop\n(progn (terpri) (values))") ; kludge

  ;; ILD Support.

  (setq ild-abort-string ":q"
	ild-continue-string ":r"
	ild-next-string ":up"
	ild-next-string-arg ":up %s"
	ild-previous-string ":down"
	ild-previous-string-arg ":down %s"
	ild-top-string ":down 1000000"
	ild-bottom-string ":up 1000000"
	ild-backtrace-string ":bt"
	ild-locals-string ":fr"
	ild-local-string-arg ":loc %s"
	ild-return-string ":r"
	ild-retry-string nil		; needs work
	ild-trap-on-exit-string nil	; needs work
	)
  )

(if (not ecl-program) (setq ecl-program "ecl"))

;;; end of file -- ilisp-kcl.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-key.el0000600000175000001440000003315710020674035016012 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-key.el --
;;; ILISP keybinding definitions.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-key.el,v 1.12 2004/01/07 15:17:27 mkoeppe Exp $

;;; ilisp-where-is --
;;; New version provided by yusuf@SPD-13.ils.nwu.edu (Yusuf Pisan)
;;; Note: this used to be in 'ilisp-cpat'. Its definition did not make
;;;       much sense. Yusuf noted this and I decided to move it in
;;;       this file (where I think is more approriate).
;;;       11/24/94: Marco Antoniotti

(defun ilisp-where-is (command)
  (let ((cmd (where-is-internal command nil t)))
    (when cmd
      (key-description cmd))))


;;;
;;;%Bindings
(defun ilisp-safe-define-key (keymap key command &optional fsf-key)
  "In KEYMAP, bind KEY to COMMAND.
If optional fourth argument FSF-KEY is non-nil, then iff
`ilisp-*use-fsf-compliant-keybindings*' is non-nil, bind FSF-KEY
instead of KEY, unless FSF-KEY is a symbol, in which case do nothing."
  ;; Check boundp as well as nilp -- paranoia always pays, and this
  ;; code only gets run at setup time anyway:
  (if (and fsf-key
           (boundp 'ilisp-*use-fsf-compliant-keybindings*)
           ilisp-*use-fsf-compliant-keybindings*)
      (setq key fsf-key))
  (unless (symbolp key)
    (define-key keymap key command)))

(defun ilisp-bind-ilisp-key-for-map (keymap key command &optional fsf-key)
  "In KEYMAP, bind ilisp-*prefix*+KEY to COMMAND.
If optional fourth argument FSF-KEY is non-nil, then iff
`ilisp-*use-fsf-compliant-keybindings*' is non-nil, bind FSF-KEY
instead of KEY, unless FSF-KEY is a symbol, in which case do nothing."
  (let ((prefix-map (lookup-key keymap ilisp-*prefix*)))
    (unless (keymapp prefix-map)
      (setq prefix-map
	    (define-key keymap ilisp-*prefix* (make-sparse-keymap))))
    (ilisp-safe-define-key prefix-map key command fsf-key)))


(defun defkey-ilisp (key command &optional inferior-only-p fsf-key)
  "Define KEY as COMMAND in 'ilisp-mode-map' and 'lisp-mode-map'.
The change happens only if optional INFERIOR-ONLY-P is NIL.  If the maps
do not exist they will be created.  This should only be called after
ilisp-*prefix* is set to the desired prefix."
  (unless ilisp-mode-map (ilisp-bindings))
  (ilisp-safe-define-key ilisp-mode-map key command fsf-key)
  (unless inferior-only-p
    (ilisp-safe-define-key lisp-mode-map key command fsf-key)))

;;;
(defun lisp-bindings (keymap &optional inferior-p)
  "Sets up the bindings for interacting with an inferior LISP in KEYMAP."
  (cond (inferior-p
	 (define-key keymap "\C-m" 'return-ilisp)
	 (define-key keymap "\C-a" 'bol-ilisp)
	 (define-key keymap "\C-c\C-c" 'interrupt-subjob-ilisp)
	 (define-key keymap "\C-d" 'delete-char-or-pop-ilisp)
         ;; note: "#" is technically a violation of FSF keybinding
         ;; conventions, but we won't pass an alternate here because
         ;; it's not likely to cause a conflict in practice:
	 (ilisp-bind-ilisp-key-for-map keymap "#" 'raw-keys-ilisp "\C-b\C-^"))
	(t
	 (define-key keymap "\C-m" 'newline-and-indent-lisp)))

  ;; 19990901 Martin Atzmueller
  ;; 20000203 Karl Fogel: it's already bound to M-TAB anyway:
  (ilisp-safe-define-key keymap "\C-c\t" 'complete-lisp "\C-c\t")
  (define-key keymap [?\C-c return] `complete)

  ;; 20000401 Martin Atzmueller
  ;; Reinstated the ilisp-arglist-message-lisp-space by adding
  ;; a customization. C-c C-SPACE is _not_ the intended behavior.
  
  ;; 19991214 Martin Atzmueller

  ;; 20000203 Karl Fogel: C-c C-SPACE in the FSF-universe, I guess.
  ;; (ilisp-safe-define-key
  ;; keymap " "  'ilisp-arglist-message-lisp-space [?\C-c?\C- ])
  (when ilisp-bindings-*bind-space-p*
    (define-key keymap " "  'ilisp-arglist-message-lisp-space))

  ;; 20000203 Karl Fogel
  ;; This binding of ] causes many complaints, because lisp hackers
  ;; frequently need literal square braces in their code.  The
  ;; 'close-all-lisp function is a neat idea, but I think it needs to
  ;; be bound to something not used for any other purpose.  -karl
  ;; (define-key   keymap "]"        'close-all-lisp)
  ;;
  ;; 20000213 Marco Antoniotti
  ;; Reinstated the 'close-all' lisp by adding a programmable
  ;; customization.
  (when ilisp-bindings-*bind-right-bracket-p*
    (define-key   keymap "]"        'close-all-lisp))

  (define-key   keymap "\M-q"              'reindent-lisp)
  (ilisp-safe-define-key keymap "\C-]"     'close-and-send-lisp "\C-c\C-v]")
  (ilisp-safe-define-key keymap "\M-]"     'close-all-lisp "\C-c\C-v\C-]")
  (define-key   keymap "\t"                'indent-line-ilisp)
  (define-key   keymap "\n"                'newline-and-indent-lisp)
  (define-key   keymap "\M-\C-q"           'indent-sexp-ilisp)
  (ilisp-bind-ilisp-key-for-map keymap ";" 'comment-region-lisp "\C-v\C-\\")

  ;; note: again, a technical violation of FSF keybinding policy, but
  ;; safe & useful enough that I think it's best to leave it as is:
  (ilisp-bind-ilisp-key-for-map keymap ")"        'find-unbalanced-lisp "\C-v\C-u")

  (define-key   keymap "\M-\C-a"  'beginning-of-defun-lisp)
  (define-key   keymap "\M-\C-e"  'end-of-defun-lisp)
  (ilisp-safe-define-key keymap "\C-\M-r" 'reposition-window-lisp "\C-\M-r")

  ;; This series of bindings was very non-FSF-compliant, but was also
  ;; hard to fit into any consistent binding scheme.  I saved them for
  ;; last and then bound them to whatever was available.  -Karl Fogel
  (ilisp-bind-ilisp-key-for-map keymap "i" 'describe-lisp      "\C-q\C-d")
  (ilisp-bind-ilisp-key-for-map keymap "I" 'inspect-lisp       "\C-q\C-i")
  (ilisp-bind-ilisp-key-for-map keymap "a" 'arglist-lisp       "\C-q\C-a")
  (ilisp-bind-ilisp-key-for-map keymap "d" 'documentation-lisp "\C-q\C-o")
  (ilisp-bind-ilisp-key-for-map keymap "m" 'macroexpand-1-lisp "\C-bk")
  (ilisp-bind-ilisp-key-for-map keymap "M" 'macroexpand-lisp   "\C-b\C-k")

  (ilisp-safe-define-key keymap "\M-," 'next-definition-lisp "\M-,")
  (ilisp-safe-define-key keymap "\M-." 'edit-definitions-lisp "\M-.")
  (ilisp-safe-define-key keymap "\M-?" 'search-lisp "\C-c\C-v\C-s")
  (ilisp-safe-define-key keymap "\M-\"" 'replace-lisp "\C-c\C-v\C-r")
  (ilisp-bind-ilisp-key-for-map keymap "^" 'edit-callers-lisp "\C-v\C-e")
  (ilisp-safe-define-key keymap "\M-`" 'next-caller-lisp "\C-c\C-v\C-n")
  (define-key keymap "\M-\t" 'complete-lisp)
  
  ;; note: another technical fsf keybinding policy violation.  But
  ;; M-return is unbound in the FSF Emacs 20.5 distribution, and I
  ;; think a lot of people might like this binding.  I don't know,
  ;; really, it's just a judgement call.  -karl
  (define-key keymap "\M-\C-m"  'complete)

  (ilisp-bind-ilisp-key-for-map keymap "r"       'eval-region-lisp "\C-j\C-r")
  (ilisp-safe-define-key        keymap "\M-\C-x" 'eval-defun-lisp) ; like Gnu
  (ilisp-bind-ilisp-key-for-map keymap "e"       'eval-defun-lisp "\C-j\C-d")
  (ilisp-bind-ilisp-key-for-map keymap "n"       'eval-next-sexp-lisp "\C-j\C-n")
  (ilisp-bind-ilisp-key-for-map keymap "o"       'eval-last-sexp-lisp "\C-j\C-l")
  (ilisp-bind-ilisp-key-for-map keymap "j"       'eval-dwim-lisp "\C-j\C-j")
  (define-key keymap "\C-x\C-e" 'eval-last-sexp-lisp)
  
  ;; Changed as per Martin Atzmueller suggestions.
  ;; Original version
  ;; (ilisp-bind-ilisp-key-for-map keymap "p"        'package-lisp)
  ;;
  ;; todo: will there ever be `*-previous-*' functions defined,
  ;; analogous to `eval-next-sexp' etc?  If so, then the binding of
  ;; p/C-p below will be problematic.  -karl
  (ilisp-bind-ilisp-key-for-map keymap "p" 'set-buffer-package-lisp "\C-vp")

  (ilisp-bind-ilisp-key-for-map keymap "P" 'set-package-lisp "\C-v\C-p")
  (ilisp-bind-ilisp-key-for-map keymap "w" 'compile-region-lisp "\C-k\C-r")
  ;; MA 09/01/1999:
  (ilisp-bind-ilisp-key-for-map keymap "\C-b" 'ilisp-compile-buffer   "\C-k\C-b")
  (ilisp-bind-ilisp-key-for-map keymap "c"    'compile-defun-lisp     "\C-k\C-d")
  (ilisp-bind-ilisp-key-for-map keymap "\C-r" 'eval-region-and-go-lisp "\C-jr")
  (ilisp-bind-ilisp-key-for-map keymap "\C-e" 'eval-defun-and-go-lisp "\C-jd")
  (ilisp-bind-ilisp-key-for-map keymap "\C-n"
                                'eval-next-sexp-and-go-lisp
                                "\C-jn")
  (ilisp-bind-ilisp-key-for-map keymap "\C-o"
                                'eval-last-sexp-and-go-lisp
                                "\C-jl")
  (ilisp-bind-ilisp-key-for-map keymap "\C-j"
                                'eval-dwim-and-go-lisp
                                "\C-jj")
  (ilisp-bind-ilisp-key-for-map keymap "\C-t"
                                'compile-region-and-go-lisp
                                "\C-kr")
  (ilisp-bind-ilisp-key-for-map keymap "\C-c"
			'compile-defun-and-go-lisp
			"\C-kd")
  (ilisp-bind-ilisp-key-for-map keymap "t" 'trace-defun-lisp "\C-b\C-t")
  (ilisp-bind-ilisp-key-for-map keymap "!" 'default-directory-lisp "\C-v\C-d")
  (ilisp-bind-ilisp-key-for-map keymap " " 'mark-change-lisp "\C-v ")

  (ilisp-bind-ilisp-key-for-map keymap "*l" 'list-changes-lisp "\C-v\C-c")
  (ilisp-bind-ilisp-key-for-map keymap "*e" 'eval-changes-lisp "\C-j\C-c")
  (ilisp-bind-ilisp-key-for-map keymap "*c" 'compile-changes-lisp "\C-k\C-c")
  (ilisp-bind-ilisp-key-for-map keymap "*0" 'clear-changes-lisp "\C-vc")

  (ilisp-bind-ilisp-key-for-map keymap "b" 'switch-to-lisp "\C-v\C-a")
  (ilisp-bind-ilisp-key-for-map keymap "y" 'call-defun-lisp "\C-v\C-j")
  (ilisp-bind-ilisp-key-for-map keymap "z" 'reset-ilisp "\C-b\C-z")
  (ilisp-bind-ilisp-key-for-map keymap "g" 'abort-commands-lisp "\C-ba")
  (ilisp-bind-ilisp-key-for-map keymap "s" 'status-lisp "\C-b\C-y")
  (ilisp-bind-ilisp-key-for-map keymap "S" 'select-ilisp "\C-v\C-i")
  (define-key   keymap "\C-x\C-f" 'find-file-lisp)
  (ilisp-bind-ilisp-key-for-map keymap "l" 'load-file-lisp "\C-v\C-l")
  (ilisp-bind-ilisp-key-for-map keymap "k" 'compile-file-lisp "\C-k\C-f")

  ;; Conditionalized definitions of these keybindings, using the
  ;; appropriate flags.
  ;;
  ;; 19990824 Marco Antoniotti

  (when ilisp-*use-fi-clman-interface-p*
    (ilisp-bind-ilisp-key-for-map keymap "A" 'fi:clman-apropos)
    (ilisp-bind-ilisp-key-for-map keymap "D" 'fi:clman))
  (when ilisp-*use-hyperspec-interface-p*
    (ilisp-bind-ilisp-key-for-map keymap "H" 'hyperspec-lookup "\C-q\C-h")
    (ilisp-bind-ilisp-key-for-map keymap "F" 'hyperspec-lookup-format "\C-q\C-f"))
  (when ilisp-*use-cltl2-interface-p*
    (ilisp-bind-ilisp-key-for-map keymap "L" 'cltl2-lookup "\C-q\C-c")))


;;
(defun ilisp-lispm-bindings ()
  "Setup additional Lisp Machine-like bindings for some ilisp commands"
  (interactive)
  ;; Note: Changed the 'ilisp-emacs-version-id' to
  ;;       '+ilisp-emacs-version-id+' and the 'gnu-*' to 'fsf-*'.
  ;;       25/11/94 Marco Antoniotti
  ;;
  ;; Note: these bindings do not have to be FSF-compliant, because the
  ;;       user doesn't get them unless she asks for them, in which
  ;;       case she presumably knows what she wants. -Karl Fogel, 3 Feb 2000
  (cond ((eq +ilisp-emacs-version-id+ 'fsf-18))
	((or (eq +ilisp-emacs-version-id+ 'fsf-19)
	     (eq +ilisp-emacs-version-id+ 'fsf-20)
	     (eq +ilisp-emacs-version-id+ 'fsf-21))
	 (defkey-ilisp (read "[?\\S-\\C-a]") 'arglist-lisp)
	 (defkey-ilisp (read "[?\\S-\\C-c]") 'compile-defun-lisp)
	 (defkey-ilisp (read "[?\\S-\\C-d]") 'documentation-lisp)
	 (defkey-ilisp (read "[?\\S-\\C-e]") 'eval-defun-lisp)
	 (defkey-ilisp (read "[?\\S-\\C-m]") 'macroexpand-1-lisp)
	 (defkey-ilisp (read "[?\\M-M]") 'macroexpand-lisp))
	(t
	 (defkey-ilisp '(control A) 'arglist-lisp)
	 (defkey-ilisp '(control C) 'compile-defun-lisp)
	 (defkey-ilisp '(control D) 'documentation-lisp)
	 (defkey-ilisp '(control E) 'eval-defun-lisp)
	 (defkey-ilisp '(control M) 'macroexpand-1-lisp)
	 (defkey-ilisp '(meta M) 'macroexpand-lisp))))

;; Unfortunately, the read kludges are needed for this function to work
;; for GNU emacs 19 when it was compiled by Lucid.


;;;
(defun ilisp-bindings ()
  "Set up the key bindings for LISP and ILISP buffers."
  (cond ((fboundp 'set-keymap-parent) 
	 (setq ilisp-mode-map (make-sparse-keymap))
	 (set-keymap-parent ilisp-mode-map comint-mode-map))
	(t (setq ilisp-mode-map (copy-keymap comint-mode-map))))

  ;; Remove stop and quit subjob from comint
  (define-key ilisp-mode-map "\C-c\C-z" nil)
  (define-key ilisp-mode-map "\C-c\C-\\" nil)

  (when (fboundp 'lisp-mode-commands)
    (lisp-mode-commands ilisp-mode-map))
  (lisp-bindings ilisp-mode-map t)
  (when (and (memq 'lisp-mode lisp-source-modes)
	     (boundp 'lisp-mode-map))
    (lisp-bindings lisp-mode-map))
  (when (and (memq 'scheme-mode lisp-source-modes)
	     (boundp 'scheme-mode-map)) 
    (lisp-bindings scheme-mode-map))
  (ilisp-bind-ilisp-key-for-map emacs-lisp-mode-map ";" 'comment-region-lisp "\C-v\C-\\")

  (ilisp-bind-ilisp-key-for-map global-map "\C-t"
                                'trace-defun-lisp-break
                                "\C-b\C-u")
  (ilisp-bind-ilisp-key-for-map global-map "b" 'switch-to-lisp "\C-v\C-a")

  ;; Globally defined output-control commands.
  (ilisp-bind-ilisp-key-for-map global-map "1" 'ilisp-bury-output "\C-v\C-b")
  (ilisp-bind-ilisp-key-for-map global-map "v" 'ilisp-scroll-output "\C-v\C-v")
  (ilisp-bind-ilisp-key-for-map global-map "G" 'ilisp-grow-output "\C-v\C-g")

  ;; Added test to conditionalize the loading of the fi:clman map.
  ;;
  ;; 19990824 Marco Antoniotti

  (when ilisp-*use-fi-clman-interface-p*
    (unless (boundp 'fi:clman-mode-map)
      (setq fi:clman-mode-map (make-sparse-keymap)))
    (ilisp-bind-ilisp-key-for-map fi:clman-mode-map "D"
                                  'fi:clman)
    (ilisp-bind-ilisp-key-for-map fi:clman-mode-map "A"
                                  'fi:clman-apropos)))

(provide 'ilisp-key)

;;; end of file -- ilisp-key.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-kil.el0000600000175000001440000000426007277332355016012 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-kil.el --
;;; ILISP Panic/Reset/Status commands.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-kil.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $

;;;%% Panic/Reset/Status commands 
;;;
(defun status-lisp (showp)
  "Show the message of the current command being executed in the
inferior LISP.  With a prefix show pending sends as well."  
  (interactive "P")
  (save-excursion
    (set-buffer (ilisp-buffer))
    (comint-current-send showp)))


;;;
(defun reset-ilisp ()
  "Reset the inferior LISP top level."
  (interactive)
  (message "Reset LISP to top level")
  (comint-simple-send (ilisp-process) (ilisp-value 'ilisp-reset)))

;;;
(defun abort-commands-lisp (&optional message)
  "Abort the commands sent to the current ilisp."
  (interactive)
  (if (ilisp-value comint-aborting t)
      (message "Already aborted commands")
      (beep)
      (message (or message "Aborted commands"))
      (comint-abort-sends (ilisp-process))))

;;;
(defun panic-lisp ()
  "Panic reset for the inferior LISP."
  (interactive)
  (save-excursion
    (if (y-or-n-p "Panic reset LISP? ")
	(save-excursion
	  (set-buffer (ilisp-buffer))
	  (comint-setup-ipc t)
	  (message "LISP is reset, state is unknown"))
	(message ""))))

;;;
(defun repair-ilisp ()
  "If ilisp is not listening to you in the lisp interaction buffer, you might try this."
  (interactive)
  (set-buffer (ilisp-buffer))
  (comint-setup-ipc t)
  (goto-char (point-max))
  (insert "()")
  (return-ilisp)
  (message "ILISP is working again (maybe)"))


;;;
(defun interrupt-subjob-ilisp ()
  "Interrupt the current top level command in the inferior LISP."
  (interactive)
  (if (not (eq comint-send-queue comint-end-queue))
      (if (y-or-n-p "Abort commands before interrupting top level? ")
	  (abort-commands-lisp)
	  (message "Waiting for commands to finish")
	  (while (not (eq comint-send-queue comint-end-queue))
	    (accept-process-output)
	    (sit-for 0))))
  (message "Interrupted top level")
  (comint-interrupt-subjob))
ilisp-5.12.0+cvs.2004.12.26/ilisp-low.el0000600000175000001440000000740607556232575016044 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-low.el --
;;; ILISP low level interface functions Lisp <-> Emacs.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-low.el,v 1.4 2002/10/25 12:13:49 kevinrosenberg Exp $

;;;%Lisp mode extensions
;;;%%Sexps
(defun lisp-previous-sexp (&optional prefix)
  "Return the previous sexp.  If PREFIX is T, then prefix like ' or #'
are allowed."
  (save-excursion
    (condition-case ()
	(progn
	  (if (and (memq major-mode ilisp-modes)
		   (= (point)
		      (process-mark (get-buffer-process (current-buffer)))))
	      nil
	      (if (not
		   (or (eobp) (memq (char-after (point)) '(? ?\) ?\n ?\t))))
		  (forward-sexp))
	      (skip-chars-backward " \t\n")
	      (let ((point (point)))
		(backward-sexp)
		(skip-chars-backward "^ \t\n(\",")
		(if (not prefix) (skip-chars-forward "#'"))
		(buffer-substring-no-properties (point) point))))
      (error nil))))

;;;
(defun lisp-def-name (&optional namep)
  "Return the name of a definition assuming that you are at the start
of the sexp.  If the form starts with DEF, the form start and the next
symbol will be returned.  Optional NAMEP will return only the name without the defining symbol."
  (let ((case-fold-search t))
    (if (looking-at
	 ;; (( \( (def*) (( \( (setf)) | \(?)) | \(?) (symbol)
	 ;; 12    3    3 45    6    65      42      1 7      7
	 ;;0011\(22 def*        22         32 43\(54 setf54         43   \(?32 11      00 60           60
	 "\\(\\((\\(def[^ \t\n]*\\)[ \t\n]+\\(\\((\\(setf\\)[ \t\n]+\\)\\|(*\\)\\)\\|(?\\)\\([^ \t\n)]*\\)")
	(let ((symbol (buffer-substring-no-properties (match-beginning 7) (match-end 7))))
	  (if (match-end 6)
	      (concat (if (not namep) 
			  (concat 
			   (buffer-substring-no-properties (match-beginning 3) (match-end 3))
			   " "))
		      "("
		      (buffer-substring-no-properties (match-beginning 6) (match-end 6))
		      " " symbol ")")
	      (if (match-end 3)
		  (concat (if (not namep)
			      (concat 
			       (buffer-substring-no-properties (match-beginning 3) 
						 (match-end 3))
			       " "))
			  symbol)
		  symbol))))))


;;;
(defun lisp-minus-prefix ()
  "Set current-prefix-arg to its absolute value if numeric and return
T if it is a negative."
  (if current-prefix-arg
      (if (symbolp current-prefix-arg)
	  (progn (setq current-prefix-arg nil) t)
	  (if (< (setq current-prefix-arg
		       (prefix-numeric-value current-prefix-arg))
		 0)
	      (progn 
		(setq current-prefix-arg (- current-prefix-arg)) t)))))



;;;%%Defuns
(defun lisp-defun-region-and-name ()
  "Return the region of the current defun and the name starting it."
  (save-excursion
    (let ((end (lisp-defun-end))
	  (begin (lisp-defun-begin)))
      (list begin end (lisp-def-name)))))
  
;;;
(defun lisp-region-name (start end)
  "Return a name for the region from START to END."
  (save-excursion
    (goto-char start)
    (if (re-search-forward "^[ \t]*[^;\n]" end t)
	(forward-char -1))
    (setq start (point))
    (goto-char end)
    (re-search-backward "^[ \t]*[^;\n]" start 'move)
    (end-of-line)
    (skip-chars-backward " \t")
    (setq end (min (point) end))
    (goto-char start)
    (let ((from
	   (if (= (char-after (point)) ?\()
	       (lisp-def-name)
	       (buffer-substring-no-properties (point) 
				 (progn (forward-sexp) (point))))))
      (goto-char end)
      (if (= (char-after (1- (point))) ?\))
	  (progn
	    (backward-sexp)
	    (if (= (point) start)
		from
		(concat "from " from " to " (lisp-def-name))))
	  (concat "from " from " to " 
		  (buffer-substring-no-properties (save-excursion
				      (backward-sexp)
				      (point)) 
				    (1- (point))))))))
ilisp-5.12.0+cvs.2004.12.26/ilisp-luc.el0000600000175000001440000000441007531601216015777 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-luc.el --
;;; ILISP Lucid Common Lisp dialect definition
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-luc.el,v 1.3 2002/08/23 21:40:09 anisotropy9 Exp $

;;;%%%Lucid
(defvar ilisp-lucid-init-file "lucid.lisp")


(defun lucid-check-prompt (old new)
  "Compare the break level printed at the beginning of the prompt."
  (let* ((old-level (if (and old (eq 0 (string-match "\\(->\\)+" old)))
 			(- (match-end 0) (match-beginning 0))
 			0))
	 (new-level (if (eq 0 (string-match "\\(->\\)+" new))
 			(- (match-end 0) (match-beginning 0))
 			0)))
    (<= new-level old-level)))

;;;
(defdialect lucid "Lucid Common LISP"
  common-lisp
  (ilisp-load-init 'lucid ilisp-lucid-init-file)
  (setq comint-prompt-regexp "^\\(->\\)+ \\|^[^> ]*> "
	comint-fix-error ":a"
	ilisp-reset ":a :t"
	comint-continue ":c"
	comint-interrupt-regexp ">>Break: Keyboard interrupt"
	comint-prompt-status 
	(function (lambda (old line)
	  (comint-prompt-status old line 'lucid-check-prompt))))
  (setq ilisp-error-regexp "ILISP:[^\"]*\\|>>[^\n]*")
  (setq ilisp-source-types (append ilisp-source-types '(("any"))))
  (setq ilisp-find-source-command 
	"(ilisp:ilisp-source-files \"%s\" \"%s\" \"%s\")")

  ;; Note:
  ;; 19990920
  ;; The global definition should now take care to find out the
  ;; proper extension.  See file 'ilisp-cl.el'.
  
  ;;(setq ilisp-binary-command 
  ;;	"(first (last lucid::*load-binary-pathname-types*))")

  ;; ILD Support
  (setq ild-abort-string ":A"
       ild-continue-string ":C"
       ild-next-string ":N"
       ild-next-string-arg ":N %s"
       ild-previous-string ":P"
       ild-previous-string-arg ":P %s"
       ild-top-string ":<"
       ild-bottom-string ":>"
       ild-backtrace-string ":B"
       ild-locals-string ":V"
       ild-local-string-arg ":L %s"
       ild-return-string ":R"
       ild-retry-string ":F"
       ild-trap-on-exit-string ":X T")
  )

(unless lucid-program (setq lucid-program "lisp"))

(defdialect liquid "Liquid Common Lisp" lucid)

(unless liquid-program (setq liquid-program "lisp"))

;;; end of file -- ilisp-luc.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-mak.el0000600000175000001440000000650107646062671016004 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-mak.el --
;;; This file is used by make to compile ILISP.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-mak.el,v 1.11 2003/04/10 18:50:33 rgrjr Exp $

(require 'cl)

(message "ILISP Compilation: starting.")

(if (not (file-exists-p "ilcompat.el"))
    (error "ILISP Compilation: compatibility file 'ilcompat.el' non existent.")
  (progn
    (push "." load-path)
    (load "ilcompat.el")		; Need to load this beforehand
					; to use the +ilisp-emacs-version-id+
					; constant.
    (message ";;; Emacs Version %s" +ilisp-emacs-version-id+)

    (when (eq +ilisp-emacs-version-id+ 'xemacs)
      (setq load-path (cons "../xemacs-base" load-path)))

    (if (eq +ilisp-emacs-version-id+ 'fsf-18)
        (load "comint-v18")
      ;; (load "comint")
      (require 'comint))

    ;; Try to generate bytecodes for emacs 19.
    ;; I am no expert on the Byte Compiler.  Anyone who is please send
    ;; me mail.
    ;; Marco Antoniotti 

    ;; (if (eq +ilisp-emacs-version-id+ 'fsf-18)
    ;;	(setq byte-compile-emacs18-compatibility t))


    ;; Compile compatibility files
    
    (cond ((or (eq +ilisp-emacs-version-id+ 'lucid-19)
               (eq +ilisp-emacs-version-id+ 'lucid-19-new))
           (byte-compile-file "illuc19.el"))
          ((eq +ilisp-emacs-version-id+ 'xemacs)
           (byte-compile-file "ilxemacs.el"))
          ((eq +ilisp-emacs-version-id+ 'fsf-21)
           (byte-compile-file "ilfsf21.el"))
          ((eq +ilisp-emacs-version-id+ 'fsf-20)
           (byte-compile-file "ilfsf20.el"))
          ((eq +ilisp-emacs-version-id+ 'fsf-19)
           (byte-compile-file "ilfsf19.el"))
          ((eq +ilisp-emacs-version-id+ 'fsf-18)
           (byte-compile-file "ilfsf18.el"))
          (t (error "ILISP Compilation: unrecognized Emacs version %s"
                    +ilisp-emacs-version-id+)))
    (byte-compile-file "ilcompat.el")

    ;; Other files in the distribution.

    (let ((files '("completer"
		   "comint-ipc"
		   "bridge"
                   ;; not integrated yet!
		   ;; "custom-ilisp"
		   "ilisp-def"
		   "ilisp-sym"
		   "ilisp-inp"
		   "ilisp-ind"

		   "ilisp-mouse"
		   "ilisp-prc"
		   "ilisp-val"
		   "ilisp-out"
		   "ilisp-mov"
		   "ilisp-key"
		   "ilisp-prn"
		   "ilisp-low"
		   "ilisp-doc"
		   "ilisp-ext"
		   "ilisp-mod"
		   "ilisp-dia"
		   "ilisp-cmt"
		   "ilisp-rng"
		   "ilisp-hnd"
		   "ilisp-utl"
		   "ilisp-cmp"
		   "ilisp-kil"
		   "ilisp-snd"
		   "ilisp-xfr"
		   "ilisp-hi"
		   "ilisp-aut"
		   "ilisp-mnb"
		   "ilisp-src"

		   ;; ILD Support.
		   "ild"

		   ;; Dialects.
		   "ilisp-cl"
		   "ilisp-ccl"
		   "ilisp-cmu"
		   "ilisp-sbcl"
		   "ilisp-chs"
		   "ilisp-acl"
		   "ilisp-kcl"
		   "ilisp-hlw"
		   "ilisp-luc"
		   "ilisp-xls"
		   "ilisp-openmcl"
		   "ilisp-sch"
		   "ilisp-cl-easy-menu"
		   "ilisp-scheme-easy-menu"
		   "ilisp-imenu"
		   "extra/hyperspec"
		   "extra/cltl2"

		   )))
      (dolist (f files)
        (byte-compile-file (format "%s.el" f) 0))
      ;;Main mode file
      (byte-compile-file "ilisp.el")
      (message "Done compiling and loading ILISP."))))

;;; end of file -- ilisp-mak.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-menu.el0000600000175000001440000000365607277332355016207 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-menu.el --
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-menu.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $


(cond ((or (string-match "XEmacs" emacs-version)
	   (string-match "Lucid" emacs-version)))
      (t


       (require 'simple-menu)
       (setplist 'lisp-command-menu nil)
       (def-menu 'lisp-command-menu
	   "Lisp"
	 "These ILISP commands are available on the menu:"
	 '(
	   ("Break        Interupt current lisp."  
	    (progn (switch-to-lisp t)
		   (interrupt-subjob-ilisp)))
	   ("Doc          Menu of commands to get help on variables, etc."
	    documentation-lisp-command-menu)
	   ("Xpand        macroexpand-lisp."        macroexpand-lisp)
	   ("Eval         Eval the surrounding defun." eval-defun-lisp)
	   ("1E&G         Eval defun and goto Inferior LISP." eval-defun-and-go-lisp)
	   (";            Comment the region."   comment-region-lisp)
	   (")            find-unbalanced-lisp parens." find-unbalanced-lisp)
	   ("]            close-all-lisp parens that are open." close-all-lisp)
	   ("Trace        Traces the previous function symbol." trace-lisp)
	   )
	 )

       (setplist 'documentation-lisp-command-menu nil)
       (def-menu 'documentation-lisp-command-menu
	   "Lisp help"
	 "These commands are available for examining Lisp structures:"
	 '(
	   ("UDoc         Get user's documentation string." documentation-lisp)
	   ("Rglist       Get the arglist for function." arglist-lisp)
	   ("Insp         Inspect the current sexp." inspect-lisp)
	   ("1Insp        Prompts for something to inspect." (inspect-lisp -4))
	   ("Descr        Describe the current sexp." describe-lisp)
	   ("1Descr       Prompts for something to describe." (describe-lisp -4))
	   )
	 )))

(provide 'ilisp-menu)
ilisp-5.12.0+cvs.2004.12.26/ilisp-mnb.el0000600000175000001440000001216707277332355016014 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-mnb.el --
;;; ILISP Menu Setup.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-mnb.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $

(require 'ilisp-key)

(defvar lisp-general-menu-map (make-sparse-keymap "Lisp")
  "Keymap for main LISP menu")


(defkey-ilisp [menu-bar lisp]
  (cons "Lisp" lisp-general-menu-map))


(defkey-ilisp [menu-bar lisp repair]
  '("Repair Connection" . repair-ilisp))

(defkey-ilisp [menu-bar lisp reset]
    '("Reset Connection" . reset-ilisp))

(defkey-ilisp [menu-bar lisp comment-region]
  '("Comment Region" . comment-region))

;;; (defkey-ilisp [menu-bar lisp sep-1]
;;;   '("-" . ilisp-nop))

(defkey-ilisp [menu-bar lisp macroexpand]
  '("Macroexpand" . macroexpand-lisp))

(defkey-ilisp [menu-bar lisp macroexpand-1]
  '("Macroexpand 1" . macroexpand-1-lisp))

(defkey-ilisp [menu-bar lisp set-package]
  '("Set Lisp Package" . set-package-lisp))

(defkey-ilisp [menu-bar lisp set-buffer-package]
  '("Set Buffer Package" . set-buffer-package-lisp))
   
(defkey-ilisp [menu-bar lisp arglist]
  '("Arglist" . arglist-lisp))

(defkey-ilisp [menu-bar lisp documentation]
  '("Documentation" . documentation-lisp))

(defkey-ilisp [menu-bar lisp describe]
  '("Describe" . describe-lisp))

(defkey-ilisp [menu-bar lisp inspect]
  '("Inspect" . inspect-lisp))

(defkey-ilisp [menu-bar lisp eval-defun]
  '("Eval Defun" . eval-defun-and-go-lisp))

(defkey-ilisp [menu-bar lisp start-inferior-lisp]
    '("Start Lisp"
      "Starts an inferior lisp asking for a dialect name"
      . run-ilisp))


(defun ilisp-nop () nil)

;;; Make sure the menu items are properly marked.
;;; Checking for 'ilisp-buffer' is very crufty, but I think it is OK
;;; for the time being. The function 'ilisp-initialized' is not very
;;; good for this.

(put 'macroexpand-lisp 'menu-enable 'ilisp-buffer)
(put 'macroexpand-1-lisp 'menu-enable 'ilisp-buffer)
(put 'set-package-lisp 'menu-enable 'ilisp-buffer)
(put 'arglist-lisp 'menu-enable 'ilisp-buffer)
(put 'documentation-lisp 'menu-enable 'ilisp-buffer)
(put 'inspect-lisp 'menu-enable 'ilisp-buffer)
(put 'describe-lisp 'menu-enable 'ilisp-buffer)
(put 'eval-defun-and-go-lisp 'menu-enable 'ilisp-buffer)
(put 'run-ilisp 'menu-enable '(null ilisp-buffer))
(put 'reset-ilisp 'menu-enable 'ilisp-buffer)
(put 'repair-ilisp 'menu-enable 'ilisp-buffer)

(put 'comment-region 'menu-enable 'mark-active)


;;; ilisp-update-menu --
;;; Update the status of the menu "Lisp".

;; This variable should disappear!

(defvar ilisp-process-active-p nil
  "Kludge to keep track whether the Inf. Lisp is active or not.")

(defun ilisp-update-menu (status)
  (when (eq status 'exit)
    ;; (setq ilisp-process-active-p nil)
    (put 'macroexpand-lisp 'menu-enable 'ilisp-buffer)
    (put 'macroexpand-1-lisp 'menu-enable 'ilisp-buffer)
    (put 'set-package-lisp 'menu-enable 'ilisp-buffer)
    (put 'arglist-lisp 'menu-enable 'ilisp-buffer)
    (put 'documentation-lisp 'menu-enable 'ilisp-buffer)
    (put 'inspect-lisp 'menu-enable 'ilisp-buffer)
    (put 'describe-lisp 'menu-enable 'ilisp-buffer)
    (put 'eval-defun-and-go-lisp 'menu-enable 'ilisp-buffer)
    ;; (put 'run-ilisp 'menu-enable '(and (null ilisp-buffer)
    ;;                                ilisp-process-active-p)
    (put 'run-ilisp 'menu-enable (null ilisp-buffer))
    (put 'reset-ilisp 'menu-enable 'ilisp-buffer)
    (put 'repair-ilisp 'menu-enable 'ilisp-buffer)
    )
  ;; no-op otherwise
  )

;;;(setplist 'lisp-command-menu nil)
;;;(def-menu 'lisp-command-menu
;;;    "Lisp"
;;;  "These ILISP commands are available on the menu:"
;;;  '(
;;;    ("Break        Interupt current lisp."  
;;;     (progn (switch-to-lisp t)
;;;	    (interrupt-subjob-ilisp)))
;;;    ("Doc          Menu of commands to get help on variables, etc."
;;;     documentation-lisp-command-menu)
;;;    ("Xpand        macroexpand-lisp."        macroexpand-lisp)
;;;    ("Eval         Eval the surrounding defun." eval-defun-lisp)
;;;    ("1E&G         Eval defun and goto Inferior LISP." eval-defun-and-go-lisp)
;;;    (";            Comment the region."   comment-region-lisp)
;;;    (")            find-unbalanced-lisp parens." find-unbalanced-lisp)
;;;    ("]            close-all-lisp parens that are open." close-all-lisp)
;;;    ("Trace        Traces the previous function symbol." trace-lisp)
;;;    )
;;;  )

;;;(setplist 'documentation-lisp-command-menu nil)
;;;(def-menu 'documentation-lisp-command-menu
;;;    "Lisp help"
;;;  "These commands are available for examining Lisp structures:"
;;;  '(
;;;    ("UDoc         Get user's documentation string." documentation-lisp)
;;;    ("Rglist       Get the arglist for function." arglist-lisp)
;;;    ("Insp         Inspect the current sexp." inspect-lisp)
;;;    ("1Insp        Prompts for something to inspect." (inspect-lisp -4))
;;;    ("Descr        Describe the current sexp." describe-lisp)
;;;    ("1Descr       Prompts for something to describe." (describe-lisp -4))
;;;    )
;;;  )

(provide 'ilisp-mnb)

;;; end of file -- ilisp-mnb.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-mod.el0000600000175000001440000001230007543531427016001 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-mod.el --
;;; ILISP mode top level definitions.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-mod.el,v 1.7 2002/09/23 02:35:11 rgrjr Exp $

;;;%ilisp-mode

(defun ilisp-byte-code-to-list (function)
  "Returns a list suitable for passing to make-byte-code from FUNCTION."
  (let ((function-object 
	 (if (symbolp function)
	     (symbol-function function)
	   function)))
    (if (fboundp 'compiled-function-arglist)
	;; XEmacs
	(read (concat "("
		      (substring (let ((print-readably t))
				   (prin1-to-string function-object))
				 2 -1)
		      ")"))
      ;; FSFmacs
      (append function-object nil))))

;;;
(defun ilisp-set-doc (function string)
  "Set the documentation of the symbol FUNCTION to STRING."
  (let* ((old-function (symbol-function function)))
    (cond ((listp old-function)
	   ;; Probe to test whether function is in preloaded read-only
	   ;; memory, and if so make writable copy:
	   (condition-case nil
	       (setcar old-function (car old-function))
	     (error
	      (setq old-function (copy-sequence old-function)) ; shallow copy only
	      (fset function old-function)))
	   (let ((ndoc-cdr (nthcdr 2 old-function)))
	     (if (stringp (car ndoc-cdr))
		 ;; Replace the existing docstring.
		 (setcar ndoc-cdr string)
	       ;; There is no docstring.  Insert the overwrite msg.
	       (setcdr ndoc-cdr (cons (car ndoc-cdr) (cdr ndoc-cdr)))
	       (setcar ndoc-cdr string))))
	  (t
	   ;; it's an emacs19 compiled-code object
	   (let ((new-code (ilisp-byte-code-to-list old-function)))
	     (if (nthcdr 4 new-code)
		 (setcar (nthcdr 4 new-code) string)
	       (setcdr (nthcdr 3 new-code) (cons string nil)))
	     (fset function (apply 'make-byte-code new-code)))))))
    


;;;
(defun ilisp-mode ()
  (interactive)
  (run-ilisp))

(ilisp-set-doc 'ilisp-mode ilisp-documentation)
(ilisp-set-doc 'lisp-mode ilisp-documentation)

;;;%%ILISP
(defun lisp-command-args (command-line)
  "Break up COMMAND-LINE into (command args ...)"
  (condition-case nil
      (loop with start = 0
            while start
            for pos = (string-match "\\S-" command-line start)
            while pos
            if (char-equal (aref command-line pos) ?\")
            collect (let ((str+end-pos (read-from-string command-line pos)))
                      (setq start (cdr str+end-pos))
                      (car str+end-pos))
            else collect (let ((end-pos (string-match "\\s-" command-line pos)))
                           (setq start end-pos)
                           (substring command-line pos end-pos)))
    (error (error "Invalid inferior Lisp program command line"))))


;;;
(defun ilisp (name setup)
  "Run an inferior LISP process NAME, input and output via buffer *name*.
If there is a process already running in *name*, just switch to that buffer.
Takes the program name from the variable ilisp-program.
\(Type \\[describe-mode] in the process buffer for a list of commands.)"
  (set-buffer ilisp-buffer)
  (if (not (comint-check-proc ilisp-buffer))
      (let* ((dialect (car ilisp-dialect))
	     (program ilisp-program)
	     (args (lisp-command-args program))
	     (process-connection-type ilisp-*process-connection-type*)
	     (names (format "%s" name))
	     start)
	(apply 'make-comint name (car args) nil (cdr args))
	(comint-setup-ipc)
	;; Because comint-mode kills all buffer-local variables in
	;; fsf-19 we have to re-call the setup here.
	(funcall setup name)
	(setq major-mode 'ilisp-mode
	      mode-name "ILISP")
	(rplaca (car comint-send-queue) 
		(function (lambda ()
			    (run-hooks 'ilisp-init-hook-local))))
	(setq ilisp-initialized (delete* ilisp-buffer ilisp-initialized
					 :test #'equal))
	(unless (member* names ilisp-buffers :key #'car :test #'equal)
	  (setq ilisp-buffers (cons (list names) ilisp-buffers)))
	(lisp-pop-to-buffer ilisp-buffer)
	(setq start (window-start (selected-window))
	      ilisp-program program)
	(goto-char (point-max))
	(insert (format "Starting %s ...\n" ilisp-program))
	(set-marker (process-mark (ilisp-process)) (point))
	(funcall comint-update-status 'start)
	
	(when ilisp-motd
	  (lisp-display-output (format ilisp-motd ilisp-*version*))
	  (sleep-for 3)
	  (set-window-start (selected-window) start))

	(unless ilisp-*prefix-match* (require 'completer)))

      (lisp-pop-to-buffer ilisp-buffer))
  (use-local-map ilisp-use-map)
  ;; This is necessary to get mode documentation to come out right
  (set-default 'ilisp-use-map ilisp-use-map))


;;;%Manual
(autoload 'fi:clman         "fi/clman" 
	  "Look up SYMBOL in the online manual with completion." t)
(autoload 'fi:clman-apropos "fi/clman" 
	  "Do an apropos search in online manual for STRING." t)

;;;%Bridges
(autoload 'install-bridge "bridge" "Install process bridge." t)

;;;%Modes
(set-default 'auto-mode-alist
	     (append '(("\\.cl$" . lisp-mode) ("\\.lisp$" . lisp-mode))
		     auto-mode-alist))
(setq completion-ignored-extensions 
      (append '(".68fasl" ".sfasl" ".ifasl" ".pfasl" 
		".68fasl4" ".sfasl4" ".ifasl4" ".pfasl4" 
		".sbin")
	      completion-ignored-extensions))
ilisp-5.12.0+cvs.2004.12.26/ilisp-mouse.el0000600000175000001440000002704007645635535016371 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-mouse.el --
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-mouse.el,v 1.3 2003/04/11 22:02:05 rgrjr Exp $

;;; Unlike most other ilisp source files, ilisp-mouse is meant to be loadable by
;;; itself, in case you want to click M-left on a C definition name or URL, for
;;; which you don't need any of the Lisp support machinery.  It also works with
;;; Franz Inc's "eli" interface to ACL via emacs.
;;;
;;; To use this independently of ilisp, ensure that this directory is on your
;;; search path, and put the following in your .emacs file:
;;;
;;;	(require 'ilisp-mouse)
;;;	;; Need to nuke the 'down' event binding, or the 'up' gets swallowed.
;;;	(global-set-key [M-down-mouse-1] nil)
;;;	(global-set-key [M-mouse-1] 'ilisp-mouse-edit-thing)
;;;
;;; Meta-Left (aka Alt-Left aka M-mouse-1) is the traditional binding, but be
;;; aware that many window managers intercept this gesture to iconify the
;;; window, or some other stupid thing.  If you find this is the case, you can
;;; either tell the WM not to do that, or pick another mouse gesture.  (You
;;; should also be aware that Emacs by default uses M-mouse-1 to manipulate the
;;; secondary selection.)
;;;
;;; When this file is loaded without ilisp (or eli), of course, it can't use the
;;; Lisp to find Common Lisp definitions.  However, starting a Lisp session via
;;; ilisp will automagically restore this functionality.
;;;

;; tags package fns are used by ilisp-edit-thing and ilisp-thing-around-point.
;; [I'd like to condition (require 'tags) on whether we actually need it, but
;; the funcall in ilisp-edit-thing is problematic.  -- rgr, 12-Apr-94.]
(cond ((string-match "^Lucid" (emacs-version))
	;; In lemacs, the "tags" feature is provided by the "etags" file.
	(or (memq 'tags features)
	    (load "etags")))
      ;; End [arguable] of braindeath.  -- rgr, 26-Oct-94.
      ((string-match emacs-version "^18\\.") (require 'tags))
      (t (require 'etags)))

;;;; Variables and macros.

(defvar ilisp-mouse-use-ange-ftp-p t
  "*Whether to use ange-ftp to open 'FILE:' and 'FTP:' URLs in emacs
when you mouse on them; the default is 'yes'.")

(defvar ilisp-url-regexp
	"^ right, since this is
	    ;; allowed to contain whitespace, which is supposed to be
	    ;; eliminated.  -- rgr, 3-Jan-00.]
	    (require 'browse-url)
	    (let ((better-thing (browse-url-url-at-point)))
	      (if (or (> (length better-thing) (length thing))
		      (string-match "^= (point) boundary)
			   ;; Boundary was in string
			   (if (> (point) string-boundary)
			       (progn	;String ended in next defun
				 (goto-char string-boundary)
				 nil)
			       (if (> (setq boundary
					    (lisp-find-next-start))
				      final)
				   ;; Normal defun
				   (progn (goto-char final) nil)
				   t))
			   t)
		       ;; Unclosed string
		       nil)))))
    (re-search-backward  "^[^; \t\n]\\|^[^;\n][ \t]*[^ \t\n]" point t)
    (end-of-line)
    (skip-chars-backward " \t")
    (if (< (point) point)
	(goto-char point)
	(if (save-excursion
	      (let ((point (point)))
		(beginning-of-line)
		(if comment-start (search-forward comment-start point t))))
	    (progn (next-line 1) (indent-line-ilisp)))
	(point))))

;;;
(defun lisp-in-comment (test)
  "Return T if you are in a comment."
  (beginning-of-line)
  (and (looking-at test)
       (not (= (match-end 0)
	       (progn (end-of-line) (point))))))

;;;
(defun lisp-in-string (&optional begin end)
  "Return the string region that immediately follows/precedes point or
that contains point in optional region BEGIN to END.  If point is in
region, T will be returned as well."
  (save-excursion
    (if (not begin)
	(save-excursion
	  (setq end (lisp-end-defun-text)
		begin (lisp-defun-begin))))
    (let* ((point (progn (skip-chars-forward " \t") (point)))
	   (done nil))
      (goto-char begin)
      (while (and (< (point) end) (not done))
	(skip-chars-forward "^\"" end)
	(setq begin (point))
	(if (< begin end)
	    (if (and (not (bobp)) (= (char-after (1- begin)) ?\\))
		(forward-char)
		(if (condition-case () (progn (forward-sexp) (<= (point) end))
		      (error nil))
		    (progn		;After string
		      (skip-chars-forward " \t")
		      (if (or (= begin point) (= point (point)))
			  (setq done (list begin (point) nil))
			  (if (and (< begin point) (< point (point)))
			      (setq done (list begin (point) t)))))
		    ;; In string at end of buffer
		    (setq done (list begin end t))))))
      done)))
ilisp-5.12.0+cvs.2004.12.26/ilisp-openmcl.el0000600000175000001440000000305007531601216016650 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-openmcl

;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.

;;;
;;; ILISP OpenMCL Common Lisp dialect definition
;;;
;;;


;;;%%%OpenMCL
(defvar ilisp-openmcl-init-file "openmcl.lisp")

(defun openmcl-check-prompt (old new)
  "Compare the break level printed at the beginning of the prompt."
  (let* ((old-level (if (and old (eq 1 (string-match "[0-9]+" old)))
 			(string-to-int (substring old 1))
 			0))
 	 (new-level (if (eq 1 (string-match "[0-9]+" new))
 			(string-to-int (substring new 1))
 			0)))
    (<= new-level old-level)))

;;;
(defdialect openmcl "OpenMCL"
  common-lisp
  (ilisp-load-init 'openmcl ilisp-openmcl-init-file)

  (setq comint-prompt-regexp "^\\([0-9]+ >\\|\\?\\|Step>\\|Inspect.*>\\) "
	ilisp-trace-command "(ilisp::openmcl-trace \"%s\" \"%s\" \"%s\")"
	comint-prompt-status 
	(function (lambda (old line)
	  (comint-prompt-status old line 'openmcl-check-prompt)))

	ilisp-error-regexp "ILISP:[^\"]*\\|Error [^\n]*\n\n"


	ilisp-arglist-command "(ilisp::arglist \"%s\" \"%s\")"

	ilisp-find-source-command "(ilisp::source-file \"%s\" \"%s\" \"%s\")"

	comint-fix-error ":pop"

	comint-continue ":go"

	ilisp-reset ":q"

	comint-interrupt-regexp "Break .*:"


	ilisp-directory-command  "(ccl::current-directory-name)"
	ilisp-set-directory-command "(ccl:cwd \"%s\")"

	))


(if (not openmcl-program) (setq openmcl-program "openmcl"))
ilisp-5.12.0+cvs.2004.12.26/ilisp-out.el0000600000175000001440000007676407641374652016065 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-out.el --
;;; ILISP output, including a popper replacement.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-out.el,v 1.15 2003/03/26 03:22:47 rgrjr Exp $

;;; Old history log.
;;;
;;; 2000-03-02: Martin Atzmueller: general rewrite to support
;;; a general interface for multiple different output-frames.


(defvar ilisp-*icon-file* "/pictures/ilisp-icon.bmp")

(defun ilisp-find-ilisp-icon ()
  (if (and ilisp-*icon-file*
	   (file-exists-p (concat ilisp-*directory* ilisp-*icon-file*)))
      (concat ilisp-*directory* ilisp-*icon-file*)
    t))

(defun ilisp-make-output-frame (name)
  (when (and window-system ilisp-*use-frame-for-output*)
    (let ((new-frame
	   (make-frame `((name . ,name)
			 (minibuffer . nil)
			 (visibility . nil)
			 (unsplittable . t)
			 (menu-bar-lines . 0)
			 ;; Use of icon-type is currently disabled due to a bug
			 ;; in at least Emacs 21.1 running on Windows.
			 ;; (icon-type . ,(ilisp-find-ilisp-icon))
			 )))
	   )
      (when (eq +ilisp-emacs-version-id+ 'xemacs)
	(set-frame-properties new-frame '(default-toolbar-visible-p nil
					  default-gutter-visible-p nil
					  menubar-visible-p nil
					  has-modeline-p t))
	)
      new-frame)))


(defvar ilisp-display-output-function 'ilisp-display-output-default
  "The name of a function to display all ilisp output.
The function gets a single argument, a string.")


;;; ilisp-output-sink --
;;; Datastructure for a output sink that points to its 
;;; output-{buffers|frames|windows}

(defstruct ilisp-output-sink
  (buffer nil)
  (frame nil)
  (frame-name nil)
  (mode nil)
  (modeline nil)
  (set-modeline-p nil)
  (major-mode-def nil)
  (window-min-height nil)
  (window-max-height nil)
  (frame-min-height nil)
  (frame-min-width nil))


;;; general ilisp-output

(defvar ilisp-output-mode nil
  "If T, then we are in the ilisp-output minor mode.")

;; Minor mode (just to get a pretty mode line).

(defvar ilisp-output-mode-line nil)


(make-variable-buffer-local 'ilisp-output-mode)

(or (assq 'ilisp-output-mode minor-mode-alist)
    (setq minor-mode-alist
	  (cons '(ilisp-output-mode ilisp-output-mode-line) minor-mode-alist)))


;;; ilisp-output
;;; ilisp-output is the default for all commands

(defvar ilisp-output nil "Output for general ILISP-output")

(setq ilisp-output
      (make-ilisp-output-sink
       :buffer          " *Output*"
       :major-mode-def      'lisp-mode  ; The major mode for the
					; typeout window.
       :frame nil
       ;; Cached frame for ILISP output. If no window system is
       ;; 'running' then the value of this is nil.
       :frame-name "ILISP Output"
       :modeline 'ilisp-output-mode-line
       :set-modeline-p t
       :mode 'ilisp-output-mode
       :window-min-height 2		; The minimum height of the
					; typeout window
       :window-max-height 25		; The maximum height of the
					; typeout window
       :frame-min-height 5		; Rows
       :frame-min-width 70		; Columns
       ))


;;; arglist-output

(defvar ilisp-arglist-output nil "Output sink for Arglist messages.")

(if ilisp-*use-frame-for-arglist-output-p*
    (progn
      ;; if seperate output for arglist enabled, then use it!
      (setq ilisp-arglist-output
            (make-ilisp-output-sink
             :buffer " *Arglist-Output*"
             :major-mode-def 'lisp-mode ; The major mode for the
					; typeout window.
             :frame nil
             ;; Cached frame for ILISP output. If no window system is
	     ;; 'running' then the value of this is nil.
             :frame-name "ILISP Arglist Output"
             :modeline nil
             :set-modeline-p nil
             :mode 'ilisp-output-mode
             :window-min-height 2	; The minimum height of the
					; typeout window
             :window-max-height 25	; The maximum height of the
					; typeout window
             :frame-min-height 5	; Rows
             :frame-min-width 70	; Columns
             ))
      (defvar ilisp-arglist-output-mode nil
        "If T, then we are in the ilisp-arglist-output minor mode.")
      
      (make-variable-buffer-local 'ilisp-arglist-output-mode)
      
      (or (assq 'ilisp-arglist-output-mode minor-mode-alist)
          (setq minor-mode-alist
                (cons '(ilisp-arglist-output-mode
			ilisp-arglist-output-mode-line)
		       minor-mode-alist))))
  ;; Otherwise use default
  (setq ilisp-arglist-output ilisp-output))


;;; ilisp-*command-to-ilisp-output-sink-table* --
;;; Actually implemented as an a-list.

(defvar ilisp-*command-to-ilisp-output-sink-table* ()
  "An association table between 'commands and 'output sinks.
It is used to determine where the output of a 'command' should go.")

;;; Output sink history.
(defvar ilisp-*output-sink-history* nil
  "List of output sinks (i.e. buffers) that may currently be in use,
most recent first [internal state variable].  This grows when
ilisp-output-buffer pushes a new sink onto it, and the topmost sink is
used by 'ilisp-scroll-output' and 'ilisp-bury-output' (which pops it).
Use the 'ilisp-last-active-output-sink' function to return the most
recent sink that is still active, where 'active' means 'currently
displayed on the screen'.")

(defun ilisp-last-active-output-sink ()
  "Return the topmost active output since in ilisp-*output-sink-history*,
after popping any inactive ones."
  (let ((result (car ilisp-*output-sink-history*)))
    (while (and result
		(let ((buffer (ilisp-output-sink-buffer result)))
		  (or (null buffer)
		      (null (get-buffer-window buffer t)))))
      ;; not active; pop it, and try the next.
      (setq ilisp-*output-sink-history* (cdr ilisp-*output-sink-history*))
      (setq result (car ilisp-*output-sink-history*)))
    result))

;;; Accessor functions for
;;; 'ilisp-*command-to-ilisp-output-sink-table*'.

(defun* ilisp-get-sink-for-command (command &optional (default ilisp-output))
  (let ((result (assoc* command ilisp-*command-to-ilisp-output-sink-table*
		       :test #'eq)))
    (if result
	(rest result)
      default)))


(defun* ilisp-set-sink-for-command (command output-sink)
  (setf ilisp-*command-to-ilisp-output-sink-table*
	(acons command output-sink 
	       ilisp-*command-to-ilisp-output-sink-table*)))


(ilisp-set-sink-for-command 'arglist-lisp
			    ilisp-arglist-output)

(ilisp-set-sink-for-command 'ilisp-arglist-message-lisp-space
			    ilisp-arglist-output)


;;; Output buffer functions.

(defun ilisp-output-buffer (ilisp-output-sink &optional create-p)
  "Displays the sink's buffer.
Sets the corresponding modeline if the 'set-modeline-p' slot is T for
sink."
  (let ((buffer
	 (if create-p
	     (get-buffer-create (ilisp-output-sink-buffer ilisp-output-sink))
	   (get-buffer (ilisp-output-sink-buffer ilisp-output-sink))))
	(modeline (ilisp-output-sink-modeline ilisp-output-sink))
	(set-modeline-p (ilisp-output-sink-set-modeline-p ilisp-output-sink))
	)
    ;; save ilisp-output-sink for scrolling and burying.  first, clean up old
    ;; output sinks by calling ilisp-last-active-output-sink for side effect.
    ;; then, move this sink to the top of the stack.
    (ilisp-last-active-output-sink)
    (or (eq ilisp-output-sink (car ilisp-*output-sink-history*))
	(setq ilisp-*output-sink-history*
	      (cons ilisp-output-sink
		    (delete ilisp-output-sink ilisp-*output-sink-history*))))
    (unless (and (boundp modeline) (symbol-value modeline))
      (when set-modeline-p
	(setf (symbol-value modeline)
	      (list (format " %s bury, %s scroll" 
			    (ilisp-where-is 'ilisp-bury-output)
			    (ilisp-where-is 'ilisp-scroll-output))))))
    buffer))
  
(defun ilisp-output-window (ilisp-output-sink)
  "Gets the Output-Window for sink's buffer."
  (let ((buffer (get-buffer (ilisp-output-sink-buffer ilisp-output-sink))))
    (when buffer
      (get-buffer-window buffer t))))


;;; Popper replacement

;;; ilisp-bury-output --
;;;
;;; 19991220 Marco Antoniotti
;;; Changed the function to take care of the output frame.

(defun ilisp-bury-output-internal (ilisp-output-sink)
  ;; given an active output sink, make it go away.
  (let* ((buffer (ilisp-output-sink-buffer ilisp-output-sink))
	 (window (and buffer (get-buffer-window buffer t)))
	 (frame (ilisp-output-sink-frame ilisp-output-sink)))    
    (with-current-buffer buffer
      (erase-buffer))
    (bury-buffer buffer)
    (if frame
	(unless (eql this-command 'ilisp-arglist-message-lisp-space)
	  (ilisp-delete-message-frame ilisp-output-sink)
          (if (eq ilisp-output-sink (car ilisp-*output-sink-history*))
            (setq ilisp-*output-sink-history*
                    (cdr ilisp-*output-sink-history*))))
	(when window
	  (condition-case error
	      (ilisp-delete-window window)
	    (error t))))))

(defun ilisp-bury-output (&optional bury-all-p)
  "Delete the topmost typeout window, with sink's buffer, if any.
If given a numeric argument, deletes all typeout windows."
  (interactive "P")
  (let ((ilisp-output-sink (ilisp-last-active-output-sink))
	(buried-one-p nil))
    (while (and ilisp-*output-sink-history*
		(or bury-all-p
		    (not buried-one-p)))
      (ilisp-bury-output-internal ilisp-output-sink)
      (setq buried-one-p t)
      (setq ilisp-output-sink (ilisp-last-active-output-sink)))
    (if (not buried-one-p)
	(message "No more output to bury."))))

(defun ilisp-delete-window (window)
  "Delete a window with minimal redisplay."
  (let ((height (window-height window))
	(lower-window (ilisp-find-lower-window window)))
    (delete-window window)
    (when (and lower-window
	       (not (eq lower-window window)))
      (let ((old-window (selected-window)))
	(save-excursion
	  (select-window lower-window)
	  (set-buffer (window-buffer))
	  (goto-char (window-start))
	  (vertical-motion (- height))
	  (set-window-start lower-window (point)))
	(select-window old-window)))))

(defun ilisp-scroll-output (&optional lines)
  "Scroll the typeout-window, if any."
  (interactive "P")
  (let* ((ilisp-output-sink (or (ilisp-last-active-output-sink)
				(error "No output to scroll.")))
	 (buffer (ilisp-output-buffer ilisp-output-sink))
	 (window (and buffer (get-buffer-window buffer t)))
	 (old-window (selected-window)))
    (unwind-protect
	 (progn
	   (select-window window)
	   (set-buffer buffer)	;; [maybe redundant?]
	   ;; 19990806 Martin Atzmueller
	   ;; (scroll-up lines)
	   (let ((scroll-in-place nil))
	     (scroll-up lines)))
      (select-window old-window))))

(defun ilisp-grow-output (&optional n)
  "Grow the typeout window by ARG (default 1) lines."
  (interactive "p")
  (let* ((buffer (ilisp-output-buffer ilisp-output))
         (window (and buffer (get-buffer-window buffer t)))
	 (old-window (selected-window)))
    (when window
      (unwind-protect
	  (progn
	    (select-window window)
	    (enlarge-window n))
	(when (ilisp-window-live-p old-window)
	  (select-window old-window))))))


(defun ilisp-trim-blank-lines ()
  ;; Delete leading blank lines
  (goto-char (point-min))
  (when (looking-at "\n+") (replace-match ""))
  ;; Delete trailing blank lines
  (goto-char (point-max))
  (skip-chars-backward "\n")
  (when (< (point) (point-max))
    (delete-region (1+ (point)) (point-max))))

(defun ilisp-write-string-to-buffer (ilisp-output-sink string)
  (let ((buffer (ilisp-output-buffer ilisp-output-sink t)))
    (save-excursion
      (set-buffer buffer)
      (let ((buffer-read-only nil))
      ;; Maybe an option to keep the old output?
        (erase-buffer))
      ;; New: select mode for the output buffer.
      (unless (eq major-mode
		  (ilisp-output-sink-major-mode-def ilisp-output-sink))
	(funcall (ilisp-output-sink-major-mode-def ilisp-output-sink)))
      (setf (symbol-value (ilisp-output-sink-mode ilisp-output-sink)) t)
      (let ((buffer-read-only nil))
      (princ string buffer)
      (ilisp-trim-blank-lines)
        (goto-char (point-min))))))


(defun ilisp-desired-height (ilisp-output-sink windowp)
  (let ((height
	 (cond ((not windowp)
		(ilisp-needed-buffer-height
		 (ilisp-output-sink-buffer ilisp-output-sink)))
	       (windowp
		(ilisp-needed-window-height
                 (get-buffer-window
		  (ilisp-output-sink-buffer ilisp-output-sink) t))))))
    (max window-min-height
	 (min (ilisp-output-sink-window-max-height ilisp-output-sink)
	      (max (ilisp-output-sink-window-min-height ilisp-output-sink)
		   height)))))


;; A first guess at the height needed to display this buffer.
(defun ilisp-needed-buffer-height (buffer)
  (save-excursion
    (set-buffer buffer)
    (1+ (count-lines (point-min) (point-max)))))


;; The height this window must be to display its entire buffer.
(defun ilisp-needed-window-height (window)
  (save-window-excursion
    (select-window window)
    (save-excursion
      (set-buffer (window-buffer))
      ;; 19990806 Marti Atzmueller
      ;; Changed 2 to 3 just below.
      (+ 3 (save-excursion 
	     (goto-char (point-min))
	     ;; Any upper bound on the height of an emacs window will
	     ;; do here.  How about 1000.
	     (vertical-motion 1000))))))


(defun ilisp-shrink-wrap-window (window ilisp-output-sink)
  (let ((previously-selected-window (selected-window))
	(buffer (window-buffer window)))
    
    (select-window window)
    (let* ((current-height (window-height window))
	   (desired-height (ilisp-desired-height ilisp-output-sink t))
	   (delta (- desired-height current-height)))
      (enlarge-window delta)
      (set-buffer buffer)
      (goto-char (point-min))

      ;; Now repair damage to the window below us, if it still exists.
      (let ((lower-window (ilisp-find-lower-window window)))
	(when lower-window
	  (select-window lower-window)
	  (let ((old-point (point)))
	    (goto-char (window-start))
	    (vertical-motion delta)
	    (set-window-start lower-window (point))
	    (goto-char old-point)
	    (when (not (pos-visible-in-window-p old-point))
	      (recenter 0)))))
      ;; If there was no lower window, then we ought to preserve
      ;; the start of the window above us, if any.

      (when (ilisp-window-live-p previously-selected-window)
	(select-window previously-selected-window)))))


;;; ilisp-shrink-wrap-window-and-frame --
;;; I need this one to change the also the frame size.

(defun ilisp-shrink-wrap-window-and-frame (window ilisp-output-sink)
  (let ((previously-selected-window (selected-window))
	(buffer (window-buffer window))
	(frame (window-frame window)))
    (select-window window)
    (let* ((current-height (window-height window))
	   (desired-height (ilisp-desired-height ilisp-output-sink t))
	   (delta (- desired-height current-height))
	   (frame-desired-height
	    (max (ilisp-output-sink-frame-min-height ilisp-output-sink)
		 desired-height)))
      (set-buffer buffer)
      (goto-char (point-min))

      ;; Now repair damage to the window below us, if it still exists.
      ;;
      ;; 19991220 Marco Antoniotti
      ;; This is probably useless, since the '*ilisp-message-frame*'
      ;; only has a single window.
      (let ((lower-window (ilisp-find-lower-window window)))
	(when lower-window
	  (select-window lower-window)
	  (let ((old-point (point)))
	    (goto-char (window-start))
	    (vertical-motion delta)
	    (set-window-start lower-window (point))
	    (goto-char old-point)
	    (unless (pos-visible-in-window-p old-point)
	      (recenter 0)))))

      ;; If there was no lower window, then we ought to preserve
      ;; the start of the window above us, if any.

      (when (ilisp-window-live-p previously-selected-window)
	(select-window previously-selected-window))

      ;; Finally shrink the frame.
      (set-frame-size frame
                      (ilisp-output-sink-frame-min-width ilisp-output-sink)
		      frame-desired-height))))


(defun ilisp-window-live-p (window)
  (window-live-p window))

;;; This old implementation ignores windows in other frames, 
;;; which makes a lot of trouble if the ILISP buffer is shown in 
;;; a single dedicated window in a frame.

;;(defun ilisp-window-live-p (window)
;;  (let* ((initial-window (selected-window))
;;       (win initial-window)
;;       (found nil))
;;    (while win
;;      (cond ((eq window win)
;;           (setq found t
;;                 win nil))
;;          (t
;;           (setq win (next-window win 'no))
;;           (if (eq win initial-window)
;;               (setq win nil)))))
;;    found))


;; XEmacs change -- window-edges is gone in 19.12+ so use
;; next-vertical-window instead.

(defun ilisp-find-lower-window (window)
  "Find the window directly below us, if any.
This is probably the window from which enlarge-window would steal lines."
  (if (or (not (string-match "XEmacs" emacs-version))
	  (and (= emacs-major-version 19)
	       (< emacs-minor-version 12)))
      (let* ((bottom (nth 3 (window-edges window)))
	     (window* nil)
	     (win window))
	(while (not (eq (setq win (next-window win 'no))
			window))
	  (if (and (= (nth 1 (window-edges win))
		      bottom)
		   (null window*))
	      (setq window* win)))
	window*)
    (next-vertical-window window)))


;;; ilisp-find-top-left-most-window --
;;;
;;; Notes:
;;; 19980101
;;; XEmacs change -- There is now a primitive to do this.
;;;
;;; 19991219 Marco Antoniotti
;;; It would seem that also Emacs 20.xx has a built in function for
;;; doing this (either frame-first-window or frame-top-window at least
;;; as of 20.4).  However, I leave it as it is just for safety and
;;; history.  The only changes I make are to make it a DEFUN* with an
;;; optional parameter and to change the way the local variable
;;; 'window*' is bound.

(defun* ilisp-find-top-left-most-window (&optional (frame (selected-frame)))
  "Return the leftmost topmost window on the current screen."
  (if (or (not (string-match "XEmacs" emacs-version))
	  (and (= emacs-major-version 19)
	       (< emacs-minor-version 12)))
	  
      (frame-first-window frame)
      (frame-highest-window frame 0)))


; (defun* ilisp-find-top-left-most-window (&optional (frame (selected-frame)))
;   "Return the leftmost topmost window on the current screen."
;   (if (or (not (string-match "XEmacs" emacs-version))
; 	  (and (= emacs-major-version 19)
; 	       (< emacs-minor-version 12)))
	  
;       (let* ((window* (frame-selected-window frame))
; 	     ;; (window* (selected-window))
; 	     (edges* (window-edges window*))
; 	     (win nil)
; 	     (edges nil)
; 	     (start-window window*))
; 	(message ">>> window* %s %s %s." window* start-window frame)
; 	(while (not (eq (setq win (next-window win 'no))
; 			start-window))
; 	  (message ">>>>>> win %s." win)
; 	  (setq edges (window-edges win))
; 	  (if (or (< (car (cdr edges)) (car (cdr edges*))) ; top
; 		  (and (= (car (cdr edges)) (car (cdr edges*)))
; 		       (< (car edges) (car edges*)))) ; left
; 	      (setq window* win
; 		    edges* edges)))
; 	(message ">>> about to return window*.")
; 	window*)
;       (frame-highest-window frame 0)))


;; This causes the typeout window to be created by splitting or using the
;; top-left-most window on the current screen.  That is different behavior
;; from the popper, which always split the current window.
(defun ilisp-window-to-use-for-typeout ()
  (let ((window (ilisp-find-top-left-most-window)))
    (while (window-dedicated-p window)
      (setq window (next-window window nil 'visible)))
    window))


(defun ilisp-display-buffer-in-typeout-window (ilisp-output-sink)
  "Display buffer in a window at the top of the screen."
  (let* ((buffer (ilisp-output-sink-buffer ilisp-output-sink))
         (window (get-buffer-window buffer t)))

    ;; If buffer already has a window, keep it.
    (if (null window)
	;; Otherwise, find a window to split.
	(let* ((top-window (ilisp-window-to-use-for-typeout))
	       (new-window nil)
	       (previously-selected-window (selected-window))
	       (desired-height (ilisp-desired-height ilisp-output-sink nil)))

	  ;; The new window is always the lower one.
	  (select-window top-window)

	  ;; Always minimize redisplay (except in emacs 18).
	  (let ((split-window-keep-point nil))
	    ;; If the top window is not big enough to split, commandeer it
	    ;; entirely.
	    (if (> desired-height (- (window-height) window-min-height))
		(setq new-window top-window)
	      (setq new-window (split-window-vertically desired-height))))

	  (set-window-buffer top-window buffer)
	  ;; The height is already correct, unless there was line wrapping.
	  ;; Account for that here.
	  (ilisp-shrink-wrap-window top-window ilisp-output-sink)

	  ;; Restore selected window.
	  (if (eq previously-selected-window top-window)
	      (select-window new-window)
	      (select-window previously-selected-window)))

      ;; Simply shrink-wrap an existing window.
      (ilisp-shrink-wrap-window window ilisp-output-sink))))


;;; ilisp-get-message-frame --
;;;
;;; 19991219 Marco Antoniotti
;;; Utility function.  If we get the error it is because the function
;;; has been called in an improper context.
;;; This should not really happen, since this function is called only
;;; within 'ilisp-display-buffer-in-typeout-frame', which is called
;;; only when a window system is running.

(defun ilisp-get-message-frame (ilisp-output-sink)
  (let* ((frame (ilisp-output-sink-frame ilisp-output-sink))
         (f (or (and frame (frame-live-p frame) frame)
                (setf (ilisp-output-sink-frame ilisp-output-sink)
                      (ilisp-make-output-frame
		       (ilisp-output-sink-frame-name ilisp-output-sink))))))
    (if f
	f
      (error "ILISP: cannot build the ILISP output frame."))))

(defun ilisp-delete-message-frame (ilisp-output-sink)
  (let ((frame (ilisp-output-sink-frame ilisp-output-sink)))
    (when frame
      (when (frame-live-p frame)
        (delete-frame frame))
      (setf (ilisp-output-sink-frame ilisp-output-sink) nil))))

(defun ilisp-display-buffer-in-typeout-area (ilisp-output-sink)
  (let ((buffer (ilisp-output-sink-buffer ilisp-output-sink)))
    (cond ((and window-system ilisp-*use-frame-for-output*)
           (message "See ILISP Message Frame.")
           (ilisp-display-buffer-in-typeout-frame ilisp-output-sink))
          (t
           (message "See above.")
           (ilisp-display-buffer-in-typeout-window ilisp-output-sink)))))


(defun ilisp-display-buffer-in-typeout-frame (ilisp-output-sink)
  "Display buffer in a special ILISP frame."
  (let* ((output-frame (ilisp-get-message-frame ilisp-output-sink))
         (buffer (ilisp-output-sink-buffer ilisp-output-sink))
         (buffer-window (get-buffer-window buffer))
         (previous-output-window (selected-window)))
    (if (null buffer-window)
	;; No window is associated to the buffer.
	(unwind-protect
	    (let* ((output-frame-window
		    (ilisp-find-top-left-most-window output-frame))
		   (desired-height
		    (ilisp-desired-height ilisp-output-sink nil)))
	      (select-window output-frame-window)
	      (set-window-buffer output-frame-window buffer)
	      (ilisp-shrink-wrap-window-and-frame output-frame-window
                                                  ilisp-output-sink)
	      (unless (frame-visible-p output-frame)
		(make-frame-visible output-frame))
              (raise-frame output-frame))
	  (progn
	    (select-window previous-output-window)
	    (select-frame (window-frame (selected-window)))))
      ;; else
      (progn
	(ilisp-shrink-wrap-window-and-frame buffer-window ilisp-output-sink)
	;; Let's try to display the buffer window in the output frame.
	(unless (and (eq (window-frame buffer-window)
			 output-frame)
		     (not (frame-visible-p output-frame)))
	  (make-frame-visible output-frame))
        (raise-frame output-frame)))))



;;; lisp-display-output - general output function

(defun lisp-display-output (output)
  "Displays OUTPUT in the appropriate place.
This calls the function given by the value of ILISP-DISPLAY-OUTPUT-FUNCTION in
order to do the real work."
  (when output
    ;; Bugcheck
    (unless (stringp output)
      (error "ILISP: not a string in lisp-display-output"))
    
    (when (ilisp-value 'comint-errorp t)
      (setq output (funcall (ilisp-value 'ilisp-error-filter) output)))
    (let ((ilisp-output-sink
	   (ilisp-get-sink-for-command this-command ilisp-output)))
      (funcall ilisp-display-output-function output ilisp-output-sink))))


;;; Various functions to which to bind ilisp-display-output-function.

;;; ilisp-display-output-default --
;;; This function does what ilisp used to do, except that we use the
;;; new "popper".
;;;
;;; Notes:
;;; 2000-01-22 Martin Atzmueller: force prompt in inferior-lisp-buffer
;;; after an error.

;;; 19990806 Martin Atzmueller
;;; Added check for COMINT-ERRORP.

(defun ilisp-force-output-after-error (ilisp-output-sink)
  "Force the ilisp buffer to display the prompt."
  "Display output in the ilisp buffer"
  (let ((buffer (current-buffer))
	(window (selected-window)))
    ;; we want _exactly_ one prompt
    ;; this means this function has only to be performed once.
    ;; so check for ilisp-last-message!
    (if ilisp-last-message
        (unwind-protect
	    (progn
	      (lisp-pop-to-buffer (ilisp-buffer) ilisp-output-sink)
	      (if (not (eq (current-buffer) buffer))
		  (setq ilisp-last-buffer buffer))
	      (comint-insert 
	       (concat 
		(if ilisp-last-message
		    (concat ";;; " ilisp-last-message "\n"))
		"\n"
		ilisp-last-prompt))
	      (setq ilisp-last-message nil))
          (if (window-point window)
              (progn (select-window window)
                     (set-buffer buffer)))))))


(defun ilisp-display-output-default (output ilisp-output-sink)
  "Displays 'output' depending on the value of 'lisp-no-popper'.
Dispatch on the value of 'lisp-no-popper':
 'lisp-no-popper' = nil:  displays 'output' in a typeout window.
 'lisp-no-popper' = t:    displays 'output' in the ilisp buffer
 otherwise:               displays one-line 'output' in the echo area,
                          multiline output in the ilisp buffer."
  (cond ((null lisp-no-popper)
	 (ilisp-display-output-in-typeout-window output ilisp-output-sink))

	((eq lisp-no-popper t)
	 (ilisp-display-output-in-lisp-listener output ilisp-output-sink))

	(t
	 (ilisp-display-output-adaptively output ilisp-output-sink)))
  
  (when (or (ilisp-value 'comint-errorp t)
	    (string-match (ilisp-value 'ilisp-error-regexp t) output))

    ;; display error-msg too, if not already in lisp-listener
    (unless (eq lisp-no-popper t)
      (ilisp-display-output-in-lisp-listener output ilisp-output-sink))
    ;; force output, e.g. for 
    (ilisp-force-output-after-error ilisp-output-sink)))


;; This is the display function I like to use.

;; Another trick which might be useful is to dispatch on the value
;; this-command here, to make output from different ilisp commands
;; go to different places.

(defun ilisp-display-output-adaptively (output ilisp-output-sink)
  "Display one-liners in the echo area, others in the typeout window"
  (cond ((or (string-match "\n" output)
	     (> (length output) (window-width (minibuffer-window))))
	 (ilisp-display-output-in-typeout-window output ilisp-output-sink))
	(t
	 (ilisp-display-output-in-echo-area output ilisp-output-sink))))


(defun ilisp-display-output-in-typeout-window (output ilisp-output-sink)
  "Display output in a shrink-wrapped window at the top of the screen."
  (let ((old-buffer (current-buffer))
	(old-window (selected-window))
	(buffer (ilisp-output-buffer ilisp-output-sink t)))
    (ilisp-write-string-to-buffer ilisp-output-sink output)
    (ilisp-display-buffer-in-typeout-area ilisp-output-sink)
    
    ;; Martin Atzmueller 2000-01-27
    ;; this-command trick:
    ;; if this-command is ilisp-message-lisp-space, switch back!
    (if (and (eql this-command 'ilisp-arglist-message-lisp-space)
             ilisp-*arglist-message-switch-back-p*
             (not (member (buffer-name old-buffer) special-display-buffer-names)))
	(progn
	  (raise-frame (window-frame old-window))
	  (switch-to-buffer old-buffer)))))

(defun ilisp-display-output-in-echo-area (output ilisp-output-sink)
  "Display output as a message in the echo area."
  ;; First clear any existing typeout so as to not confuse the user.
  (if (ilisp-output-buffer ilisp-output-sink)
      (let ((buffer (get-buffer (ilisp-output-buffer ilisp-output-sink))))
	(if (and buffer
		 (not (eq (selected-window)
			  (get-buffer-window buffer t))))
	    (ilisp-bury-output-internal ilisp-output-sink))))
  
  ;; v5.7: Patch suggested by hunter@work.nlm.nih.gov (Larry Hunter)
  ;; If output contains '%', 'message' loses.
  ;; (message (ilisp-quote-%s output))
  ;; An alternative here could be '(princ output)', as suggested by
  ;; Christopher Hoover 
  ;; (princ output)

  ;; v5.7b: Patch suggested by fujieda@jaist.ac.jp (Kazuhiro Fujieda)
  ;; Best one for FSF Emacs 19.2[89].
  (message "%s" output))


;;; ilisp-quote-%s --
;;; Patch suggested by hunter@work.nlm.nih.gov (Larry Hunter)

(defun ilisp-quote-%s (string)
  "Quote all the occurences of ?% in STRING in an ELisp fashion."
  (mapconcat '(lambda (char)
		(if (char-equal char ?%)
		    "%%"
		  (char-to-string char)))
	     string ""))


(defun ilisp-display-output-in-temp-buffer (output)
  (with-output-to-temp-buffer ilisp-output-buffer
    (princ output)))


(defun ilisp-display-output-in-lisp-listener (output ilisp-output-sink)
  "Display output in the ilisp buffer"
  (let ((buffer (current-buffer))
	(window (selected-window)))
    (unwind-protect
	(progn
	  (lisp-pop-to-buffer (ilisp-buffer) ilisp-output-sink)
	  (unless (eq (current-buffer) buffer)
	    (setq ilisp-last-buffer buffer))
	  (comint-insert 
	   (concat 
	    (when ilisp-last-message
              (concat ";;; " ilisp-last-message "\n"))
	    (comint-remove-whitespace output)
	    "\n"
	    ilisp-last-prompt))
	  (setq ilisp-last-message nil))
      (when (window-point window)
	(select-window window)
	(set-buffer buffer)))))


(defun lisp-pop-to-buffer (pbuffer &optional ilisp-output-sink set-input-focus-p)
  "Like pop-to-buffer, but select a screen that buffer was shown in.
ilisp-output-sink is the last ilisp-output-sink visited/active or nil
if this is not relevant."
  (let* ((buffer (or pbuffer
		     (when ilisp-output-sink
		       (ilisp-output-sink-buffer ilisp-output-sink))))
         (window (if ilisp-epoch-running
                     (epoch::get-buffer-window buffer)
                   (get-buffer-window buffer t)))
         (frame  (when window (window-frame window))))
    (cond ((not window)
           (when (and ilisp-output-sink
		      (get-buffer (ilisp-output-sink-buffer ilisp-output-sink)))
	     ;; is this necessary?
             (ilisp-bury-output-internal ilisp-output-sink))
           (pop-to-buffer buffer))
          (set-input-focus-p
           (if (fboundp 'select-frame-set-input-focus)
               (select-frame-set-input-focus frame)
             (raise-frame frame)
             (select-frame frame)
             (focus-frame frame))
           (select-window window))
          (t (when (or (memq (frame-visible-p frame) '(nil icon))
                       (when (fboundp 'frame-iconified-p)
                         (frame-iconified-p frame)))
               (raise-frame frame)
               (raise-frame (selected-frame)))
             (select-frame frame)
             (select-window window)))
    (set-buffer buffer)))


(defun switch-to-lisp (eob-p &optional ilisp-only)
  "If in an ILISP buffer, switch to the last non-ILISP buffer visited.
Otherwise, switch to the current ILISP buffer.  With argument,
positions cursor at end of buffer.  If you don't want to split
windows, set pop-up-windows to NIL."
  (interactive "P")
  (if (and (not ilisp-only) ilisp-last-buffer 
	   (memq major-mode ilisp-modes))
      (lisp-pop-to-buffer ilisp-last-buffer nil t)
    (unless (memq major-mode ilisp-modes)
      (setq ilisp-last-buffer (current-buffer)))
    (lisp-pop-to-buffer (ilisp-buffer) nil t)
    (when eob-p
      (goto-char (point-max)))))

;;; end of file -- ilisp-out.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-pkg.lisp0000600000175000001440000001001210140476615016342 0ustar  mvelausers;;; -*- Mode: Lisp -*-

;;; ilisp-pkg.lisp --
;;; ANSI CL DEFPACKAGE definition for ILISP.
;;;
;;; Common Lisp initializations
;;;
;;; Author: Marco Antoniotti, marcoxa@cs.nyu.edu
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-pkg.lisp,v 1.11 2004/08/11 19:12:46 kevinrosenberg Exp $

;;;----------------------------------------------------------------------------
;;; Definitions

;;; ILISP package --

;;;
;;; GCL 2.2 doesn't have defpackage (yet) so we need to put the export
;;; here. (toy@rtp.ericsson.se)
;;;
;;; Please note that while the comment and the fix posted by Richard
;;; Toy are correct, they are deprecated by at least one of the ILISP
;;; maintainers. :) By removing the 'nil' in the following #+, you
;;; will fix the problem but will not do a good service to the CL
;;; community.  The right thing to do is to install DEFPACKAGE in your
;;; GCL and to write the GCL maintainers and to ask them to
;;; incorporate DEFPACKAGE in their standard builds.
;;; Marco Antoniotti  19960715
;;;
;;; "The use of keyword and uninterned symbol names in the package
;;; definition is a result of internecine wars during the ANSI
;;; definition process. The solution to make CL case insensitive and
;;; have the reader use uppercase appears, with the power of
;;; hindsight, short-sighted. However, the backwardly incompatible
;;; solution provided by Franz Inc seems a sub-optimal fix."
;;; 27 March 2002 Will Deakin

#-(and gcl)
(defpackage :ilisp
  (:use :common-lisp
	#+:CMU :conditions
	;; MOP packages.  This avoids tons of #+ noise in the find-src.lisp
	;; code.
	;; [in allegro, :mop and :clos are the same package, though it isn't
	;; called that in 5.0.1; it has nicknames aclmop (which was dropped in
	;; 6.0) and acl-mop (still in 6.1).  -- rgr, 12-Sep-02.]
	#+allegro :clos
	;; Portable Common Loops (PCL) has a separate :mop package.
	#+pcl :pcl #+pcl :mop
	;; SBCL is PCL-derived, but uses distinct package names (and doesn't
	;; advertices :PCL on *features*).
	#+sbcl :sb-pcl)
  ;; Known cmucl/pcl glitch: the :mop and :pcl packages define different
  ;; versions of these, which are exported from the :lisp package.
  #+(or pcl sbcl)
  (:shadowing-import-from #-sbcl :mop #+sbcl :sb-pcl
			  :class-name :built-in-class :class-of :find-class
			  :structure-class)
  ;; Now get some non-exported symbols
  #+(or pcl sbcl)
  (:import-from #+sbcl :sb-pcl #-sbcl :pcl
		:arg-info-lambda-list :definition-source
		:definition-source-mixin :generic-function-methods
		;; [this is exported from PCL in CMUCL, but not from SB-PCL.  --
		;; rgr, 20-Sep-02.]
		#+sbcl :standard-accessor-method)
  #+(or pcl sbcl allegro)
  (:import-from #+sbcl :sb-pcl
		#+(and pcl (not sbcl)) :pcl
		#+allegro :excl
		:arg-info :lambda-list :specializers)
  ;; [i forget why i wanted this rather than lisp:standard-class . . .  -- rgr,
  ;; 15-Sep-02.]
  #+(or pcl sbcl)
  (:shadowing-import-from #+sbcl :sb-pcl #-sbcl :pcl
			  :standard-class)

  ;; The following symbols should properly 'shadow' the inherited
  ;; ones.
  (:export #:ilisp-errors
           #:ilisp-save
           #:ilisp-restore
           #:ilisp-symbol-name
           #:ilisp-find-symbol
           #:ilisp-find-package
           #:ilisp-eval
           #:ilisp-compile
           #:ilisp-describe
           #:ilisp-inspect
           #:ilisp-arglist
           #:ilisp-documentation
           #:ilisp-macroexpand
           #:ilisp-macroexpand-1
           #:ilisp-trace
           #:ilisp-untrace
           #:ilisp-compile-file-extension
           #:ilisp-compile-file
           #:ilisp-casify
           #:ilisp-matching-symbols
           #:ilisp-callers
           #:ilisp-source-files
           #:ilisp-print-info-message
           #+:SBCL #:sbcl-trace
           #+:CMU #:cmulisp-trace
           #+(or :SBCL :CMU) #:source-file
	   )
  )
;;; ILISP --

;;; end of file -- ilisp-pkg.lisp --
ilisp-5.12.0+cvs.2004.12.26/ilisp-prc.el0000600000175000001440000001027507706560400016011 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-prc.el --
;;; ILISP process handling.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-prc.el,v 1.4 2003/07/19 01:28:52 rgrjr Exp $


(defun ilisp-process ()
  "Return the current ILISP process."
  (get-buffer-process (ilisp-buffer)))


(defvar ilisp-buffer-function 'ilisp-recent-buffer
  "A function of no arguments which returns the current ilisp buffer")


;;;%Buffer and process selection
(defun ilisp-buffer ()
  "Return the current ILISP buffer.
This is the buffer to whose process requests are sent."
  (if (memq major-mode ilisp-modes)
      (current-buffer)
    (let ((buffer (funcall ilisp-buffer-function)))
      (or buffer
	  (error "You must start an inferior LISP with run-ilisp.")))))


(defun ilisp-recent-buffer ()
  "Return the most-recently selected ilisp buffer." 
  (if ilisp-buffer 
      (or (get-buffer ilisp-buffer)
	  (get-buffer
	   (setq ilisp-buffers
		 (delete* (substring ilisp-buffer
				     1 
				     (1- (length ilisp-buffer)))
			  ilisp-buffers 
			  :test (function (lambda (s1 s2)
					    (string= s1 (car s2)))))
		 ilisp-buffer
		 (format "*%s*" (car (car ilisp-buffers))))))))

;;;
(defun ilisp-default-ilisp-buffer ()
  ;; Helper for select-ilisp, returns the current buffer name iff it's a dialect
  ;; buffer, else the most-recently-created dialect buffer name that is NOT
  ;; current, else the most-recently-created (in which case there should only be
  ;; one).  Returns nil if no legal candidates exist (though it is still
  ;; possible that the named default buffer might not exist).  [Some LRU
  ;; reordering and/or garbage collection of the ilisp-buffers list would be a
  ;; really good idea, though.  -- rgr, 22-Sep-02.]
  (or (let ((name (buffer-name)))
	(and (string-match "^\\*\\(.*\\)\\*$" name)
	     (member* (match-string 1 name) ilisp-buffers
		      :test (function (lambda (x y)
			      (equal x (car y)))))
	     name))
      (let ((tail (or (and ilisp-buffer
			   (member* (substring ilisp-buffer 1 -1) ilisp-buffers
				    :test (function (lambda (x y)
					    (not (equal x (car y)))))))
		      ;; take the most-recently-created member of ilisp-buffers
		      ;; as the default default.
		      ilisp-buffers)))
	(if tail
	    (concat "*" (car (car tail)) "*")))))

(defun select-ilisp (new-ilisp-buffer)
  "Select a new ILISP dialect buffer.
Prompts for the name of an ILISP dialect; the default is the current one
if in a dialect buffer, else the most-recently-created dialect (other
than the current dialect, if there is more than one).

The selected ILISP dialect is where ILISP sends all eval/compile/query
requests, and is kept in the `ilisp-buffer' emacs lisp variable.  Note
that the actual dialect buffer name is stored there, e.g. \"*cmulisp*\",
even though the user interface requests the dialect name, e.g. \"cmulisp\"."
  (interactive
    (let* ((default
	     (or (ilisp-default-ilisp-buffer)
		 (error "No ILISP buffers; do M-x run-lisp to create one.")))
	   (prompt (format "Buffer [%sdefault %s]: "
			   (if ilisp-buffer
			       (format "currently %s, "
				       (substring ilisp-buffer 1 -1))
			       "")
			   (substring default 1 -1)))
	   (new (completing-read prompt ilisp-buffers nil t)))
      (list (if (zerop (length new))
		default
		(format "*%s*" new)))))
  (cond ((not (stringp new-ilisp-buffer))
	  (error "bug: %S is not a string." new-ilisp-buffer))
	((not (get-buffer new-ilisp-buffer))
	  ;; [should eliminate this before the completing-read call.  -- rgr,
	  ;; 22-Sep-02.]
	  (error "Oops; buffer %S no longer exists." new-ilisp-buffer))
	(t
	  ;; flush M-. cache first.  [it might be cleaner to cache based on the
	  ;; dialect as well, but then we'd also have to provide a separate
	  ;; command to flush the cache explicitly.  -- rgr, 18-Jul-03.]
	  (setq lisp-inferior-source-definitions-cache nil)
	  ;; install new selected dialect.
	  (setq ilisp-buffer new-ilisp-buffer)
	  (message "Selecting %s as the current ILISP dialect buffer."
		   (substring new-ilisp-buffer 1 -1)))))

;;; end of file -- ilisp-prc.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-prn.el0000600000175000001440000000524507277332355016036 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-prn.el --
;;; ILISP paren handling.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-prn.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $


;;;%Unbalanced parentheses
(defun lisp-skip (end)
  "Skip past whitespace, comments, backslashed characters and strings.
The operation is done in the current buffer as long as we are before END.
This does move the point."
  (if (< (point) end)
      (let ((comment (and comment-start (string-to-char comment-start)))
	    (done nil)
	    char)
	(while (and (< (point) end)
		    (not done))
	  (skip-chars-forward "\n\t " end)
	  (setq char (char-after (point)))
	  (cond ((eq char ?\")
		 (forward-sexp))
		((eq char comment)
		 (forward-char)
		 (skip-chars-forward "^\n" end))
		((eq char ?\\)
		 (forward-char 2))
		(t (setq done t)))))))

;;;
(defun lisp-count-pairs (begin end left-delimiter right-delimiter)
  "Return the number of top-level pairs of LEFT-DELIMITER and RIGHT-DELIMITER.
Counting is done only between BEGIN and END.  If they don't match, the point
will be placed on the offending entry."
  (let ((old-point (point))
	(sexp 0)
	left)
    (goto-char begin)
    (lisp-skip end)
    (while (< (point) end)
      (let ((char (char-after (point))))
	(cond ((or (eq char left-delimiter)
		   ;; For things other than lists
		   (eq (char-after (1- (point))) ?\n))
	       (setq sexp (1+ sexp))
	       (if (condition-case ()
		       (progn (forward-sexp) nil)
		     (error t))
		   (error "Extra %s" (char-to-string left-delimiter))))
	      ((eq char right-delimiter)
	       (error "Extra %s" (char-to-string right-delimiter)))
	      ((< (point) end) (forward-char))))
      (lisp-skip end))
    (goto-char old-point)
    sexp))

;;;
(defun find-unbalanced-region-lisp (start end)
  "Go to the point where LEFT-DELIMITER and RIGHT-DELIMITER become unbalanced.
Point will be on the offending delimiter within the region."
  (interactive "r")
  (lisp-count-pairs start end
		    (string-to-char left-delimiter)
		    (string-to-char right-delimiter))
  (if (not ilisp-complete) (progn (beep) (message "Delimiters balance"))))

;;;
(defun find-unbalanced-lisp (arg)
  "Go to the point where LEFT-DELIMITER and RIGHT-DELIMITER become unbalanced.
Point will be on the offending delimiter in the buffer.
If called with a prefix, use the current region."
  (interactive "P")
  (if arg
      (call-interactively 'find-unbalanced-region-lisp)
      (find-unbalanced-region-lisp (point-min) (point-max))))

;;; end of file -- ilisp-prn.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-rng.el0000600000175000001440000000267607277332355016032 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-rng.el --
;;; ILISP match ring.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-rng.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $

(defun match-ring (ring regexp start)
  "Return the index in RING of REGEXP starting at START."
  (let ((n 0)
	(len (ring-length ring)))
    (while (and (< n len) 
		(not (string-match regexp (ring-ref ring n))))
      (setq n (1+ n)))
    (if (= n len)
	nil
	n)))

;;;
(defun lisp-match-ring (regexp string &optional no-insert)
  "Match REGEXP in the input-ring of the current buffer and set the
ring variables to look like comint-previous-similar-input if found.
If not found insert STRING, unless NO-INSERT."
  (let ((n (if regexp (match-ring (ilisp-get-input-ring) regexp 0))))
    (if n
	(let ((point (progn (comint-kill-input) (point))))
	  (insert (ring-ref (ilisp-get-input-ring) n))
	  (save-excursion
	    (goto-char (+ point (length string)))
	    (skip-chars-forward "^ \t\n\)")
	    (setq point (point)))
	  (push-mark point)
	  (set-ilisp-input-ring-index n)
	  (setq this-command 'comint-previous-similar-input
		comint-last-similar-string string)
	  t)
	(if (and string (not no-insert))
	    (progn (comint-kill-input) (insert string) t)
	    nil))))

;;; end of file -- ilisp-rng.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-s2c.el0000600000175000001440000000577607277332355015737 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-s2c.el --
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-s2c.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $

;From: Jeffrey Mark Siskind 
;To: ilisp@cons.org
;Subject: ILisp 5.5 and Scheme->C
;Reply-To: Qobi@cs.toronto.edu
;Date: 	Thu, 15 Dec 1994 22:55:05 -0500

;Is anybody using ILisp 5.5 with Scheme->C? I don't know much about the
;internals of ILisp and have created a defdialect by analogy with the other
;defdialect forms.

(defdialect qsci "Qobi Scheme->C" scheme
 (setq comint-fix-error ":X"
       ilisp-reset ":A"
       comint-continue ":C"
       comint-interrupt-regexp ">>Interrupt:"
       ilisp-eval-command
       "(begin (eval (read (open-input-string \"%s\"))) \"%s\" \"%s\")"
       ilisp-package-command "%s"	;needs work
       ilisp-block-command "(begin %s)"
       ilisp-load-command "(loadq \"%s\")"
       ilisp-load-or-send-command "(begin \"%s\" (ld \"%s\"))"
       ild-abort-string ":A"
       ild-continue-string ":C"
       ild-next-string ":N"
       ild-previous-string ":P"
       ild-top-string ":<"
       ild-bottom-string ":>"
       ild-backtrace-string ":B")
 (ilisp-load-init 'qsci "/u/qobi/emacs/qsci"))

(cond ((or (equal (system-name) "qobi.ai")
           (equal (system-name) "dvp.cs")
           (equal (system-name) "qew.cs"))
       (setq qsci-program "/u/qobi/bin/sun4/5.3/qsci"))
      (t (setq qsci-program "/u/qobi/bin/sun4/4.1.2/qsci")))

;The strange thing is that sometimes it works and sometimes it doesn't. And I
;am having difficulty figuring out what I am doing wrong. I should mention that
;I am using a customized version of Scheme->C (qsci) that has my own debugger
;instead of the default one. My debugger provides Lucid-like commands for
;moving up and down the stack, displaying backtraces and locals, aborting,
;continuing, etc. I will give any interested party a copy of my enhancements to
;Scheme->C. I also use the debugger with ILD, my extension to ILisp 5.5 that
;provides a uniform set of single keystroke commands for accessing the
;different CommonLisp/Scheme debuggers. That explains the ild-* bindings above.

;Here are my questions: What are the appropriate values for comint-fix-error,
;ilisp-reset, comint-continue, comint-interrupt-regexp, ilisp-eval-command,
;ilsip-package-command, ilisp-block-command, ilisp-load-command,
;and ilisp-load-or-send-command. What exactly should these control strings do?
;What % arguments do they take. The minimum functionality I would like to have
;is the ILisp commands c-z l and c-z e. Later on I would like to add c-z a,
;m-TAB, and m-. but I realize that I'll need to add hooks in Scheme->C for
;these. I would ideally like to modify c-z D and c-z A to look things
;up in R4RS.

;    Jeff (home page http://www.cdf.toronto.edu/DCS/Personal/Siskind.html)

;;; end of file -- ilisp-scc.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-sbcl.el0000600000175000001440000001613007737633506016160 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-sbcl.el --
;;; ILISP Steel Bank Common Lisp dialect definition
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-sbcl.el,v 1.20 2003/10/04 21:10:30 kevinrosenberg Exp $

;;;%%%Steel Bank Common Lisp
    
(defvar ilisp-sbcl-init-file
  ;; Note: The init file source extension (".lisp") needs to be
  ;; present in the filename, otherwise ILISP-LOAD-OR-SEND gets
  ;; confused trying to add compiled-file extensions (e.g. ".x86f"),
  ;; because it's hard-wired to look for a period (".") in order to
  ;; decide where to append the compiled-file extension.
  "sbcl")

;;; dummy sbcl-check-prompt
;; the real function-definition is set later.
(defun sbcl-check-prompt (old new)
  nil)

;;; sbcl-check-prompt function for SBCL-0.6.x or earlier.

(defun sbcl-check-prompt-sbcl<07 (old new)
  "Compare the break level printed at the beginning of the prompt."
  (let* ((was-in-break (and old (string-match "]+" old)))
         (old-level (if was-in-break
                      (- (match-end 0) (match-beginning 0))
                      0))
         (is-in-break (string-match "]+" new))
         (new-level (if is-in-break
                      (- (match-end 0) (match-beginning 0))
                      0)))
    (<= new-level old-level)))

;;; sbcl-check-prompt function for SBCL-0.7.x or later (probably).
;;;
;;; WHN not only threatened to change the format of the break prompt,
;;; but now he has done it, in sbcl 0.7, as it seems.
;;; So, we should finally take care of that.

(defun match-and-extract (prompt)
  (let ((level-1-regexp "]")
        (level-2-n-regexp "\\(\\[[0-9]+\\]\\)"))
    (let* ((level-2-p
             (string-match level-2-n-regexp prompt))
           (level-1-p
             (unless level-2-p
               (string-match level-1-regexp
                             prompt)))
           (no-level (unless (or level-1-p level-2-p) 0)))
      (cond (level-1-p 1)
            (level-2-p
              ;; level 2 or greater,
              ;; e.g. x[y] prompt
              (string-to-int
               (subseq prompt (1+ (match-beginning 0)) 
                       (1- (match-end 0)))))
            (t
              no-level)))))
    
(defun sbcl-check-prompt-sbcl>=07 (old new)
  "Compare the break level printed at the beginning of the prompt."
  ;; SBCL has the new break prompt sequence such as
  ;; 0] -> 0[2].
  (let* ((old-level (if old
                      (match-and-extract old)
                      0))
         (new-level (if new
                      (match-and-extract new)
                      0)))
    (<= new-level old-level)))

;;; SBCL Versioning stuff - e.g. distinguishing between some versions ...

(defvar ilisp-*sbcl<07-version* nil)
;; Distinguish SBCL-0.6.x (or earlier) vs. SBCL-0.7.x (and probably later).

(defvar ilisp-*determine-version-lisp-string* 
  "(find-package :sb-eval)") ; in SBCL-0.7.x an Interpreter didn't exist in the
                             ; SB-EVAL package any more.

(defun set-determined-sbcl-version ()
  ;; do we have a SBCL-version less than 0.7.x?
  (let ((result (car (comint-send
                      (ilisp-process) ilisp-*determine-version-lisp-string*
                      t t 'init-sbcl-version nil nil))))
    (setq ilisp-*sbcl<07-version* (not (string-match "[\n]*NIL[\n]*" result)))))

(defun sbcl-ilisp-customize ()
  (fset 'sbcl-check-prompt
        (if ilisp-*sbcl<07-version*
          (function sbcl-check-prompt-sbcl<07)
          (function sbcl-check-prompt-sbcl>=07)))
  
  (set-ilisp-value 'comint-prompt-regexp
		   (if ilisp-*sbcl<07-version*
		       ;; old comint-prompt-regexp (sbcl-0.6 or earlier).
		       "^\\([0-9]+\\]+\\|\\*\\) "
                     ;; new comint-prompt-regexp for sbcl-0.7 (and maybe later).
                     ;; "^\\(\\) "
		     ;; Patch by kpc 94/8/30: allow prompts that look like this:
		     ;; USER(23): USER(23):
		     "^\\([0-9]+\\]+\\|[0-9]+\\[[0-9]+\\]\\|\\* \\|\\(\\[[0-9]+i?c?\\] \\|\\[step\\] \\)?\\(\\|[-A-Za-z0-9]+([0-9]+):\\) \\)+")))

(defun sbcl-version-hook-fun ()
  (when (equal (process-name (ilisp-process)) "sbcl")
    ;; sets ILISP-*SBCL<07-VERSION* & ILISP-*HAVE-ACLREPL*
    (set-determined-sbcl-version)
    (sbcl-ilisp-customize)))

;;;
(defdialect sbcl "Steel Bank Common LISP"
  common-lisp
  (ilisp-load-init 'sbcl ilisp-sbcl-init-file)
  (ilisp-load-init 'new-edit-definitions "find-src")

  ;; set the right check-prompt function, according to the right SBCL version:
  ;; we have to do this after the Lisp has been started, because we have to
  ;; ask the lisp-process for some info ...
  ;; ... refactored into its own function.
  ;; comint-prompt-regexp is now set here, too, in the ILISP-INIT-HOOK-LOCAL,
  ;; e.g. in VERSION-CUSTOMIZE-SBCL.
  (add-hook
   'ilisp-init-hook-local
   'sbcl-version-hook-fun
   nil)
                        
  (setq	comint-prompt-regexp "^\\([0-9]+\\]+\\|\\* \\|[-A-Za-z0-9]+([0-9]+):\\)" 
        ;; we have to set comint-prompt-regexp to something sensible here, before
        ;; we can set it finally to its right value in our ILISP-INIT-HOOK-LOCAL
        ;; hook (above).
        ilisp-trace-command "(ilisp:sbcl-trace \"%s\" \"%s\" \"%s\")"
	comint-prompt-status 
	(function (lambda (old line)
		    (comint-prompt-status old line 'sbcl-check-prompt)))

	ilisp-error-regexp "\\(ILISP:[^\"]*\\)\\|\\(error [^\n]*\n\n\\)\\|\\(debugger invoked on [^:]*:\\)"
	;; The above regexp has been suggested by
	;; hunter@work.nlm.nih.gov (Larry Hunter), for CMUCL.  It's
	;; probably wrong for SBCL, but I'd have to know what it was
	;; for before commenting.
        
	ilisp-arglist-command "(ilisp:ilisp-arglist \"%s\" \"%s\")"
	ilisp-find-source-command "(ilisp:source-file \"%s\" \"%s\" \"%s\")"

        comint-fix-error ":restart abort"
	comint-continue ":go"
	ilisp-reset ":restart toplevel"
	comint-interrupt-regexp "interrupted at"

        ;; Hardcoded binary extensions are undesirable.
        ;; Since ilisp-cl.el takes care of ilisp-binary-command and
        ;; ilisp-init-binary-command we don't need to take care of that here.
        ;; Even it is was hardcoded, problems would arise, because SBCL-0.7.x
        ;; uses ".fasl" as an extension, whereas SBCL-0.6.x uses specific
        ;; extensions (like ".x86f").
        ;; So go for the general mechanism.
        ;; instead of the following:
	;; ilisp-init-binary-command "\"x86f\""
	;; ilisp-binary-command "\"x86f\""
	)

  ;; ILD Support, largely untested

  (setq ild-abort-string ":abort"
	ild-continue-string ":go"
	ild-next-string ":down"
	ild-next-string-arg nil		;needs work
	ild-previous-string ":up"
	ild-previous-string-arg nil	;needs work
	ild-top-string ":bottom"
	ild-bottom-string ":top"
	ild-backtrace-string ":backtrace"
	ild-locals-string ":l"
	ild-local-string-arg "(sb-debug:arg %s)"
	ild-return-string ":return %s"
	ild-retry-string nil		; needs work
	ild-trap-on-exit-string nil	; needs work
	)
  )

(unless sbcl-program (setq sbcl-program "sbcl --noinform"))

;;; end of file -- ilisp-sbcl.el --




ilisp-5.12.0+cvs.2004.12.26/ilisp-sch.el0000600000175000001440000001726207507057034016010 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-sch.el --
;;; Scheme Dialect definition.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-sch.el,v 1.16 2002/06/28 13:01:16 mkoeppe Exp $

(require 'cl)				; Sorry. I couldn't resist
					; 19990818 Marco Antoniotti

;;; Scheme

(defdialect scheme "Scheme" ilisp
  (setq ilisp-block-command "(begin #f\n%s\n)") ; is #f a good idea or should it be
                                              ; something more distinct such as
                                              ; '--ilisp-empty-block--?
  (setq ilisp-load-command "(load \"%s\")")
  (setq ilisp-locator 'ilisp-locate-scheme-definition)
  (setq ilisp-calls-locator 'ilisp-locate-scheme-calls)
  )

(unless scheme-program
  (setq scheme-program "scheme"))


;;; MzScheme & DrScheme-jr

(defvar ilisp-mzscheme-init-file "mzscheme-ilisp.scm")

(defdialect mzscheme "MzScheme"
  scheme
  (setq ilisp-program "mzscheme")
  (setq ilisp-macroexpand-command "(expand-defmacro %s)"
        ilisp-macroexpand-1-command "(expand-defmacro-once %s)"
        ilisp-eval-command "(eval (read (open-input-string \"%s\")))"
	ilisp-trace-command " (begin (require-library \"trace.ss\") (trace %s))"
	ilisp-untrace-command "(untrace %s) ;%s"
	ilisp-directory-command  "(current-directory)"
	ilisp-set-directory-command "(current-directory \"%s\")"
	
	comint-prompt-regexp "^> "
	ilisp-error-regexp "ILISP:"
	ilisp-load-or-send-command "(begin \"%s\" (load \"%s\"))"
	ilisp-complete-command "(ilisp-matching-symbols \"%s\" \"%s\" '%s '%s '%s)")
  (ilisp-load-init 'mzscheme ilisp-mzscheme-init-file))

(defdialect drscheme-jr "DrScheme-jr"
  mzscheme
  (setq ilisp-program "drscheme-jr -l \"Full Scheme (MzScheme)\""))


;;;Cscheme
;;; This has a problem since interrupts cause things to crash
;(defdialect cscheme "C Scheme"
;  scheme
;  (setq comint-prompt-regexp
;   "^[0-9]+ \\([\\]=]=>\\|Error->\\|Bkpt->\\|Debug->\\|Where->\\) ")
;  (setq ilisp-program "cscheme")
;  (setq ilisp-binary-extension "bin")
;  )


;;; Oaklisp

(defdialect oaklisp "Oaklisp Scheme"
  scheme
  (setq comint-prompt-regexp ">+ ")
  (setq comint-fix-error "(ret 0)")
  (setq ilisp-last-command "*")
  (setq ilisp-describe-command "(describe %s)"))


;;; 19990818 Marco Antoniotti
;;; Many thanks to Christian Lynchbeck for providing so many new
;;; dialects of Scheme.

;;; Additional dialects by  (now )

;;;Scm
;; hacked by 

(defdialect scm "Scm Scheme"
  scheme
  (setq ilisp-program "scm -i")		; assume scm is in path.
  (setq comint-prompt-regexp "^> ")
  ;;inspired by the qsci dialect
  (setq ilisp-eval-command
	"(begin (require 'string-port) ; slib specific
                (car (list (call-with-input-string \"%s\"
                              (lambda (input) (eval (read input))))
                            \"%s\" \"%s\")))"
	ilisp-package-command "%s")
  ;; (setq comint-fix-error "(ret 0)")
  ;; (setq ilisp-last-command "*")
  ;; (setq ilisp-describe-command "(describe %s)")
  )

;;;Chez Scheme
;; hacked by 

(defdialect chez "Chez Scheme"
  scheme
  (setq ilisp-program "scheme")		; assume scheme is in path.
  (setq comint-prompt-regexp "^\\(debug>\\|>+\\) ")
  ;;inspired by the qsci dialect
  (setq ilisp-eval-command
	"(car (list (eval (read (open-input-string \"%s\"))) \"%s\" \"%s\"))"
	ilisp-package-command "%s"
	ilisp-macroexpand-command "(expand '%s);%s"
	ilisp-trace-command "(trace %s);%s"
	ilisp-untrace-command "(untrace %s);%s"
	ilisp-directory-command  "(current-directory);%s"
	ilisp-set-directory-command "(current-directory \"%s\")"
	ilisp-binary-extension "so"
	ilisp-compile-file-command
	"(begin (compile-file \"%s\") (pp \"%s,%s\"))")
  (setq comint-fix-error "(debug)")
  )

;;;STk Scheme
;; hacked by 

(defdialect stk "STk - Scheme Tk"
  scheme
  (setq ilisp-program "stk -interactive") ; assume scheme is in path.
  (setq comint-prompt-regexp "^STk> ")
  ;;inspired by the qsci dialect
  (setq ilisp-eval-command
	"(car (list (eval (read (open-input-string \"%s\"))) \"%s\" \"%s\"))"
	ilisp-package-command ";%s"
	ilisp-macroexpand-command "(macro-expand '%s);%s"
	ilisp-trace-command "(trace-var %s);%s"
	ilisp-untrace-command "(untrace-var %s);%s"
	ilisp-directory-command  "(getcwd);%s"
	ilisp-set-directory-command "(chdir \"%s\")"
	ilisp-describe-command "(describe %s)"
	comint-ptyp t
	comint-always-scroll t
	ilisp-last-command "*"
	)
  )

(defdialect snow "Snow - Scheme Tk without Tk"
  stk
  (setq ilisp-program "snow -interactive") ;assume scheme is in path.
  )

;;; Guile
;;; with hacks from Istvan Marko 
;;; and Matthias Koeppe 
;;;
;;; This has been written for Guile 1.3.4
;;; and updated for Guile 1.4 and 1.4.1

(defvar ilisp-guile-init-file "guile-ilisp.scm")

(defdialect guile "Guile - the GNU extension language"
    scheme
    (setq ilisp-program "guile")
    (setq comint-prompt-regexp "^guile[^>]*> ")
    ;; We send the command in `comint-fix-error' to the process if we
    ;; want to return to the top level. In Guile, we are either in the
    ;; debugger, which `quit' exits from, or we are at the top level,
    ;; where `quit' evaluates to the quit procedure, which is
    ;; harmless.
    (setq comint-fix-error "quit")		
    (setq ilisp-load-or-send-command
          "(begin \"%s\" (load \"%s\"))")
    (ilisp-load-init 'guile ilisp-guile-init-file)
    (setq ilisp-symbol-delimiters "^ \t\n\('\"#\)"
          ilisp-error-regexp "\\(ERROR\\|ABORT\\): "
          ilisp-package-command "(ilisp-get-package '%s)"

          ilisp-hash-form-regexp
          "^[ \t]*(define-module[ \t\n]"

          ilisp-in-package-command "(ilisp-in-package \"%s\")"
          ilisp-in-package-command-string "in-package" ;;; FIXME
          ilisp-defpackage-command-string "define-module"
          ilisp-package-name-command "(module-name (current-module))"
          ilisp-eval-command "(ilisp-eval \"%s\" \"%s\" \"%s\" %d)" 
          ilisp-directory-command "(getcwd)"
          ilisp-set-directory-command "(chdir \"%s\")"
          ilisp-complete-command "(ilisp-matching-symbols \"%s\" \"%s\" '%s '%s '%s)"
          ilisp-documentation-command "(ilisp-help '%s \"%s\")"
          ilisp-print-info-message-command "(ilisp-print-info-message '%s \"%s\")"
          ilisp-arglist-command "(ilisp-arglist '%s \"%s\")"
	  ilisp-describe-command "(ilisp-describe '%s \"%s\")"
	  ilisp-find-source-command "(ilisp-source-file \"%s\" \"%s\")"
          ilisp-macroexpand-command "(ilisp-macroexpand \"%s\" \"%s\")"
          ilisp-macroexpand-1-command "(ilisp-macroexpand-1 \"%s\" \"%s\")"
          ilisp-trace-command "(ilisp-trace '%s \"%s\" 'nil)"
          ilisp-untrace-command "(ilisp-untrace '%s \"%s\")"))

(unless guile-program (setq guile-program "guile"))


;;; Mixins

;;; mixins is a stab at providing a new concept for ILISP. Mixins is a
;;; sort of hook allowing specification of thing which behaves like a
;;; dialect without being tied to any specific such. The SLIB library is
;;; an example of a candidate for a mixin specification.


(defun ilisp-slib-mixin ()
  "Set up ilisp for Slib.
Many ilisp features also supplies package specifications. Rather than ignoring
these alltogether, I will define it to the variable `*ilisp-package*'."
  (interactive)
  (setq
   ;;Can't easily use the non-macro version of tracing.
   ilisp-trace-command
   "(begin (require 'trace) (trace %s) (define *ilisp-package* %s))"

   ilisp-untrace-command
   "(begin (require 'trace) (untrace %s) (define *ilisp-package* %s))"
   ))

;;; end of file -- ilisp-sch.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-scheme-easy-menu.el0000600000175000001440000001577507426255455020416 0ustar  mvelausers;;; ilisp-scheme-easy-menu.el --- (easy)menu's on Emacs for Ilisp

;;; Copyright (C) 1996 Holger Schauer
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-scheme-easy-menu.el,v 1.3 2002/01/31 14:56:45 mna Exp $

;; Author: Holger Schauer 
;; Maintainer: Holger.Schauer@gmd.de
;; Keywords: lisp ilisp extensions menu easymenu
;; Version 0.2
;; Status: Should work with any Emacs and easymenu.el (as by Per Abrahamsen)
;; Created: 1996-10-08
;; Last modified: 1996-10-15 (that's 15th October 1996, folks)

;; Where to get it: http://www.uni-koblenz.de/~schauer/uniemacs.html

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, you can either send email to this
;; program's maintainer or write to: The Free Software Foundation,
;; Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.

;;; Commentary:

;; This file and it's extensions have been named ilisp-xemacs-menu before. 
;; As it is ensured now to work with any Emacs with easymenu the file
;; itself and all relevant names (of commands and variables) are renamed. 

;; Use this file as an extension to Ilisp 5.7/5.8 
;; (seee http://www.cs.cmu.edu/~campbell/ilisp/index.html)
;; Put it in a place where (X)Emacs can find it and augment your
;; .emacs like the following to use it.
;; (load-library "ilisp-easy-menu")
;; This needs to be loaderd prior to Ilisp !
;; This should give you the menu in any source code buffer and any inferior 
;; ilisp buffer. Be careful: the menu is initialized with add-hook
;; on ilisp-mode-hook and lisp-mode-hook, so if you setq these two
;; hooks afterwards you won't get the menu.
;;
;; If you want to use it with Emacs (not XEmacs) you will want to get rid
;; of the old menu. You can do so by applying the following patches (to
;; Ilisp 5.8 - for 5.7 check for ilisp-update-menu and the loading of the
;; menu, i.e. ilisp-menu and ilisp-mnb)
;; For ilisp.el:
;; 185c185,187
;< (if (not (member +ilisp-emacs-version-id+ '(xemacs lucid-19 lucid-19-new)))
;---
;> (if (and
;>      (not (member +ilisp-emacs-version-id+ '(xemacs lucid-19 lucid-19-new)))
;>      (not (featurep 'ilisp-easy-menu)))
;; For ilisp-utl.el:
;127c127,129
;<   (if (not (member +ilisp-emacs-version-id+ '(xemacs lucid-19 lucid-19-new)))
;---
;>   (if (and (not 
;> 	    (member +ilisp-emacs-version-id+ '(xemacs lucid-19 lucid-19-new)))
;> 	   (not (featurep 'ilisp-easy-menu)))

(require 'easymenu)

(defconst ilisp-scheme-easy-menu
  '("Ilisp"
    [ "Load File" load-file-lisp t ]
    [ "Run Ilisp" run-ilisp t ]
    "--"
    ("Evaluate"
     [ "Eval region" eval-region-lisp t ]
     [ "Eval defun" eval-defun-lisp t ]
     [ "Eval next sexp" eval-next-sexp-lisp t ]
     ;; [ "Eval last sexp" eval-last-sexp-lisp t ]
     [ "Eval changes" eval-changes-lisp t ]
     )
    ("Evaluate and Go"
     [ "Eval region" eval-region-and-go-lisp t ]
     [ "Eval defun" eval-defun-and-go-lisp t ]
     [ "Eval next sexp" eval-next-sexp-and-go-lisp t ]
     ;; [ "Eval last sexp" eval-last-sexp-and-go-lisp t ]
     )
    ("Compile"
     [ "File" compile-file-lisp t ]
     [ "Defun" compile-defun-lisp t ]
     [ "Defun and go" compile-defun-and-go-lisp t ]
     [ "Region" compile-region-lisp t ]
     [ "Region and go" compile-region-and-go-lisp t ]
     [ "Compile changes" compile-changes-lisp t ]
     )
    "--"
    ("Editing"
     [ "Edit definitions" edit-definitions-lisp t ]
     [ "Edit next def." next-definition-lisp t ]
     [ "Edit callers" edit-callers-lisp t ]
     [ "Edit next caller" next-caller-lisp t ]
     [ "Insert arguments" arglist-lisp t ]
     "--"
     [ "Find unbalanced paren" find-unbalanced-lisp t ]
     [ "Close all parens" close-all-lisp t ]
     [ "Close and send lisp" close-and-send-lisp t ]
     "--"
     [ "Reindent" reindent-lisp t ]
     [ "Indent sexp" indent-sexp-ilisp t ]
     [ "Indent for comment" lisp-indent-for-comment t ]
     [ "Comment region" comment-region-lisp t ]
     "--"
     [ "Search in Files" search-lisp t ] 
     "--"
     [ "Kill sexp" kill-sexp t ] 
     [ "Kill last sexp" backward-kill-sexp t ]
     "--"
     [ "Macroexpand" macroexpand-lisp t ]
     [ "Macroexpand-1" macroexpand-1-lisp t ]
     "--"
     [ "Begin of def" beginning-of-defun-lisp t ]
     [ "End of defun" end-of-defun-lisp t ]
     )
    ("Documentation"
     [ "Documentation" documentation-lisp t ]
     [ "Describe" describe-lisp t ]
     [ "Inspect" inspect-lisp t ]
     "--"
     [ "Clman-apropos" fi:clman-apropos t ];; with which var can I test if
     [ "Hyperspec - apropos" hyperspec-lookup-lisp t ];; fi is really loaded ?
     )
    "--"
    ("Package"
     "--"
     [ "Package" package-lisp t ]
     [ "Set Lisp Package" set-package-lisp t ]
     [ "Set Buffer Package" set-buffer-package-lisp t ]
     )
    "--"
    ("Misc"
     ;; [ "Reset Ilisp" reset-ilisp t ]
     [ "Select Ilisp" select-ilisp t ]
     [ "Switch to lisp" switch-to-lisp t ]
     [ "Abort commands" abort-commands-lisp t ]
     [ "Status of Lisp" status-lisp t ]  
     "--"
     [ "Mark change" mark-change-lisp t ]
     [ "List changes" list-changes-lisp t ]
     [ "Clear changes" clear-changes-lisp t ]
     "--"
     [ "Trace defun" trace-defun-lisp t ]
     )
    "--"
    [ "Reset Ilisp Connection" reset-ilisp t ]
    [ "Repair Ilisp Connection" repair-ilisp t ]
    )
  )

;;; ilisp-update-menu
;;;
;;; 19990818 Marco Antoniotti

(defun ilisp-update-menu (status)
  ;; Backward compatibility with old keymap based menus.
  ;; A no-op for the time being.
  )

(provide 'ilisp-scheme-easy-menu)

;;; Hooks to add the menu.
;;;
;;; Notes:
;;; 19990818 Marco Antoniotti
;;; Since I could have installed a CL menu before a Scheme one, I
;;; could be forced to to remove the previous menu.  Now the code does not do
;;; this, but it should.

(add-hook 'ilisp-mode-hook
	  (lambda () 
	    (when (featurep 'easymenu)       
	      (easy-menu-define menubar-ilisp
				ilisp-mode-map 
				"Ilisp commands"
				ilisp-scheme-easy-menu) 
	      (easy-menu-add ilisp-scheme-easy-menu 'ilisp-mode-map)
	      )))
	 

(add-hook 'scheme-mode-hook
	  (lambda () 
	    (when (featurep 'easymenu)       
	      (easy-menu-define menubar-scheme-ilisp
				scheme-mode-map 
				"Scheme commands"
				ilisp-scheme-easy-menu) 
	      (when (boundp 'scheme-menu)
		(easy-menu-remove scheme-menu))
	      (easy-menu-add ilisp-scheme-easy-menu 'scheme-mode-map)
	      )))

;;; end of file-- ilisp-scheme-easy-menu.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-snd.el0000600000175000001440000005706107657622014016022 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-snd.el --
;;; ILISP send and support.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-snd.el,v 1.20 2003/05/12 02:17:22 rgrjr Exp $


;;;%% Package / Symbol support

;;;---------------------------------------------------------------------------
;;; Package hacks by Martin Atzmueller
;;;
;;; 19990824 Marco Antoniotti

(defun ilisp-add-set-package-hook ()	; Was: add-set-package-hook
  (interactive)
  (add-hook 'lisp-mode-hook
	    '(lambda ()
	       ;; ilisp-buffer must exist and be ready
	       (if (and (boundp 'ilisp-buffer)
			(not (equal ilisp-buffer "*nil*"))
			(not (ilisp-value 'ilisp-initializing t))
			(ilisp-value 'ilisp-status) " :ready")

		   ;; and check the Package when in ILISP
		   (lisp-buffer-package)))))

;;; ilisp-check-package-advanced --
;;; treat DEFPACKAGE before IN-PACKAGE.

(defun ilisp-get-package-advanced (string)
  "Passes a string from ilisp-check-package-advanced to ilisp process
that attempts to determine the package symbol string name."
  (let ((the-package
	 (ilisp-send
	  string "Finding Buffer package with hash-forms" 'pkg nil t)))
    ;; there may have been an error: fix it.
    (if (string-match (ilisp-value 'ilisp-error-regexp t) the-package)
	(progn
	  (comint-send (ilisp-process) (ilisp-value 'comint-fix-error) t t 'fix "Fixing erroneous package-situation in inferior-lisp." t nil)
	  "nil")
      (if the-package
	  the-package
	"nil"))))

(defun ilisp-check-package-advanced (hash-defpackage-forms-list 
				     hash-in-package-forms-list)
  "Advanced check for packages in buffer.
It handles the special case of read-time conditionals - i.e. hash plus
or minus forms - as well as normal IN-PACKAGE or DEFPACKAGE forms."
  (let* ((string
          (apply #'concat (nconc hash-defpackage-forms-list
                                 hash-in-package-forms-list)))
         (string
	  (format (ilisp-value 'ilisp-package-command)
		  (format (ilisp-value 'ilisp-block-command) string)))
         (package (ilisp-get-package-advanced string))
	 (case-fold-search t)
         (npic-regexp (ilisp-value 'ilisp-no-package-in-core-regexp t)))
    (if (and npic-regexp (string-match npic-regexp package))
;; wbd180902 Kludge round modern mode stuff to set default package 
      (progn
	(setq package 
	      (ilisp-get-package-advanced 
	       (format (ilisp-value 'ilisp-block-command)
		       (format (ilisp-value 'ilisp-package-command)
			       (format (ilisp-value 'ilisp-in-package-command)
				       (ilisp-value 'ilisp-fallback-package))))))
	(message "Buffer package not found. Using fallback-package: %s"
		 package)
	(values package t))
      (progn
        (message "Buffer package: %s" package)
        (values package nil)))))

;;;
(defun lisp-find-hash-form ()		; Was: find-hash-form.
  "Tries to find either an hash-form, e.g. #{+|-}-form, or a regular
 in-package or defpackage form."
  (let ((hash-form-regexp (ilisp-value 'ilisp-hash-form-regexp))
	(in-package-regexp (ilisp-value 'ilisp-in-package-command-string t))
	(defpackage-regexp (ilisp-value 'ilisp-defpackage-command-string t)))
    (ignore-errors (backward-char))
    (and (re-search-forward hash-form-regexp)
	 (let ((found (buffer-substring-no-properties
		       (progn
			 (match-end 0)	; this is due to problems with
			 (backward-char) ; the #{+|-}-regexp.
			 (backward-sexp) ; now we are in front of the exp
			 (point))
		       (match-end 0))))
	   
	   (cond ((or (string-match in-package-regexp found)
		      (string-match defpackage-regexp found))
		  (backward-char)
		  (buffer-substring-no-properties (point) (progn (forward-sexp) (point))))
		 (t
		  (buffer-substring-no-properties
		   (point)
		   (progn
		     (let ((post-form (buffer-substring-no-properties (point)
							(progn
							  (forward-sexp)
							  (point))))
			   )
		       ;; This is for the case  '#{+|-}({'and'|'or'} expr*)'
		       (unless (string-match "^\\(#+[^(].\\)\\|\\(#-[^(].\\)"
					     post-form)
			 (forward-sexp))) ; after the #{+|-}-form
		     (forward-sexp)	; after the *real* Lisp-exp
		     (point)))))))))


;;; lisp-buffer-package-internal -- This function does not work well
;;; for Scheme yet.  After all the module system of Scheme is a system
;;; of very high  entropy.
;;;
;;; 19990824 Marco Antoniotti

(defun lisp-buffer-package-internal ()
  "Returns the package of the buffer.
If SEARCH-FROM-START is T then will search from the beginning of the
buffer, otherwise will search backwards from current point.  This
function also tries to correctly handle read-time conditionals and the
relative order of DEFPACKAGE and IN-PACKAGE for Common Lisp."
  (interactive)
  (setq mode-line-process 'ilisp-status)
  (let* ((lisp-buffer-package t)
	 (case-fold-search t)
	 (hash-form-regexp (ilisp-value 'ilisp-hash-form-regexp t))
	 (in-package-regexp (ilisp-value 'ilisp-in-package-command-string t))
	 (defpackage-regexp (ilisp-value 'ilisp-defpackage-command-string t))
	 (hash-in-package-forms-list nil)
	 (hash-defpackage-forms-list nil)
	 (package nil)
         (should-not-cache-p nil))
    (if (not hash-form-regexp)
        (values nil nil)
      (save-excursion
        (goto-char (point-min))

        (while
            (let* ((hash-expr
                    (ignore-errors (lisp-find-hash-form)))
                   (sub-expr
                    (and hash-expr
                         (string-match hash-form-regexp hash-expr)
                         (substring hash-expr (match-beginning 0)))))
              (when hash-expr
                (cond ((string-match "(in-package\\s-*)" hash-expr)
                       (setq should-not-cache-p t)
                       nil)
                      (t
                       (when (and sub-expr (string-match in-package-regexp sub-expr))
                         (push hash-expr hash-in-package-forms-list))
                       (when (and sub-expr (string-match defpackage-regexp sub-expr))
                         (push hash-expr hash-defpackage-forms-list))
                        t))))))
      (multiple-value-bind (package package-not-in-core-p)
	  (ilisp-check-package-advanced
	    (nreverse hash-defpackage-forms-list) 
	    (nreverse hash-in-package-forms-list))
	(let ((should-not-cache-p (or should-not-cache-p package-not-in-core-p)))
	  ;; RED? (when (ilisp-value 'comint-errorp t)
	  ;;  (lisp-display-output package)
	  ;;  (error "No package"))
	  (when (and package
		     ;; There was a bug here, used to have the second *
		     ;; outside of the parens.
		     ;; CMUCL needs just that WITHIN the double-quotes
		     ;; the old regexp is (string-match "[ \n\t:\"]*\\([^
		     ;; \n\t\"]*\\)" package))
		     (string-match "\\([\"].[^\"]*[\"]\\)" package))
	    (setq package
		  (substring package
			     (1+ (match-beginning 1)) (1- (match-end 1)))))
	  ;; => without double-quotes
	  (values package should-not-cache-p))))))

;;;
;;; Martin Atzmueller code ends here.
;;; --------------------------------------------------------------------------

;;;
(defun lisp-buffer-package ()
  "Return the package for this buffer.
The package name is a string. If there is none, return NIL.  This
caches the package unless 'ILISP-DONT-CACHE-PACKAGE' is non-nil, so
calling this more than once is cheap."
  (cond ((and (not (eq buffer-package 'not-yet-computed))
	      (null lisp-dont-cache-package))
	 buffer-package)
	(ilisp-completion-package ilisp-completion-package)
	((or lisp-buffer-package 
	     (memq major-mode ilisp-modes)
	     (not (memq major-mode lisp-source-modes)))
	 nil)
	(t
	 (make-local-variable 'buffer-package)
	 (make-local-variable 'buffer-mode-name)
         (multiple-value-bind (package should-not-cache-p)
             (lisp-buffer-package-internal)
	   (setq buffer-package (if (or should-not-cache-p lisp-dont-cache-package)
                                    'not-yet-computed package))
	   ;; Display package in mode line
	   (when package 
	     (setq mode-name
		   (concat (or buffer-mode-name
			       (setq buffer-mode-name mode-name))
			   ":" package)))
	   package))))


;;;
(defun package-lisp ()
  "Show current inferior LISP package."
  (interactive)
  (message "Inferior LISP package is %s"
	   (ilisp-send (ilisp-value 'ilisp-package-name-command)
		       "Finding inferior LISP package" 'pkg)))

;;; set-package-lisp --
;;; Left the original version, instead of M. Atzmueller's.
;;;
;;; 19990824 Marco Antoniotti
(defun set-package-lisp (package)
  "Set inferior LISP to package of buffer or a named package with prefix."
  (interactive 
   (let ((default (lisp-buffer-package)))
     (if (or current-prefix-arg (null default))
	 (let ((name
		(read-string
		 (format "Package [%s]: " (lisp-buffer-package)) "")))
	   (list (if (equal name "") default name)))
       (list default))))
  (if package
      (ilisp-send (format (ilisp-value 'ilisp-in-package-command) package)
		  (format "Set %s's package to %s" 
			  (buffer-name (ilisp-buffer))
			  package)
		  'pkg 'dispatch)
    (error "No package")))

;;;
(defun set-buffer-package-lisp (package)
  "Reset the current package of the current buffer.
With prefix specify manually."
  (interactive (if current-prefix-arg
		   (list (read-from-minibuffer "Package: " ))
		 (list nil)))
  (if package
      (setq buffer-package package
	    mode-name (concat (or buffer-mode-name mode-name) ":" package))
    (setq buffer-package 'not-yet-computed)
    (lisp-buffer-package)))


;;;%Interface functions
;;;%%Symbols
(defun lisp-default-package-symbol (string)
  ;; use the default package, if we can find one.
  (let ((package (lisp-buffer-package)))
    (lisp-symbol package (if package "::") string)))

(defvar lisp-match-simple-name "[^: \t\n();]+"
  "Regexp that matches a Lisp symbol (excluding package names).  This
is greatly oversimplified.")

(defun lisp-string-to-symbol (string)
  "Given that STRING names a Lisp symbol, convert it to an ilisp
'symbol' object, i.e. a list of \(package delimiter symbol\).  'package'
is either an explicit prefix, or is defaulted from the current buffer
package."
  ;; [changed to ensure the putative prefix doesn't contain funky characters, so
  ;; it doesn't lose on "(pcl::fast-method foo ...)", for example.  but, rather
  ;; than consing up a regexp every time, it would be cleaner to define an
  ;; ilisp-package-prefix-regexp that matches the whole thing, prefix plus
  ;; delimiter, and use that instead.  -- rgr, 30-Mar-03.]
  (let ((separator-regexp (ilisp-value 'ilisp-package-separator-regexp t)))
    (cond ((null separator-regexp)
	    (lisp-default-package-symbol string))
	  ((and (string-match (concat "^\\(" lisp-match-simple-name "\\)\\("
				      separator-regexp "\\)")
			      string)
		;; doesn't count if it's all prefix; probably malformed if so.
		(< (match-end 0) (length string)))
	    (lisp-symbol (match-string 1 string)
			 (match-string 2 string)
			 (substring string (match-end 0))))
	  (t
	    (lisp-default-package-symbol string)))))

(defun lisp-strip-package-prefix-from-symbol (thing)
  ;; thing is ordinarily an *elisp* symbol, but may be a string.
  (let ((regexp (ilisp-value 'ilisp-package-separator-regexp t))
	(string (cond ((symbolp thing) (symbol-name thing))
		      ((stringp thing) thing)
		      ;; this is almost certainly the wrong thing . . .
		      (t (format "%s" thing)))))
    (cond ((null regexp) string)
	  ((string-match regexp string)
	    (substring string (match-end 0)))
	  (t string))))

;;;
(defun lisp-symbol-to-string (symbol)
  "Convert SYMBOL to a string."
  (apply 'concat symbol))

;;;
(defun lisp-buffer-symbol (symbol)
  "Return SYMBOL as a string qualified for the current buffer."
  (let ((symbol-name (lisp-symbol-name symbol))
	(pkg (lisp-symbol-package symbol))
	(delimiter (lisp-symbol-delimiter symbol)))
    (cond ((string= pkg (lisp-buffer-package)) symbol-name)
	  ((string= pkg "") (concat ":" symbol-name))
	  (pkg (concat pkg delimiter symbol-name))
	  (t symbol-name))))

;;;
(defun lisp-previous-symbol (&optional stay)
  "Return the immediately preceding symbol encoding.
The result is encoded as ((package delimiter symbol) function-p start end).
If STAY is T, the end of the symbol will be point."
  (save-excursion
    (if (or (and (memq major-mode ilisp-modes)
		 (= (point) (process-mark (get-buffer-process
					   (current-buffer)))))
	    (progn
	      (skip-chars-backward " \t\n")
	      (or (bobp) (memq (char-after (1- (point))) '(?\) ?\")))))
	nil
      (let* ((delimiters (ilisp-value 'ilisp-symbol-delimiters))
	     (end (progn
		    (if (not stay) (skip-chars-forward delimiters))
		    (point)))
	     (start (progn
		      (skip-chars-backward delimiters)
		      (point)))
	     (prefix (if (not (bobp)) (1- start)))
	     (function-p
	      (and prefix
		   (or (eq (char-after prefix) ?\()
		       (and (eq (char-after prefix) ?')
			    (not (bobp))
			    (eq (char-after (1- prefix)) ?#)))
		   (not (looking-at "[^: \t\n]*:*\\*[^ \t\n]")))))
	(cons (lisp-string-to-symbol (buffer-substring-no-properties start end))
	      (list function-p start end))))))

;;;
(defun lisp-function-name ()
  "Return the previous function symbol.
This is either after a #' or at the start of the current sexp.  If there
is no current sexp, return NIL."
  (save-excursion
    (let ((symbol (lisp-previous-symbol)))
      (if (car (cdr symbol))
	  (car symbol)
	(condition-case ()
	    (if (and (memq major-mode ilisp-modes)
		     (= (point)
			(process-mark 
			 (get-buffer-process (current-buffer)))))
		nil
	      (backward-up-list 1)
	      (down-list 1)
	      (lisp-string-to-symbol
	       (buffer-substring-no-properties (point) 
				 (progn (forward-sexp 1) (point)))))
	  (error nil))))))

;;;
(defun lisp-defun-name ()
  "Return the name of the current defun."
  (save-excursion
    (lisp-defun-begin)
    (lisp-string-to-symbol (lisp-def-name t))))


;;;%% ILISP initializations
;;;
(defun ilisp-initialized ()
  "Return T if the current inferior LISP has been initialized."
  (memq (buffer-name (ilisp-buffer)) ilisp-initialized))

;;;
(defun ilisp-load-init (dialect file)
  "Add FILE to the files to be loaded into the inferior LISP.
The file(s) are 'init' files to be loaded when dialect is initialized.
If FILE is NIL, the entry will be removed."
  (let ((old (assoc dialect ilisp-load-inits)))
    (if file
        (if old
            (rplacd old file)
          (setq ilisp-load-inits (nconc ilisp-load-inits 
                                        (list (cons dialect file)))))
      (when old
        (setq ilisp-load-inits (delq old ilisp-load-inits))))))

;;;
(defun ilisp-binary (init var)
  "Initialize VAR to the result of INIT if VAR is NIL."
  (if (not (ilisp-value var t))
      (let ((binary (ilisp-value init t)))
	(if binary
	    (comint-send 
	     (ilisp-process) binary
	     t nil 'binary nil 
	     (` (lambda (error wait message output last)
		  (if (or error
			  (not (string-match "\"[^\"]*\"" output)))
		      (progn
			(lisp-display-output output)
			(abort-commands-lisp "No binary"))
		    (setq (, var)
			  (substring output
				     (1+ (match-beginning 0))
				     (1- (match-end 0))))))))))))

;;;
(defun ilisp-done-init ()
  "Make sure that initialization is done, and, if not, dispatch another check."
  (if ilisp-load-files
      (comint-send-code (get-buffer-process (current-buffer))
			'ilisp-done-init)
    (when ilisp-initializing
      (unless comint-errorp
	(message "Finished initializing %s" (car ilisp-dialect)))
      (setq ilisp-initializing nil
	    ilisp-initialized
	    (cons (buffer-name (current-buffer)) ilisp-initialized)))))

;;;

(defun comint-send-code-init-function ()
  "Stuff that is executed for initialization in the ilisp process buffer."
  (let ((files ilisp-load-inits)
        (done nil))
    (unwind-protect
      (progn
        (when (not ilisp-init-binary-extension)
          (setq ilisp-init-binary-extension 
                  ilisp-binary-extension))

        (dolist (file files)
          (let ((load-file 
                  (let ((source
                          (expand-file-name (cdr file)
                                            ilisp-*directory*))
                        (binary
                          (expand-file-name
                           (lisp-file-extension (cdr file)
                                                ilisp-binary-extension)
                           ilisp-*directory*)))
                    (if (file-newer-than-file-p binary source)
                      binary
                      source))))
            (ilisp-load-or-send (file-name-hack load-file))))
        (comint-send-code (ilisp-process)
                          'ilisp-done-init)
        (setq done t))                         
      (unless done
        (setq ilisp-initializing nil)
        (abort-commands-lisp)))))

(defun ilisp-init-internal (&optional sync)
  "Send all of the stuff necessary to initialize."
  (unwind-protect
      (progn
	(when sync
	  (comint-sync (ilisp-process)
		       "\"Start sync\""  "[ \t\n]*\"Start sync\""
		       "\"End sync\""    "\"End sync\""))
	(ilisp-binary 'ilisp-binary-command 'ilisp-binary-extension)
	(ilisp-binary 'ilisp-init-binary-command 
		      'ilisp-init-binary-extension)

	;; This gets executed in the process buffer
	(comint-send-code
	 (ilisp-process)
         (function comint-send-code-init-function))
        (set-ilisp-value 'ilisp-initializing t)) ; progn
    
    (unless (ilisp-value 'ilisp-initializing t)
      (abort-commands-lisp))))

;;;
(defun ilisp-init (&optional waitp forcep sync)
  "Initialize the current inferior LISP.
If necessary load the files in 'ilisp-load-inits'.  Optional WAITP
waits for initialization to finish.  When called interactively, force
reinitialization.  With a prefix, get the binary extensions again."
  (interactive 
   (list (if current-prefix-arg
	     (progn
	       (set-ilisp-value 'ilisp-init-binary-extension nil)
	       (set-ilisp-value 'ilisp-binary-extension nil)
	       nil))
	 t))
  (when (or forcep (not (ilisp-initialized)))
    (message "Started initializing ILISP")
    (unless ilisp-*directory*
      (setq ilisp-*directory* (or (ilisp-directory "ilisp.elc" load-path)
                                  (ilisp-directory "ilisp.el" load-path))))
    (unless (ilisp-value 'ilisp-initializing t)
      (ilisp-init-internal sync))
    (when waitp
      (while (ilisp-value 'ilisp-initializing t)
	(accept-process-output)
	(sit-for 0)))))

;;;
(defun ilisp-init-and-sync ()
  "Synchronize with the inferior LISP and then initialize."
  (ilisp-init nil nil t))

;;;
(defun call-defun-lisp (arg)
  "Put a call of the current defun in the inferior LISP and go there.
If it is a \(def* name form, look up reasonable forms of name in the
input history unless called with prefix ARG. If not found, use \(name
or *name* as the call.  If is not a def* form, put the whole form in
the buffer."
  (interactive "P")
  (if (save-excursion (lisp-defun-begin) (looking-at "(def"))
      (let* ((symbol (lisp-defun-name))
	     (name (lisp-symbol-name symbol))
	     (package (if (lisp-symbol-package symbol)
			  (concat "\\("
				  (lisp-symbol-package symbol) ":+\\)?")))
	     (variablep (string-match "^\\*" name))
	     (setfp (string-match "(setf \\([^\)]+\\)" name))
	     )
	(switch-to-lisp t t)
	(cond (setfp 
	       (setq name 
		     (substring name (match-beginning 1) (match-end 1)))
	       (lisp-match-ring (if (not arg)
				    (concat "(setf[ \t\n]*(" 
					    package name "[ \t\n]"))
				(concat "(setf (" name)))
	      (variablep (lisp-match-ring (if (not arg) 
					      (concat package name))
					  name))
	      (t
	       (let ((fun (concat "(" name)))
		 (setq name (regexp-quote name))
		 (or (lisp-match-ring 
		      (if (not arg) (concat "(" package name "[ \t\n\)]"))
		      fun 
		      (not arg))
		     (lisp-match-ring (concat "(" package
					      "[^ \t\n]*-*" name)
				      fun))))))
    (let ((form 
	   (save-excursion
	     (buffer-substring-no-properties (lisp-defun-begin) 
			       (lisp-end-defun-text t)))))
      (switch-to-lisp t t)
      (comint-kill-input)
      (insert form))))

;;;
(defun ilisp-send (string &optional message status and-go handler)
  "Send STRING to the ILISP buffer.
Also print MESSAGE set STATUS and return the result if AND-GO is NIL,
otherwise switch to ilisp if and-go is T and show message and results.
If AND-GO is 'dispatch, then the command will be executed without
waiting for results.  If AND-GO is 'call, then a call will be
generated. If this is the first time an ilisp command has been
executed, the lisp will also be initialized from the files in
ilisp-load-inits.  If there is an error, comint-errorp will be T and
it will be handled by HANDLER."
  (ilisp-init t)
  (let ((process (ilisp-process))
	(dispatch (eq and-go 'dispatch)))
    (when message
      (message "%s" (if dispatch
			(concat "Started " message)
		      message)))
    ;; No completion table
    (setq ilisp-original nil)

    (cond ((memq and-go '(t call))
	   (comint-send process string nil nil status message handler)
	   (if (eq and-go 'call)
	       (call-defun-lisp nil)
	     (switch-to-lisp t t))
	   nil)
	  (t
	   (let* ((save (ilisp-value 'ilisp-save-command t))
		  (result
		   (comint-send 
		    process
		    (if save (format save string) string)
		    ;; Interrupt without waiting
		    t (unless dispatch 'wait) status message handler)))
             (when save
	       (comint-send
		process
		(ilisp-value 'ilisp-restore-command t)
		;; Martin Atzmueller 2000-01-22
		;; this was necessary to have it work in Emacs 20.3 smoothly
                ;; old one: t nil 'restore "Restore" t t
		;; mew experimental:
		;; t (unless dispatch 'wait) 'restore "Restore" t t))
		t (unless dispatch 'wait) 'restore "Restore" t t))	     
	     (unless dispatch
	       (while (not (cdr result))
		 (if (eq +ilisp-emacs-version-id+ 'xemacs)
		     (sit-for 0.001 t)
		   (sit-for 0 1 t))
		 (accept-process-output))
	       (comint-remove-whitespace (car result))))))))


;;;
(defun ilisp-load-or-send (file)
  "Try to load FILE into the inferior LISP.
If the file is not accessible in the inferior LISP as determined by
ilisp-load-or-send-command, then visit the file and send the file over
the process interface."

  (let* ((command
	  (format (ilisp-value 'ilisp-load-or-send-command) 
		  (lisp-file-extension
		   file 
		   (ilisp-value 'ilisp-init-binary-extension t))
		  file)))
    (set-ilisp-value 'ilisp-load-files 
		     (nconc (ilisp-value 'ilisp-load-files t) (list file)))
    (comint-send
     (ilisp-process) command t nil 'load
     (format "Loading %s" file)
     (function
      (lambda (error wait message output last)
	(let* ((file (first (last ilisp-load-files)))
	       (process (get-buffer-process (current-buffer)))
	       (case-fold-search t))
	  (if (and output 
		   (string-match "nil" (car (lisp-last-line output))))
	      (let* ((old-buffer (get-file-buffer file))
		     (buffer (find-file-noselect file))
		     (string (save-excursion
			       (set-buffer buffer)
			       (buffer-string))))
		(unless old-buffer (kill-buffer buffer))
		(if (string= "" string)
		    (abort-commands-lisp (format "Can't find file %s" file))
		  (comint-send
		   process
		   (format ilisp-block-command string)
		   t nil 'send (format "Sending %s" file)
		   (function (lambda (error wait message output last)
			       (if error
				   (progn 
				     (comint-display-error output)
				     (abort-commands-lisp
				      (format "Error sending %s"
					      (first (last ilisp-load-files)))
				      ))
				 (setq ilisp-load-files
				       (delq (first (last ilisp-load-files))
					     ilisp-load-files))))))))
	    (when error (ilisp-handler error wait message output last))
	    (setq ilisp-load-files (delq file ilisp-load-files)))))))))

;;; end of file -- ilisp-snd.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-src.el0000600000175000001440000017125710020674035016015 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-src.el --
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-src.el,v 1.13 2003/12/21 03:16:39 rgrjr Exp $

(require 'cl)

;;; See ilisp.el for more information.

;;;%Source file operations
(unless (boundp 'tags-file-name)
  (defvar tags-file-name nil))

(defvar lisp-last-definition nil "Last definition (name type) looked for.")

(defvar lisp-last-file nil "Last used source file.")

(defvar lisp-last-point nil "Last point in last source file.")

(defvar lisp-last-locator nil "Last source locator used.")

(defvar lisp-search nil "Set to T when searching for definitions.")

(defvar lisp-using-tags nil "Set to T when using tags.")

;;;%%lisp-directory
(defvar lisp-edit-files t
  "Controls editing of of source files through Emacs' buffers.
If T, then buffers in one of 'lisp-source-modes' will be searched by
'edit-definitions-lisp' if the source cannot be found through the
inferior LISP.  It can also be a list of files to edit definitions
from set up by \(\\[lisp-directory]).  If it is set to nil, then no
additional files will be searched.")

;;;
(defun lisp-extensions ()
  "Return a regexp for matching file extensions.
The extensions are those of files that enter one of
'lisp-source-modes' according to 'auto-mode-alist'."
  (let ((entries auto-mode-alist)
	(extensions nil))
    (dolist (entry entries)
      (when (memq (cdr entry) lisp-source-modes)
	(setq extensions 
	      (concat "\\|" (car entry) extensions))))
    (substring extensions 2)))

;;;
(defun lisp-directory (directory add)
  "Edit the files in DIRECTORY.
The files must have an 'auto-mode' alist entry in 'lisp-source-modes'.
With a positive prefix, add the files on to the already existing
files.  With a negative prefix, clear the list.  In either case set
tags-file-name to nil so that tags are not used."
  (interactive 
   (list (if (not (eq current-prefix-arg '-))
	     (read-file-name "Lisp Directory: "
			     nil
			     default-directory
			     nil))
	     current-prefix-arg))
  (setq tags-file-name nil)
  (if (eq add '-)
      (progn (setq lisp-edit-files t)
	     (message "No current lisp directory"))
      (if add
	  (message "Added %s as a lisp directory" directory)
	  (message "%s is the lisp directory" directory))
      (setq directory (expand-file-name directory))
      (if (file-directory-p directory)
	  (setq lisp-edit-files
		(append
		 (directory-files directory t (lisp-extensions))
		 (if add (if (eq lisp-edit-files t) nil lisp-edit-files))))
	  (error "%s is not a directory" directory))))

;;;; New M-. implementation.  -- rgr, 25-Mar-03.

(defvar lisp-fall-back-on-find-tags ':ask
  "*Can be one of nil for never, :ask to ask the user each time, or
anything else to always use find-tag as a last resort (when ilisp can't
find anything).")
(defvar lisp-find-definition-verbose-p nil
  "Whether to generate informational messages about internal progress.")

;; these regexp fragments are shared between a number of regexp-constructing
;; definitions.
(defvar ilisp-whitespace* "\\([ \t\n]*.\\)?[ \t\n]*"
  "This looks hairy because it also matches an optional Symbolics
font-change escape sequence (the \"^F.\" in the middle).")
(defvar ilisp-whitespace+ "\\([ \t\n]+\\(.[ \t\n]*\\)?\\|.[ \t\n]+\\)"
  "More font-change hairiness.")
(defvar ilisp-terminal-whitespace "[ \t\n();]"
  "Regexp that matches 'terminal' whitespace (whatever might end a symbol).")
(defvar lisp-match-name "[^ \t\n();#]+"
  "Regexp that matches a Lisp symbol (including any package name).  This
is greatly oversimplified.")
(defvar lisp-optional-package-regexp
	(concat "\\(" lisp-match-simple-name ":+\\)?")
  "Regexp that matches an optional package prefix.")
(defvar lisp-ws-and-opt-pkg-regexp
	(concat ilisp-whitespace+ lisp-optional-package-regexp)
  "Regexp that matches one or more whitespace characters, followed by an
optional package prefix.")
(defvar lisp-match-package-prefix (concat "^" lisp-match-simple-name ":+")
  "Note that this will not match the prefix in (e.g.) '(pcl::method foo ...)'.")

(defstruct ilisp-defn-spec
  ;; Structure that describes an entry in the *Edit-Definitions* buffer, which
  ;; is parsed and returned by the lisp-find-next-possibility fn.  This is what
  ;; gets stored into the lisp-locate-definition variable (formerly, it was just
  ;; a cons of (name . type).
  (name nil)	;; an ilisp-symbol
  (name-string "")	;; string version of above
  (type "function")
  (file nil)
  (parent nil)
  (hints nil))

;; [find a better place for this?  -- rgr, 25-Mar-03.]
(defun ilisp-getf (disembodied-plist symbol &optional default)
  ;; symbol is an emacs lisp symbol.  This is case insensitive for
  ;; disembodied-plist indicators, to paper over emacs/CL case differences.
  (let ((result default) (name (downcase (symbol-name symbol))))
    (while disembodied-plist
      (if (string-equal (downcase (symbol-name (car disembodied-plist))) name)
	  (setq result (car (cdr disembodied-plist))
		disembodied-plist nil)
	  (setq disembodied-plist (cdr (cdr disembodied-plist)))))
    result))

(defun lisp-read-cl-syntax (string)
  ;; Given a string containing zero or more forms in Common Lisp syntax, read
  ;; them into emacs lisp.  [Unfortunately, the quoting we have to do here will
  ;; be duplicated by %S on re-output, so this doesn't win by itself.  -- rgr,
  ;; 14-Sep-02.]
  (save-excursion
    (set-buffer (get-buffer-create " *ilisp-cl-result*"))
    (erase-buffer)
    (insert string)
    (goto-char (point-min))
    ;; Scan the buffer for characters that need quoting.  Everything within
    ;; quoted strings is fine, hence the in-quoted-string-p state maintenance.
    (let ((in-quoted-string-p nil)
	  (uninteresting-chars "^\"\\#.?"))
      (skip-chars-forward uninteresting-chars)
      (while (not (eobp))
	(let ((char (char-after (point))))
	  (cond ((= char ?\")
		  (setq in-quoted-string-p (not in-quoted-string-p)))
		((= char ?\\)
		  ;; We don't ever want to escape a backslash, and we don't even
		  ;; want to think about the char after it.
		  (forward-char 1))
		(in-quoted-string-p)
		((= char ?\.)
		  ;; Dots act as the "consing dot" in dotted-pair notation in
		  ;; both CL and elisp, but Common Lisp allows them to be
		  ;; constituent characters (no "\" needed).  Embedded and
		  ;; trailing dots in CL atoms used to be treated as consing
		  ;; dots by the elisp reader, but I notice that FSF emacs 20.7
		  ;; reads them compatibly.  But leading dots are not
		  ;; compatible; even 20.7 reads "(foo .bar)" as a dotted pair,
		  ;; whereas CL does not, so we always make this correction
		  ;; regardless of emacs version.  Note that it relies on the
		  ;; fact that CL always prints whitespace before and after a
		  ;; consing dot; other possibilities handled by the CL reader
		  ;; will break.  -- rgr, 14-Sep-02.
		  (if (not (save-excursion
			     (skip-chars-backward " \t\n")
			     (looking-at "[ \t\n]+\\.[ \t\n]+")))
		      (insert "\\")))
		(t
		  (insert "\\")))
	  (forward-char 1))
	(skip-chars-forward uninteresting-chars)))
    ;; Now read and return what we quoted.
    (let ((result nil))
      (goto-char (point-min))
      (condition-case error
	  (while t
	    (setq result (cons (read (current-buffer)) result)))
	;; EOF could also be incomplete syntax, or some CL syntax we can't read.
	(end-of-file nil))
      ;; Deal with NIL vs nil.  Other symbol case issues need to be addressed by
      ;; the caller, but the empty list has to be the empty list.
      (nreverse (nsubst nil 'NIL result)))))

;;; Source code definition line matching hacks.

;; ilisp-cl-source-locator-patterns --
;;
;; Note:
;;
;; 19990804 Marco Antoniotti
;; The new ones (method and generic-fucntion) should be carefully checked.
;;
;; [updated, made more concise.  -- rgr, 7-Sep-02.]

(defvar ilisp-cl-source-locator-patterns
	(let (;;  used to be
	      ;; "\\([ \t\n]+\\(.\\)?[ \t\n]*\\|[ \t\n]*.[ \t\n]+\\)".  --
	      ;; rgr, 7-Sep-02.
	      ( ilisp-whitespace+)
	      ;; this used to be "\\(.\\)?[ \t\n]*"; changed to look like
	      ;; ilisp-whitespace*, but doesn't match newlines.
	      ( "\\([ \t]*.\\)?[ \t]*")
	      ;; terminal whitespace (or whatever might end a symbol).
	      ( ilisp-terminal-whitespace))
	  (list
	    (list 'variable	(concat "^" 
					"(def\\(var\\|parameter\\|constant\\)"
					 "%s" ))
	    (list 'structure	(concat "^"  "(defstruct" 
					"(?"  "%s" ))
	    ;; [this doesn't work by itself any more, because of the two %s
	    ;; occurrences (see lisp-make-cl-setf-fspec-finder), but is kept
	    ;; here for readability.  -- rgr, 9-Sep-02.]
	    (list 'setf		(concat "^"  "(def\\(setf"  "%s" 
					"\\|un"  "(setf"  "%s" 
					")\\)"))
	    ;; this describes the structure of the rest; it has an extra "%s" to
	    ;; insert the name of the defining form.
	    (list '	(concat "^"  "(%s"  "%s" ))
	    '(function		 "\\(defun\\|defmacro\\)")
	    '(macro		 defmacro)
	    '(type		 deftype)
	    '(class		 defclass)
	    '(method		 defmethod)
	    '(generic-function	 defgeneric)))
  "*Alist of (definition-name regexp-template), where definition-name is
an elisp symbol, and regexp-template is a format string that, given a
string that matches a symbol, returns a regexp that match that kind of
definitions of that symbol.  If regexp-template is a symbol, then that
is an indirect reference to another named pattern (to save having to
look at too many nearly identical regexps).  Anything after the
regexp-template is prefixed to the definition name in the format call.")

(defvar lisp-match-deffoo-template
	;; originally "^[ \t\n]*(def[^ \t\n]*[ \t\n]+(?%s[ \t\n(]+"
	(format (car (cdr (assoc ' ilisp-cl-source-locator-patterns)))
		(concat "def" lisp-match-name)
		"(?%s")
  "Generates a regexp that matches a line that starts with
'(def (?name', with liberal whitespace allowance, when given
to format with a suitable name pattern.")

(defun lisp-make-standard-cl-defn-regexp (name-regexp type)
  "Look for a named definition of the given type, assuming that it is
defined using the obvious Lisp syntax.  Always searches for something,
falling back on '(  ...)' if nothing specific is known about
the definition type.  Use ilisp-cl-source-locator-patterns to customize
this."
  (let* ((type (intern type))
	 (entry (assoc type ilisp-cl-source-locator-patterns))
	 (pattern (car (cdr entry)))
	 (extras (cdr (cdr entry))))
    (cond ((null entry)
	    ;; no specific pattern; try to match "(  ...".
	    (setq pattern ')
	    (setq extras (list (lisp-make-gf-name-matcher type)))))
    (cond ((symbolp pattern)
	    ;; internal reference to another pattern template.
	    (setq entry (or (assoc pattern ilisp-cl-source-locator-patterns)
			    (error "Internal error: %S is missing %S."
				   'ilisp-cl-source-locator-patterns
				   pattern)))
	    (setq pattern (car (cdr entry)))))
    (if extras
	(apply (function format) pattern
	       (append extras (list name-regexp)))
	(format pattern name-regexp))))

(defun lisp-make-whitespace-and-symbol-matcher (name)
  ;; notice that we carefully preserve the package prefix as specified if a
  ;; keyword, and allow any or no package prefix otherwise.
  (let ((string (cond ((stringp name) name)
		      ((symbolp name) (symbol-name name))
		      ;; don't die horribly.
		      (t (format "%s" name)))))
    (cond ((string-match "^:" string)
	    (concat "[ \t\n]*" (regexp-quote string)))
	  ((string-match ":+" string)
	    (concat lisp-ws-and-opt-pkg-regexp
		    (substring string (match-end 0))))
	  (t
	    (concat lisp-ws-and-opt-pkg-regexp string)))))

(defvar lisp-conc-name-regexp
	(concat "(:conc-name" ilisp-whitespace+ "\\(" lisp-match-name "\\)")
  "Matches '(:conc-name ' form, where  is returned by the
third subexpressions.")

(defun lisp-find-accessor-in-random-defstruct (accessor-symbol)
  ;; look for a defstruct that has (a) a structure name or :conc-name attribute
  ;; compatible that matches some prefix of accessor-name, and (b) that also
  ;; contains a slot with the remainder of accessor-name.  This has to be done
  ;; algorithmically, because returning a single regexp that could cover all the
  ;; possibilities would be horrendous.  The basic premise is probably pretty
  ;; sound, but the regexps may be a bit sloppy in places.
  (let* ((accessor-name (downcase (if (stringp accessor-symbol)
				      accessor-symbol
				      (lisp-symbol-name accessor-symbol))))
	 (template (car (cdr (assoc 'structure
				    ilisp-cl-source-locator-patterns))))
	 (pattern (if (string-match "%" template)
		      (substring template 0 (match-beginning 0))
		      (error "internal error")))
	 (found-p nil))
    ;; search for all defstructs, parsing out name & :conc-name.
    (while (and (not found-p)
		(not (eobp))
		(re-search-forward pattern nil 'move))
      (let* ((structure-start (match-beginning 0))
	     (structure-name (let ((start (point)))
			       (forward-sexp)
			       (buffer-substring-no-properties start (point))))
	     (structure-end (save-excursion
			      (end-of-defun-lisp)
			      (point)))
	     (conc-name-hit
	       (save-excursion
		 (and (re-search-forward lisp-conc-name-regexp structure-end t)
		      (lisp-strip-package-prefix-from-symbol
		        (downcase (match-string 3))))))
	     ;; the prefix should be exactly what a compliant Common Lisp would
	     ;; decide (ignoring case).
	     (prefix (cond ((null conc-name-hit)
			     ;; no :conc-name (or :conc-name without an arg)
			     ;; means use the structure name.
			     (concat (lisp-strip-package-prefix-from-symbol
				       structure-name)
				     "-"))
			   ((string-equal conc-name-hit "nil")
			     ;; "(:conc-name nil)" means do not prepend
			     ;; anything, so the slot name is the accessor name.
			     nil)
			   (t conc-name-hit)))
	     (slot-name (cond ((null prefix)
				accessor-name)
			      ((and (> (length accessor-name) (length prefix))
				    (string-equal (substring accessor-name
							     0 (length prefix))
						  prefix))
				(substring accessor-name (length prefix))))))
	(setq found-p (and slot-name
			   (re-search-forward (regexp-quote slot-name)
					      structure-end t)))
	'(message "Found %S (end %S, prefix %S) slot-name %S, found %S."
		 structure-name structure-end prefix slot-name found-p)))
    (not (null found-p))))

;;; Making regexps that match specific defmethod forms.

(defun lisp-match-defmethod-specializer (name)
  ;; oops; name might actually be the list "(eql :foobar)" . . .
  (let* ((whitespace "[ \t\n]")
	 (name (lisp-strip-package-prefix-from-symbol name))
	 (matcher (concat "(" whitespace "*" lisp-match-name
			  lisp-ws-and-opt-pkg-regexp (regexp-quote name)
			  whitespace "*)")))
    (concat whitespace "*"
	    (if (member name '("T" "t"))
		(concat "\\(" matcher "\\|" lisp-match-name "\\)")
		matcher))))

(defun lisp-pop-trivial-method-specializers (specializer-list)
  ;; this is so we don't have to match "T T T)" at the end of the arglist for
  ;; unspecialized args.  The list is understood to be reversed.
  (cond ((null specializer-list) nil)
	((member (car specializer-list) '(t T))
	  (lisp-pop-trivial-method-specializers (cdr specializer-list)))
	(t
	  specializer-list)))

(defun lisp-make-gf-name-matcher (gf-name)
  ;; Make a regular expression that matches the generic function name ignoring
  ;; packages, also handling (setf foo) names.  Does not match leading or
  ;; trailing whitespace.
  (if (consp gf-name)
      ;; assumes a proper list.
      (concat "(" ilisp-whitespace*
	      (lisp-make-gf-name-matcher (car gf-name))
	      (apply (function concat)
		     (mapcar (function (lambda (x)
			       (concat ilisp-whitespace+
				       (lisp-make-gf-name-matcher x))))
			     (cdr gf-name)))
	      ilisp-whitespace* ")")
      (concat lisp-optional-package-regexp
	      (regexp-quote (lisp-strip-package-prefix-from-symbol gf-name)))))

(defun lisp-make-cl-method-definition-regexp (spec-string)
  (let* ((tail (cdr (car (read-from-string spec-string))))
	 (gf-name (car tail))
	 (setf-function-p (and (consp gf-name)
			       (eq (car gf-name) 'setf)))
	 (gf-name-matcher (lisp-make-gf-name-matcher gf-name))
	 (rev-tail (reverse (cdr tail)))
	 (specializers (car rev-tail))
	 (nontrivial-specializers (reverse
				    (lisp-pop-trivial-method-specializers
				      (reverse specializers))))
	 (method-qualifiers (reverse (cdr rev-tail)))
	 (whitespace "[ \t\n]")
	 (defmethod-matcher
	   (apply (function concat)
		  "^(defmethod"
		  (if setf-function-p ilisp-whitespace* ilisp-whitespace+)
		  gf-name-matcher
		  (append (mapcar (function
				    lisp-make-whitespace-and-symbol-matcher)
				  method-qualifiers)
			  (list whitespace "*(")
			  (mapcar (function lisp-match-defmethod-specializer)
				  nontrivial-specializers)))))
    '(message "[Got %S]" (list gf-name method-qualifiers
			      nontrivial-specializers))
    (if (and (null method-qualifiers)
	     (= (length specializers)
		(if setf-function-p 2 1)))
	;; could also be an reader/writer/accessor generated by a defclass form.
	;; [***bug***: this doesn't insist on a hit in the right defclass form.
	;; more rigorous would be to do a lisp-find-accessor-in-random-defstruct
	;; style search only when hints require it.  -- rgr, 10-Sep-02.]
	(concat defmethod-matcher "\\|"
		"\\(:accessor\\|:writer\\|:reader\\)"
		ilisp-whitespace+
		(if setf-function-p
		    (lisp-make-gf-name-matcher (car (cdr gf-name)))
		    gf-name-matcher)
		ilisp-terminal-whitespace)
	;; just look for defmethod forms.
	defmethod-matcher)))

;;; Visiting source file possibilities.

(defun lisp-make-cl-method-fspec-finder (definition)
  (lisp-make-cl-method-definition-regexp
    (ilisp-defn-spec-name-string definition)))

(defun lisp-make-cl-pcl::fast-method-fspec-finder (name)
  ;; hack for pcl::fast-method function specs.
  (lisp-make-cl-method-fspec-finder name))

(defun lisp-make-cl-setf-fspec-finder (definition)
  ;; This also looks for defstruct accessors if given the right hint.
  (let* ((setf-fn-spec (ilisp-defn-spec-name-string definition))
	 (function-spec (car (read-from-string setf-fn-spec)))
	 (symbol (car (cdr function-spec)))
	 (name-string (if (symbolp symbol)
			  (lisp-strip-package-prefix-from-symbol symbol)
			  (error "'%S' is a bad SETF function spec."
				 setf-fn-spec)))
	 (type (ilisp-defn-spec-type definition))
	 (parent (ilisp-defn-spec-parent definition)))
    (cond ((and parent
		(string-equal (car parent) "structure"))
	    (lisp-find-accessor-in-random-defstruct name-string))
	  ((string-equal type "generic-function")
	    (lisp-make-standard-cl-defn-regexp
	      (lisp-make-gf-name-matcher function-spec)
	      type))
	  (t
	    ;; defsetf or defun with (setf foo) spec.
	    (let ((name-regexp (concat lisp-optional-package-regexp
				       (regexp-quote name-string)))
		  (setf-entry (assoc 'setf ilisp-cl-source-locator-patterns)))
	      (lisp-re nil (car (cdr setf-entry))
		       name-regexp name-regexp))))))

;;; Common Lisp definition matching interface.

(defun lisp-cl-symbolic-name-regexp (definition)
  ;; helper for lisp-locate-clisp below; takes care of cases where "symbol" is
  ;; actually known to be Lisp symbol.  we ignore its package, though.
  (let* ((symbol (ilisp-defn-spec-name definition))
	 (type (ilisp-defn-spec-type definition))
	 (name (lisp-symbol-name symbol))
	 (name-regexp (concat lisp-optional-package-regexp
			      ;; symbol-name of the read-from-string result
			      ;; undoes lisp-read-cl-syntax quoting.
			      (regexp-quote
			        (symbol-name (car (read-from-string name))))))
	 (parent (ilisp-defn-spec-parent lisp-last-definition))
	 (hints (ilisp-defn-spec-hints lisp-last-definition)))
    (cond ((or (not (equal type "function"))
	       (and (null parent) (null hints)))
	    ;; all nonfunction cases (for which no hints are supported yet), or
	    ;; a simple function case, named with a symbol either way.  These
	    ;; are totally trivial (we hope).
	    (lisp-make-standard-cl-defn-regexp name-regexp type))
	  ;; Problem function (with an ordinary (symbolic) name).
	  ((and parent
		(string-equal (car parent) "structure"))
	    ;; desperate heuristic #1: look inside all defstruct forms.
	    (lisp-find-accessor-in-random-defstruct symbol))
	  ;; Problem case without any applicable hacks.
	  (t
	    (lisp-make-standard-cl-defn-regexp name-regexp type))
	  ;; [move this to lisp-locate-clisp somewhere?  -- rgr, 4-Oct-02.]
	  (t
	    (message "[Pulling out all the stops.]")
	    ;; Search for a "(defsomething (?name" form.  This is way too broad
	    ;; to use in general, but things are pretty desperate at this point.
	    (format lisp-match-deffoo-template name-regexp)))))

(defun lisp-make-cl-definition-regexp (definition)
  (let ((name (ilisp-defn-spec-name-string definition)))
    (cond ((string-match "^(\\([a-zA-Z0-9-_:]+\\)[ \t\n]+" name)
	    ;; 'interesting' function naming cases, including setf & method
	    ;; function specs.  we try to dispatch on the car of the list, which
	    ;; may include a package prefix.
	    (let* ((spec-type (downcase (match-string 1 name)))
		   (finder (intern (concat "lisp-make-cl-" spec-type
					   "-fspec-finder"))))
	      (if (and (not (fboundp finder))
		       (string-match ":+" spec-type))
		  ;; try without the package prefix.
		  (setq finder
			(intern (concat "lisp-make-cl-"
					(substring spec-type (match-end 0))
					"-fspec-finder"))))
	      (cond ((fboundp finder)
		      (funcall finder lisp-last-definition))
		    (t
		      (message "Oops; don't know how to find %S %s definitions."
			       spec-type (ilisp-defn-spec-type definition))
		      (sit-for 1)
		      nil))))
	  (t
	    (lisp-cl-symbolic-name-regexp lisp-last-definition)))))

(defun lisp-locate-clisp (symbol type first-p back-p)
  "Try to find SYMBOL's TYPE definition in the current Common Lisp
buffer.  Return true if sucessful, and move point to the match; else
return nil and move point to the end of the buffer.  lisp-locate-clisp
acts as the top-level classifier of Common Lisp definition types,
dispatching to other functions to implement the appropriate search
tactics for the definition type, and using any hints or parentage data
we may find in the lisp-locate-definition global.

   [This was changed to interpret non-symbol definition names, use hint
and parent heuristics, and centralize the regexp search.  Somewhat
kludgily, it requires that lisp-last-definition be set to the
ilisp-defn-spec structure for the passed symbol and type.  -- rgr,
25-Mar-03.]

   [The FIRST-P and BACK-P arguments are ignored, since they are now
always t and nil, respectively.  lisp-locate-clisp is one of several
possible values returned by \(ilisp-value 'ilisp-locator), so we need to
preserve the protocol; eventually, this should be fixed.  -- rgr,
4-Oct-02.]"
  (if lisp-find-definition-verbose-p
      (message "[doing %S.]"
	       (list 'lisp-locate-clisp symbol type first-p back-p)))
  ;; [should check for lisp-last-definition validity here.  -- rgr, 4-Oct-02.]
  (if (equal type "any")
      ;; [may have to support this, for non-Lisp search.  -- rgr, 7-Sep-02.]
      (error "shouldn't have been given type %S, for %S." type symbol))
  (let* ((case-fold-search t)
	 (regexp (lisp-make-cl-definition-regexp lisp-last-definition)))
    (cond ((symbolp regexp)
	    ;; lisp-make-cl-definition-regexp already did the searching for us.
	    regexp)
	  ((not (stringp regexp))
	    (error "bug: %S should have returned a regexp string."
		   'lisp-make-cl-definition-regexp))
	  ((re-search-forward regexp nil t)
	    (goto-char (match-beginning 0))
	    t)
	  (t
	    ;; [use fallback strategy?  -- rgr, 4-Oct-02.]
	    nil))))

(defun lisp-set-up-for-search-in-new-file (file)
  ;; Go to the file's buffer, reading it if necessary (and possible), and move
  ;; to the start after setting lisp-last-file and lisp-last-point.  Returns t
  ;; if successful, and returns nil and prints a message if not.
  (let ((target-buffer (get-file-buffer file)))
    (cond ((or target-buffer
	       (file-readable-p file))
	    (set-buffer (or target-buffer
			    (find-file-noselect file)))
	    (setq lisp-last-file (buffer-file-name))
	    (setq lisp-last-point (point))
	    (goto-char (point-min))
	    t)
	  (t
	    (message "File %S doesn't exist!" file)
	    (sit-for 1)
	    nil))))

(defun lisp-locate-definition-in-file (locator defn-spec &optional pop)
  ;; [may no longer do POP correctly.  -- rgr, 4-Sep-02.]
  "Use LOCATOR to find the next DEFN-SPEC (an ilisp-defn-spec instance).
Search starts at POINT, optionally BACKWARDS and POP to buffer.  Return T
if successful."
  (if lisp-find-definition-verbose-p
      (message "[doing %S.]"
	       (list 'lisp-locate-definition-in-file locator defn-spec pop)))
  ;; set this whether we succeed or not, because it will be used to generate a
  ;; message in certain failure cases.  [and, kludgily, we refer to it freely
  ;; in locator functions, which allows us to avoid patching all locators to
  ;; pass the defn-spec instead of symbol & type.  yech.  -- rgr, 7-Sep-02.]
  (setq lisp-last-definition defn-spec)
  (let* ((symbol (ilisp-defn-spec-name defn-spec))
	 (name (ilisp-defn-spec-name-string defn-spec))
	 (type (ilisp-defn-spec-type defn-spec))
	 ;; [we need this because lisp-set-up-for-search-in-new-file does
	 ;; set-buffer for us.  -- rgr, 4-Oct-02.]
	 (old-buffer (current-buffer))
	 ;; go to the right place in the file buffer (if we can).
	 (result (lisp-set-up-for-search-in-new-file
		   (ilisp-defn-spec-file defn-spec))))
    (cond ((null result)
	    nil)
	  ((progn
	     (message "Searching %s for %s %s" (buffer-file-name) type name)
	     (setq result (funcall locator symbol type t nil))
	     ;; (message "[locator returned %S.]" result)
	     result)
	    ;; found it.
	    ;; [this message would be clobbered by the "Mark set" message
	    ;; anyway.  -- rgr, 4-Oct-02.]
	    ;; (message "Found %s %s definition" type name)
	    (push-mark lisp-last-point)
	    (switch-to-buffer (current-buffer))
	    (save-excursion
	      (or (bolp)
		  (beginning-of-defun))
	      ;; reposition the start of the definition at the top of the
	      ;; screen, regardless of where point ended up.
	      ;; [if there are comments above this definition, and the window is
	      ;; already positioned to show them, then this hides the comments
	      ;; again.  we need a way of telling reposition-window-lisp never
	      ;; to hide comments.  -- rgr, 25-Mar-03.]
	      (reposition-window-lisp))
	    t)
	  (t
	    ;; not found in this buffer.  restore point in searched buffer,
	    ;; before returning to the old buffer.  [shouldn't this be in an
	    ;; unwind-protect cleanup?  -- rgr, 4-Oct-02.]
	    (goto-char lisp-last-point)
	    (set-buffer old-buffer)
	    nil))))

;;; Getting definition specifications out of the *Edit-Definitions* buffer.

(defun lisp-parse-parent-hint (line-end)
  ;; The line-end is the part after "is inside +", and may contain the name
  ;; and/or type of the parent definition.  This parses what
  ;; lisp-insert-defn-inside-defn-comment generates.
  (cond ((string-match "the definition of :?\\([^ ]+\\) +\\(.+\\)" line-end)
	  (let ((type (downcase (match-string 1 line-end)))
		(fn-spec (match-string 2 line-end)))
	    (list type (lisp-string-to-symbol fn-spec))))
	((string-match "a \\(.+\\) definition" line-end)
	  (list nil (lisp-string-to-symbol (match-string 1 line-end))))
	((string-match "some ?:\\([^ ]+\\) definition" line-end)
	  (list (downcase (match-string 1 line-end)) nil))
	((string-match "another definition" line-end)
	  (list nil nil))
	(t
	  (message "Can't parse %S as a 'parent hint.'" line-end)
	  (sit-for 1)
	  ;; return the result for "another definition", so we still turn on all
	  ;; the extra heuristics.
	  (list nil nil))))

(defun lisp-find-next-possibility (back-p)
  "Return the next source file location in *Edit-Definitions* as an
ilisp-defn-spec structure, or nil if none.  Returns the previous if
back-p is non-nil."
  ;; [bug: back-p doesn't fully work.  -- rgr, 15-Aug-02.]
  (let ((file t)
	(parent-hint nil)
	(result nil)
	(original-buffer (current-buffer)))
    ;; [can't use save-excursion because we have to update point in the
    ;; definitions buffer.  -- rgr, 6-Aug-02.]
    (if lisp-find-definition-verbose-p
	(message "[lfnp %swards in %s:]"
		 (if back-p "back" "for") original-buffer))
    (unwind-protect
	 (progn
	   (set-buffer (or (get-buffer "*Edit-Definitions*")
			   (error "Bug:  No *Edit-Definitions* buffer.")))
	   (if back-p 
	       (forward-line -1))
	   (while (not (or result
			   (if back-p (bobp) (eobp))))
	     (if back-p 
		 (forward-line -1))
	     (cond ((looking-at "\n"))
		   ((looking-at "^;+ *\\(.*\\)")
		     (cond ((not back-p)
			     (message "%s" (match-string 1))
			     (sit-for 1))))
		   ((looking-at "^!+ *\\(.*\\)")
		     (cond (back-p
			     ;; [***bug***: we don't find these right when
			     ;; working backwards.  -- rgr, 5-Sep-02.]
			     )
			   (t
			     (let ((match (match-string 1)))
			       (message "%s" match)
			       (sit-for 1)
			       ;; if there are several nested parent hints, take
			       ;; only the first, as that will be the outermost.
			       (if (null parent-hint)
				   (setq parent-hint
					 (lisp-parse-parent-hint match)))))))
		   ((looking-at "^:?\\([^ ]+\\) +\\(.+\\) in file \\(.+\\)")
		     ;; normal definition match.
		     (let ((type (downcase (match-string 1)))
			   (fn-spec (match-string 2))
			   (file (match-string 3)))
		       (setq result
			     (make-ilisp-defn-spec
			       :name (lisp-string-to-symbol fn-spec)
			       :name-string fn-spec
			       :type type :file file :parent parent-hint)))))
	     (if (not back-p)
		 (forward-line)))
	   (if back-p
	       (forward-line)))
      (set-buffer original-buffer))
    result))

(defun lisp-next-definition (&optional back pop quiet-p)
  "Go to the next definition from *Edit-Definitions*.  Movement is BACK
with prefix and POPping.  Return 'first if found first time, 'none if no
definition ever, and nil if no more definitions are found.  So the
normal result is a series of first's, followed by a nil, or a 'none if a
definition couldn't be found in source.  [The return value is
semi-historical (and may be broken).  lisp-next-definition used to
return t if another definition was found in the same file, but this is
no longer possible, as lisp-next-definition iterates over definitions
instead of files.  -- rgr, 25-Mar-03.]"
  ;; find the next possibility, which specifies a file.
  (let ((possibility (lisp-find-next-possibility back)))
    (if lisp-find-definition-verbose-p
	(message "%S returned %S." 'lisp-find-next-possibility possibility))
    (let ((result (cond ((null possibility) nil)
			((lisp-locate-definition-in-file
			   lisp-last-locator possibility
			   (prog1 pop (setq pop nil)))
			  'first)
			(t 'none))))
      ;; Generate a message in the "no more" cases; if something had been found,
      ;; then lisp-locate-definition-in-file will have issued a message to that
      ;; effect for us.
      (if (and (not quiet-p)
	       (member result '(nil none)))
	  ;; the outer save-excursion restores the current buffer; the inner one
	  ;; preserves the point in the "*Edit-Definitions*" buffer.
	  (save-excursion
	    (set-buffer "*Edit-Definitions*")
	    (save-excursion
	      (goto-char (point-min))
	      (let ((message (if (looking-at "^;+ +\\(any +\\)?\\(.+\\):")
				 (match-string 2)
				 "definitions")))
		(if (null result)
		    (message "No more %s." message)
		    (message "Can't find %s." message))))))
      (if lisp-find-definition-verbose-p
	  (message "%S returns %S." 'lisp-next-definition result))
      result)))

(defun next-definition-lisp (back &optional pop)
  "Edit the next definition from *Edit-Definitions*.
Movement is BACK with prefix and optionally POPping or call
'tags-loop-continue' if using tags."
  (interactive "P")
  (cond (lisp-using-tags
	  ;; [i don't think this tells us whether we've succeeded or not.  --
	  ;; rgr, 31-Jul-02.]
	  (tags-loop-continue)
	  'maybe)
	(lisp-search
	  (error "lisp-search is %S, but this feature is broken." lisp-search))
	(t
	  (lisp-next-definition back pop))))

;;; Putting definition specifications in the *Edit-Definitions* buffer.

(defvar lisp-edit-definitions-mode-map
	(let ((map (make-sparse-keymap)))
	  ;; [these are ok in compilation-mode-map, but don't help here.]
	  ;; (define-key map " " 'scroll-up)
	  ;; (define-key map "\^?" 'scroll-down)
	  (define-key map "\r" 'lisp-this-definition)
	  ;; This is for compatibility with ACL eli.
	  (define-key map "." 'lisp-this-definition)
	  map)
  "Mode map for *Edit-Definitions* buffers.")

(defun lisp-edit-definitions-mode ()
  "Major mode for Lisp definition buffers.
To visit the source for a given definition,
move point to the appropriate line and type \\[compile-goto-error].

Runs `lisp-edit-definitions-mode-hook' with `run-hooks' (which see)."
  (interactive)
  (kill-all-local-variables)
  (use-local-map lisp-edit-definitions-mode-map)
  (setq major-mode 'lisp-edit-definitions-mode
	mode-name "Edit Definitions")
  ;; [this would be really nice . . .  -- rgr, 12-Feb-03.]
  '(set (make-local-variable 'revert-buffer-function)
       'lisp-edit-definitions-revert-buffer)
  (run-hooks 'lisp-edit-definitions-mode-hook))

(defun lisp-this-definition ()
  (interactive)
  "Visit the source of the definition named on this line."
  (beginning-of-line)
  (lisp-next-definition))

(defun fix-source-filenames ()
  "Apply the 'ilisp-source-directory-fixup-alist' to the current buffer,
normally *Edit-Definitions*.  The aim is to change any distributed
source-file locations to point to local source file locations.

See 'ilisp-source-directory-fixup-alist'."
  ;; [now supports more than one hit per regexp per buffer.  -- rgr, 31-Jul-02.]
  (let ((alist (ilisp-value 'ilisp-source-directory-fixup-alist t)))
    (save-excursion
      (while alist
	(let* ((cons (car alist))
	       (pattern (car cons)) (replacement (cdr cons)))
	  (goto-char (point-min))
	  (while (re-search-forward pattern nil t)
	    (if (stringp replacement)
		;; [this is an enhancement with respect to the
		;; ilisp-source-directory-fixup-alist documentation string.  --
		;; rgr, 27-Aug-02.]
		(replace-match replacement t nil)
		(funcall replacement))))
	(setq alist (cdr alist))))))

(defun lisp-handle-comment-message (comment-strings)
  ;; note that we lose if any of these strings have newlines.
  (while comment-strings
    (let ((thing (car comment-strings)))
      (insert ";; "
	      (if (stringp thing) thing (format "%S" thing))
	      "\n"))
    (setq comment-strings (cdr comment-strings))))

(defun lisp-definition-spec-type-name-string (defn-spec)
  (let ((type-name (ilisp-getf (cdr defn-spec) ':type)))
    (and type-name
	 (capitalize (symbol-name type-name)))))

(defun lisp-insert-defn-inside-defn-comment (child parent &optional is-inside)
  ;; helper for lisp-handle-definition-message, below.
  (let* ((child-name (ilisp-getf (cdr child) ':name))
	 (child-type (lisp-definition-spec-type-name-string child))
	 (parent-name (ilisp-getf (cdr parent) ':name))
	 (parent-type (lisp-definition-spec-type-name-string parent))
	 (both-defined-p (and parent-name parent-type)))
    (insert (if both-defined-p ";; " "!! ")
	    (or child-type "???") (format " %S " child-name)
	    (or is-inside "is inside") " "
	    (cond (both-defined-p
		    (format "the definition of %s %S"
			    parent-type parent-name))
		  (parent-name
		    (format "a %S definition" parent-name))
		  (parent-type
		    (format "some %s definition" parent-type))
		  (t
		    "another definition."))
	    "\n")
    both-defined-p))

(defun lisp-insert-defn-files (defn-spec file-tail)
  ;; helper for lisp-handle-definition-message, below.
  (let* ((name (ilisp-getf (cdr defn-spec) ':name))
	 (type-string (lisp-definition-spec-type-name-string defn-spec))
	 (preamble (format "%s %S" type-string name)))
    (or (and name type-string)
	;; [debugging hack.  -- rgr, 4-Sep-02.]
	(error "Malformed definition message %S." defn-spec))
    (if file-tail
	(while file-tail
	  (insert preamble " in file " (car file-tail) "\n")
	  (setq file-tail (cdr file-tail)))
	(insert ";; " preamble
		" has no known source files.\n"))))

(defun lisp-handle-definition-message (defn-spec)
  ;; Helper for lisp-set-up-definitions-buffer, below.  If we find a parent
  ;; definition, then an "X inside of Y" comment is generated.  [Bug: this
  ;; currently fails if definitions are nested more than two deep.  -- rgr,
  ;; 5-Sep-02.]  Note that if the parent definition has both type and name, then
  ;; we put *that* in the buffer, since the parent will be easier to find.
  (let ((comment (ilisp-getf (cdr defn-spec) ':comment))
	(parent (ilisp-getf (cdr defn-spec) ':parent)))
    (if comment
	(lisp-handle-comment-message (cdr comment)))
    (let ((use-parent-instead-p
	    (and parent
		 (lisp-insert-defn-inside-defn-comment defn-spec parent))))
      (lisp-insert-defn-files (if use-parent-instead-p
				  parent
				  defn-spec)
			      (or (if parent
				      ;; presumably, these are more
				      ;; authoritative.
				      (ilisp-getf (cdr parent) ':files))
				  (ilisp-getf (cdr defn-spec) ':files))))))

(defun lisp-set-up-definitions-buffer (initial-message definition-specs
						       &optional buffer-name)
  "Set up the *Edit-Definitions* buffer with INITIAL-MESSAGE to edit
DEFINITION-SPECS, which must be a new-style list of :DEFINITION spec
items."
  ;; [for some odd reason, initializing lisp-last-locator is the caller's
  ;; responsibility.  -- rgr, 4-Sep-02.]
  (setq lisp-using-tags nil)
  (setq lisp-last-file nil)
  (save-excursion
    (set-buffer (get-buffer-create (or buffer-name "*Edit-Definitions*")))
    (erase-buffer)
    (lisp-edit-definitions-mode)
    (and initial-message
	 ;; [putting an extra semi on this may make it easier to identify.  --
	 ;; rgr, 4-Sep-02.]
	 (insert ";;; " initial-message "\n\n"))
    (let ((tail definition-specs))
      (while tail
	(let* ((entry (car tail))
	       (message-type (car entry)) (message-body (cdr entry)))
	  ;; canonicalize case.
	  (if (and message-type
		   (symbolp message-type))
	      (setq message-type
		    (intern (downcase (symbol-name message-type)))))
	  ;; now try to decode it.
	  (cond ((eq message-type ':comment)
		  (lisp-handle-comment-message message-body))
		((eq message-type ':definition)
		  (lisp-handle-definition-message entry))
		(t
		  (insert ";; [oops; unknown message type "
			  (format "%S" message-type)
			  "]\n"))))
	(setq tail (cdr tail))))
    (fix-source-filenames)
    (goto-char (point-min))
    (and initial-message
	 (forward-line 2))
    (set-buffer-modified-p nil)))

;;; Getting definition specifications back from the inferior Lisp.

(defvar lisp-inferior-source-definitions-cache nil
  "internal cache used by lisp-find-inferior-source-definitions, below.")

(defun lisp-parse-and-cache-source-definitions (type symbol files
						     &optional no-cache-p)
  ;; handles conversion from the old list-of-pathnames format.  helper for
  ;; lisp-find-inferior-source-definitions, below.
  (let* ((read-result (lisp-read-cl-syntax files))
	 (file-specs (car read-result)))
    (if (or (cdr read-result)
	    (stringp file-specs))
	(let ((name (car (lisp-read-cl-syntax (lisp-buffer-symbol symbol)))))
	  ;; old style file-name string(s); there may be more than one of these.
	  ;; convert to new format.
	  (setq file-specs (list (list ':definition ':name name
				       ':type (intern type)
				       ':files read-result)))))
    (or no-cache-p
	(setq lisp-inferior-source-definitions-cache
	      (cons (cons symbol type) file-specs)))
    file-specs))

(defun lisp-find-inferior-source-definitions (symbol type &optional no-cache-p)
  ;; Utility function for querying the Lisp about source information.
  ;; Returns nil for most error cases.
  (let ((symbol-name (lisp-symbol-name symbol))
	(command (ilisp-value 'ilisp-find-source-command t))
	(source nil))
    (cond ((and (not no-cache-p)
		lisp-inferior-source-definitions-cache
		(equal (car lisp-inferior-source-definitions-cache)
		       (cons symbol type)))
	    (cdr lisp-inferior-source-definitions-cache))
	  ((null command)
	    nil)
	  ((not (comint-check-proc ilisp-buffer))
	    (error "The inferior lisp in %s is no longer running."
		   ilisp-buffer))
	  ((let ((command (format command symbol-name
				  (or (lisp-symbol-package symbol)
				      (lisp-buffer-package))
				  type)))
	     ;; (message "[sending %S.]" command)
	     (setq source
		   (ilisp-send
		     command
		     (concat "Finding " type " "
			     (lisp-buffer-symbol symbol) " definitions")
		     'source)))
	    (let* ((result (lisp-last-line source))
		   (return-value (and (stringp (car result))
				      (downcase (car result))))
		   (files (cdr result))
		   (source-ok (and (not (ilisp-value 'comint-errorp t))
				   (string-equal "t" return-value))))
	      (cond ((not source-ok)
		      ;; normally, this will be an error message.
		      (message "%s" return-value)
		      (sit-for 2)
		      nil)
		    (t
		      (lisp-parse-and-cache-source-definitions type symbol
							       files))))))))

;;; The edit-definitions-lisp command and friends.

(defun lisp-make-edit-files-definitions (type name edit-files)
  ;; Compatibility.
  (let ((files-origin "lisp-directory files"))
    (if (eq edit-files t)
	(let ((buffers (buffer-list)))
	  (setq edit-files nil)
	  (setq files-origin "all Lisp buffers")
	  (save-excursion 
	    (while buffers
	      (set-buffer (car buffers)) 
	      (if (and (memq major-mode lisp-source-modes)
		       (buffer-file-name))
		  (setq edit-files (cons (buffer-file-name) edit-files)))
	      (setq buffers (cdr buffers))))
	  (setq edit-files (nreverse edit-files))))
    (if (null edit-files)
	(error "No files to edit; see the lisp-directory command."))
    (list (list ':definition ':type (intern type) ':name (intern name)
		':comment (list (format "Searching through %s to find %s %S"
					files-origin type name))
		':files edit-files))))

(defun lisp-edit-definitions-normal (symbol type &optional stay locator)
  (let* ((file-specs (lisp-find-inferior-source-definitions symbol type))
	 ;; case-fold-search is always buffer-local when set, so binding this
	 ;; here may not mean much.  -- rgr, 14-Sep-02.
	 (case-fold-search t)
	 (try-tags-p lisp-fall-back-on-find-tags)
	 (found-p nil)
	 (name (lisp-buffer-symbol symbol)))
    ;; (message "[got files %S.]" file-specs)
    (cond (file-specs
	    ;; We've gotten something useful from the inferior lisp.
	    (setq lisp-last-locator (or locator (ilisp-value 'ilisp-locator)))
	    (lisp-set-up-definitions-buffer
	      (format "%s %s definitions in %s:" type name ilisp-buffer)
	      file-specs)
	    (setq found-p (next-definition-lisp nil t))))
    (cond ((and (not found-p)
		nil	;; [disabled until fixed.  -- rgr, 17-Dec-03.]
		lisp-edit-files)
	    ;; No luck from the inferior lisp; search the available buffers.
	    ;; [note that this does not work now, since it tries to pass type
	    ;; "any" to lisp-locate-clisp, which no longer accepts this.  --
	    ;; rgr, 14-Sep-02.]
	    (setq lisp-last-locator (or locator (ilisp-value 'ilisp-locator)))
	    (lisp-set-up-definitions-buffer
	      (format "%s %s definitions in %s:" type name 'lisp-edit-files)
	      (lisp-make-edit-files-definitions type name lisp-edit-files))
	    (setq found-p (next-definition-lisp nil t))))
    ;; Now check to see if tags searching is needed/wanted.
    (cond (found-p)
	  ((and (or tags-file-name tags-table-list)
		(if (eq try-tags-p ':ask)
		    (yes-or-no-p (format "Can't find %s %s; use tags? "
					 (or type "any definitions of")
					 name))
		    try-tags-p))
	    ;; Use tags.  This will generally lose on packages.
	    (let ((symbol-name (lisp-symbol-name symbol)))
	      (setq lisp-using-tags t)
	      (if (string-match "Lucid" emacs-version)
		  (find-tag symbol-name stay)
		  (find-tag symbol-name nil stay))))
	  (t
	    (message "Can't find %s %s."
		     (or type "any definitions of")
		     name)
	    nil))))

(defun lisp-find-inferior-definition-types (symbol)
  ;; Returns a list of unique definition types (as lowercase strings) known to
  ;; the inferior Lisp for symbol.
  (let ((tail (lisp-find-inferior-source-definitions symbol "any"))
	(type nil)
	(result nil))
    (while tail
      (let ((entry (car tail)))
	(if (and (consp entry)
		 (memq (car entry) '(:DEFINITION :definition))
		 (symbolp (setq type (ilisp-getf (cdr entry) ':type))))
	    (let ((type-string (downcase (symbol-name type))))
	      (if (string-match "^:" type-string)
		  (setq type-string (substring type-string 1)))
	      (or (member type-string result)
		  (setq result (cons type-string result))))))
      (setq tail (cdr tail)))
    (sort result (function string-lessp))))

(defun lisp-ask-for-definition-to-edit (current-prefix-arg)
  ;; Used in the edit-definitions-lisp 'interactive' form.  May also ask for a
  ;; definition type as well, if not one of the continuation cases, and if the
  ;; inferior lisp knows how to find more than one such definition (e.g. a
  ;; function with the same name as a global variable).
  (let* ((numeric-arg (and current-prefix-arg
			   (prefix-numeric-value current-prefix-arg)))
	 (function (lisp-function-name)))
    (cond ((or (null numeric-arg)
	       (not (get-buffer "*Edit-Definitions*")))
	    (let* ((defn-spec
		     (let ((result (ilisp-read
				     (format "Edit Definition [%s]: "
					     (lisp-buffer-symbol function)))))
		       (if (equal result "")
			   function
			   (lisp-string-to-symbol result))))
		   (name (lisp-symbol-name defn-spec))
		   (possible-types
		     (cond ((string-match "[()]" name)
			     ;; compound definition names happen only for
			     ;; functions, so there is no point in asking.
			     ;; [***bug***: this is not true in general for
			     ;; user-defined types.  -- rgr, 15-Aug-02.]
			     ;; besides, it is not helpful to offer a choice
			     ;; between "generic-function" and "function" when
			     ;; the user gives a GF name.
			     '("function"))
			   ((not (comint-check-proc ilisp-buffer))
			     ;; oops; this probably won't do us much good . . .
			     (mapcar (function car)
				     (ilisp-value 'ilisp-source-types t)))
			   (t
			     (lisp-find-inferior-definition-types defn-spec)))))
	      (list defn-spec
		    (if (cdr possible-types)
			(ilisp-completing-read
			  "Type [any]: "
			  (cons '("any")
				(mapcar (function list) possible-types))
			  "any")
			;; [specifying "any" uses the cache.  -- rgr, 4-Sep-02.]
			;; (car possible-types)
                      (if (ilisp-value 'ilisp-find-source-command t)
                          ;; inferior lisp will tell us
                          "any"
                        (let ((types (ilisp-value 'ilisp-source-types t)))
                          (ilisp-completing-read
                           (format "Type [%s]: " (caar types))
                           types (caar types))))))))
	  ;; Non-interactive cases (reusing the last definition name).
	  ((zerop numeric-arg)
	    (list nil 'visit))
	  ((minusp numeric-arg)
	    ;; continue looking backward
	    (list nil 'back)) 
	  (t
	    ;; continue looking forward
	    (list nil nil)))))

(defun edit-definitions-lisp (definition-name
			      &optional type stay search locator)
  "Visit all definitions of DEFINITION-NAME of type TYPE.  The
DEFINITION-NAME is normally a symbol, but in Common Lisp can also be a
list like \"(SETF FOO)\" or \"(method frob (random-thing))\".  The type
defaults to \"any\", which really means to look for *all* definitions of
DEFINITION-NAME.  If specified interactively, emacs prompts for a type
only if the Lisp knows about more than one definition type \(but the
default is still \"any\"\).

   When invoked interactively with a numeric arg, \\[edit-definitions-lisp]
continues looking for the last definition specified: a positive arg
means forward, while a negative arg means backward.  Possible locations
for the last requested definition are kept in the *Edit-Definitions*
buffer; forward and backward means relative to point in this buffer, and
a zero arg means to switch to this buffer.  If you want to jump to an
arbitrary possibility, move the point just before it and do
\"\\[universal-argument] \\[edit-definitions-lisp]\".  [bug: the
keybinding is not available unless you switch back to an ilisp buffer
first.  -- rgr, 4-Sep-02.]

   If the optional STAY argument is true, put the source file in the
same window.  If SEARCH, do not look for DEFINITION-NAME in the inferior
Lisp.  The optional LOCATOR can be a function of args \(definition-name
type first-p back-p\); normally this is specified by the inferior Lisp,
which knows the syntax of its source files.

   In order to find the definition, we look for it in the following way:

   0.  If SEARCH is true, we do the equivalent of \\[tags-search] and
skip the other steps.  [This is really a distinct protocol, and perhaps
ought to be made separate.  -- rgr, 31-Jul-02.]

   1.  First we ask the inferior Lisp if it knows about the definition's
source file.  If it does, then we look for the definition in that
file(s), using ilisp's built-in definition-finding heuristics.

   2.  If the Lisp doesn't know (or we were told not to ask), and
lisp-edit-files is not nil, we search the files in lisp-edit-files,
possibly set up by the \\[lisp-directory] command, or the buffers in one
of lisp-source-modes if lisp-edit-files is T.
[Bug:  This doesn't work.  -- rgr, 17-Dec-03.]

   3.  If still not found, and at least one tag table is defined, we may
use \\[find-tag] to keep searching.  This is controlled by the
lisp-fall-back-on-find-tags variable \(q.v.), which defaults to :ask."
  (interactive (lisp-ask-for-definition-to-edit current-prefix-arg))
  (or type
      (setq type "any"))
  (and (stringp definition-name)
       (setq definition-name (lisp-string-to-symbol definition-name)))
  (cond (search 
	  ;; Search through all files listed in tags table.  [really, this is a
	  ;; different protocol; should be handled by another command.  -- rgr,
	  ;; 31-Jul-02.]
	  (let ((case-fold-search t))
	    (setq tags-loop-scan (list locator
				       (list 'quote definition-name) 
				       type t nil))
	    (setq tags-loop-operate nil)
	    (setq lisp-using-tags t)
	    (tags-loop-continue t)))
	(definition-name
	  (lisp-edit-definitions-normal definition-name type stay locator))
	((eq type 'visit)
	  (switch-to-buffer "*Edit-Definitions*"))
	(t
	  ;; continuing to edit the same thing.
	  (next-definition-lisp (eq type 'back)))))

;;;; End of new M-. code.

;; [some of the rest of this could profit from better integration with the new
;; M-. infrastructure.  in particular, search-lisp and replace-lisp use the
;; *Edit-Definitions* buffer incompatibly.  -- rgr, 25-Mar-03.]

;;;%%Utilities

(defun lisp-setup-edit-definitions (message edit-files)
  "Set up *Edit-Definitions* with MESSAGE.
If EDIT-FILES is T, insert all buffer filenames that are in one of
lisp-source-modes into the current buffer.  If it is a list of files
set up by lisp-directory, insert those in the buffer.  If it is a
string put that in the buffer."

  ;; Note
  ;; 19990804 Marco Antoniotti
  ;; Are we sure we want to set 'lisp-using-tags' to nil?
  (setq lisp-using-tags nil
	lisp-search (not (stringp edit-files)))
  (set-buffer (get-buffer-create "*Edit-Definitions*"))
  (erase-buffer)
  (insert message)
  (insert "\n\n")
  (if edit-files
      (progn
	(if (eq edit-files t)
	    (let ((buffers (buffer-list)))
	      (while buffers
		(let ((buffer (car buffers)))
		  (if (save-excursion 
			(set-buffer buffer) 
			(and (memq major-mode lisp-source-modes)
			     (buffer-file-name buffer)))
		      (progn (insert ?\") (insert (buffer-file-name buffer))
			     (insert "\"\n"))))
		(setq buffers (cdr buffers))))
	    (if (stringp edit-files)
		(progn (insert edit-files)
		       	;; Remove garbage collection messages
		       (replace-regexp "^;[^\n]*\n" "")
		       (fix-source-filenames))
		(let ((files edit-files))
		  (while files
		    (insert ?\")
		    (insert (car files))
		    (insert "\"\n")
		    (setq files (cdr files))))))
	(goto-char (point-min))
	(forward-line 2)
	(set-buffer-modified-p nil))
      (error 
       (substitute-command-keys
	"Use \\[lisp-directory] to define source files."))))
	  
;;;
(defun lisp-next-file (back)
  "Return the next filename in *Edit-Definitions*, or nil if none."
  (let ((file t) 
	result)
    (set-buffer (get-buffer-create "*Edit-Definitions*"))
    (if back 
	(progn (forward-line -1)
	       (if (looking-at "\n")
		   (progn 
		     (forward-line 1)
		     (end-of-line)
		     (setq file nil)))))
  (if file
      (progn
	(skip-chars-forward "^\"")
	(if (eobp)
	    (progn (bury-buffer (current-buffer))
		   (setq result nil))
	    (let* ((start (progn (forward-char 1) (point))))
	      (skip-chars-forward "^\"") 
	      (setq file
		    (prog1 (buffer-substring-no-properties start (point))
		      (end-of-line)))
	      (bury-buffer (current-buffer))))))
  (if (not (eq file 't)) file)))

;;;%%Searching
(defun lisp-locate-search (pattern type first back)
  "Find PATTERN in the current buffer."
  (if back
      (search-backward pattern nil t)
      (search-forward pattern nil t)))

;;;
(defun lisp-locate-regexp (regexp type first back)
  "Find REGEXP in the current buffer."
  (if back
      (re-search-backward regexp nil t)
      (re-search-forward regexp nil t)))

;;;

(defvar lisp-last-pattern nil "Last search regexp.")

(defun search-lisp (pattern regexp)
  "Search for PATTERN through the files or buffers.
Search for file in 'lisp-edit-files' if it is a list or the
current buffers in one of 'lisp-source-modes' otherwise.  If
lisp-edit-files is nil, no search will be done.  If called with a
prefix, search for regexp.  If there is a tags file, call 'tags-search'
instead."
  (interactive
   (list (read-string (if current-prefix-arg 
			  "Search for regexp: "
			  "Search for: ") lisp-last-pattern)
	 current-prefix-arg))
  (if tags-file-name
      (progn (setq lisp-using-tags t)
	     (tags-search (if regexp pattern (regexp-quote pattern))))
      (setq lisp-last-pattern pattern
	    lisp-last-definition (cons pattern t)
	    lisp-last-file nil
	    lisp-last-locator (if regexp
				  'lisp-locate-regexp
				  'lisp-locate-search))
      (lisp-setup-edit-definitions (format "Searching for %s:" pattern) 
				   lisp-edit-files)
      (next-definition-lisp nil nil)))

;;;%%Replacing
(defvar lisp-last-replace nil "Last replace regexp.")

(defun replace-lisp (old new regexp)
  "Query replace OLD by NEW through the files or the current buffers.
The query is done in 'lisp-edit-files' if it is a list and the current
buffers in one of 'lisp-source-modes' otherwise.  If 'lisp-edit-files'
is NIL, no search will be done.  If called with a prefix, replace
regexps.  If there is a tags file, then call tags-query-replace
instead."
  (interactive
   (let ((old (read-string (if current-prefix-arg
			       "Replace regexp: "
			       "Replace: ") lisp-last-pattern)))
     (list old
	   (read-string (if current-prefix-arg
			    (format "Replace regexp %s by: " old)
			    (format "Replace %s by: " old))
			lisp-last-replace)
	   current-prefix-arg)))
  (cond (tags-file-name
	 (setq lisp-using-tags t)
	 (tags-query-replace (if regexp old (regexp-quote old))
			     new))
	(t
	 (setq lisp-last-pattern old
	       lisp-last-replace new)
	 (lisp-setup-edit-definitions 
	  (format "Replacing %s by %s:\n\n" old new)
	  lisp-edit-files)
	 (let ((file nil))
	   (while (setq file (lisp-next-file nil))
	     (lisp-find-file file)
	     (let ((point (point)))
	       (goto-char (point-min))
	       (if (if regexp 
		       (re-search-forward old nil t)
		       (search-forward old nil t))
		   (progn (beginning-of-line)
			  (if regexp
			      (query-replace-regexp old new)
			      (query-replace old new)))
		   (goto-char point))))))))

;;;%%Edit-callers
(defvar lisp-callers nil 
  "T if we found callers through inferior LISP.")

;;;
(defun who-calls-lisp (function &optional no-show)
  "Put the functions that call FUNCTION into the buffer *All-Callers*.
Show the buffer *All-Callers* unless NO-SHOW is T.  Return T if successful."
  (interactive 
   (let* ((function (lisp-defun-name))
	  (symbol (lisp-buffer-symbol function)))
     (if (lisp-minus-prefix)
	 (list function)
	 (list (ilisp-read-symbol 
		(format "Who Calls [%s]: " symbol)
		function
		t t)))))
  (let* ((name (lisp-buffer-symbol function))
	 (command (ilisp-value 'ilisp-callers-command t))
	 (callers
	  (if command
	      (ilisp-send
	       (format command
		       (lisp-symbol-name function)
		       (lisp-symbol-package function))
	       (concat "Finding callers of " name)
	       'callers)))
	 (last-line (if callers (lisp-last-line callers)))
	 (case-fold-search t))
    (set-buffer (get-buffer-create "*All-Callers*"))
    (erase-buffer)
    (insert (format "All callers of function %s:\n\n" name))
    (if (and command (not (ilisp-value 'comint-errorp t)))
	(if (string-match "nil" (car last-line))
	    (error "%s has no callers" name)
	    (message "")
	    (insert (cdr last-line))
	    (goto-char (point-min))
	    ;; Remove garbage collection messages
	    (replace-regexp "^;[^\n]*\n" "")
	    (goto-char (point-min))
	    (forward-line 2)
	    (if (not no-show) 
		(if (ilisp-temp-buffer-show-function)
		    (funcall (ilisp-temp-buffer-show-function)
			     (get-buffer "*All-Callers*"))
		    (view-buffer "*All-Callers*")))
	    t)
	(insert "Using the current source files to find callers.")
	nil)))

;;;
(defun next-caller-lisp (back &optional pop)
  "Edit the next caller from *All-Callers*.
With prefix, edit the previous caller.  If it can't get caller
information from the inferior LISP, this will search using the current
source files.  See lisp-directory."

  (interactive "P")
  (if (not lisp-callers)
      (next-definition-lisp back pop)
      (set-buffer (get-buffer-create "*All-Callers*"))
      (if back (forward-line -1))
      (skip-chars-forward " \t\n")
      (if (eobp)
	  (progn
	    (bury-buffer (current-buffer))
	    (error "No more callers"))
	  (let* ((start (point))
		 (caller-function
		  (progn
		    (skip-chars-forward "^ \t\n")
		    (buffer-substring-no-properties start (point)))))
	    (bury-buffer (current-buffer))
	    (edit-definitions-lisp (lisp-string-to-symbol caller-function) 
				  (car (car (ilisp-value 'ilisp-source-types)))
				  (not pop))))))

;;;
(defun edit-callers-lisp (function)
  "Edit the callers of FUNCTION.
With a minus prefix use the symbol at the start of the current defun."
  (interactive
   (let* ((function (lisp-defun-name)))
     (if (lisp-minus-prefix)
	 (list function)
	 (list (ilisp-read-symbol 
		(format "Edit callers of [%s]: "
			(lisp-buffer-symbol function))
		function
		t)))))
  (if (save-excursion (setq lisp-callers (who-calls-lisp function t)))
      (progn 
	(setq lisp-last-locator (ilisp-value 'ilisp-calls-locator))
	(next-caller-lisp nil t))
      (edit-definitions-lisp function "calls" nil t 
			    (ilisp-value 'ilisp-calls-locator))))

;;;%Locators
(defun lisp-re (back format &rest args)
  "Search BACK if T using FORMAT applied to ARGS."
  (let ((regexp (apply 'format format args)))
    (if back
	(re-search-backward regexp nil t)
	(re-search-forward regexp nil t))))

;;;
(defun lisp-locate-ilisp (symbol type first back)
  "Find SYMBOL's TYPE definition in the current file.  Return T if successful.
A definition is of the form

    (def(?name

This is used as the default value of ilisp-locator; the specific dialect
will usually override this with something more clever."
  (lisp-re back
	   "^[ \t\n]*(def[^ \t\n]*[ \t\n]+(?%s[ \t\n(]+" 
	   (regexp-quote (lisp-symbol-name symbol))))

;;;
(defun lisp-locate-calls (symbol type first back)
  "Locate calls to SYMBOL."
  (lisp-re back "\\(#'\\|(\\|'\\)%s\\([ \t\n]+\\|)\\)"
	   (regexp-quote (lisp-buffer-symbol symbol))))


;;;%% Locators for Scheme

;;; Matthias Koeppe 
;;;
;;; The standard locators would fail on "(define (thunk) ....)"  and
;;; report "(define (procedure ...) ....)" as a call to procedure.

(defun ilisp-locate-scheme-definition (symbol type first back)
  "Find SYMBOL's TYPE definition in the current file. Return T if successful.
This is the Scheme counterpart of `lisp-locate-clisp'."
  (lisp-re back
	   "[ \t\n]*(def[^ \t\n]*[ \t\n]+(*%s\[ \t\n()]"
	   (regexp-quote (lisp-symbol-name symbol))))

(defun ilisp-locate-scheme-calls (symbol type first back)
  "Locate calls to SYMBOL.
This is the Scheme counterpart of `lisp-locate-calls'."
  (let ((call-regexp 
	 (format "[( \t\n]+%s[ \t\n()]+"
		 (regexp-quote 
		  ;; Scheme has no package prefixes, so we use
		  ;; lisp-symbol-name instead of lisp-buffer-symbol.
		  (lisp-symbol-name symbol))))
	(def-regexp "[ \t\n]*(def[^ \t\n]*[ \t\n]+(*")
	(result 'unknown))
    (while (eq result 'unknown)
      (cond 
       ((if back
	    (re-search-backward call-regexp nil t)
	  (re-search-forward call-regexp nil t))
	(if (not (save-excursion	; check whether definition
		   (goto-char (match-beginning 0))
		   (backward-sexp) (backward-char)
		   (looking-at def-regexp)))
	    (setq result t)))
       (t (setq result nil))))
    result))	    


;;; end of file -- ilisp-src.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-sym.el0000600000175000001440000000247207277332355016046 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-sym.el --
;;; ILISP Lisp symbol utils.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-sym.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $

;;; Notes:
;;;
;;; 19990804 Marco Antoniotti
;;; This should become a DEFSTRUCT
;;;
;;; (defstruct (lisp-symbol (:constructor lisp-symbol))
;;;   package
;;;   (delimiter "::")
;;;   name)

;;;%%Symbol
(defun lisp-symbol (package delimiter name)
  "Create a LISP symbol."
  (list package (when package (or delimiter "::")) name))

(defun lisp-symbol-name (symbol)
  "Return the name of SYMBOL."
  (car (cdr (cdr symbol))))

(defun lisp-symbol-package (symbol)
  "Return the package of SYMBOL."
  (car symbol))

(defun lisp-symbol-delimiter (symbol)
  "Return the qualifier of SYMBOL."
  (car (cdr symbol)))

;;;
(defun lisp-symbol= (symbol1 symbol2)
  "Return T is SYMBOL1 is equal to SYMBOL2."
  (and (string= (lisp-symbol-name symbol1) (lisp-symbol-name symbol2))
       (string= (lisp-symbol-package symbol1) (lisp-symbol-package symbol2))
       (string= (lisp-symbol-delimiter symbol1)
		(lisp-symbol-delimiter symbol2))))

;;; end of file -- ilisp-sym.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-utl.el0000600000175000001440000000757707720720324016043 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-utl.el --
;;; ILISP misc tools.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-utl.el,v 1.4 2003/08/05 02:18:13 rgrjr Exp $

(defun lisp-show-send (string)
  "Show STRING in the *ilisp-send* buffer."
  (save-excursion
    (if (ilisp-buffer)
	(set-buffer "*ilisp-send*")
	(error "You must start an inferior LISP with run-ilisp."))
    (erase-buffer)
    (insert string)
    string))


;;;
(defun lisp-slashify (string)
  "Put string in the *ilisp-send* buffer, backslashifying troublesome chars.
I.e. put backslashes before quotes and backslashes and return the resulting
string."
  ;; The quoting is now all done by prin1-to-string, since elisp and Common Lisp
  ;; string quoting syntax is identical.
  (or (stringp string)
      (error "ilisp bug: argument to %s is %s, which is not a string."
	     'lisp-slashify string))
  (let* ((string (let (;; turn off all of this non-CL-compatible escaping.
		       (print-escape-multibyte nil)
		       (print-escape-newlines nil)
		       (print-escape-nonascii nil))
		   (prin1-to-string string)))
	 ;; strip off surrounding quotes.
	 (result (substring string 1 (1- (length string)))))
    (lisp-show-send result)	;; for side effect.
    result))

;;;%%String
(defun lisp-prefix-p (s1 s2)
  "Returns t if S1 is a prefix of S2.
It considers all non alphanumerics as word delimiters."
  (let ((len1 (length s1)))
    (and (<= len1 (length s2))
	 (let ((start 0)
	       (start2 0) 
	       end
	       (match t))
	   (while
	       (if (setq end (string-match "[^a-zA-Z0-9]" s1 start))
		   ;; Found delimiter
		   (if (string= (substring s1 start end)
			(substring s2 start2 (+ start2 (- end start))))
		       ;; Words are the same
		       (progn (setq start (match-end 0))
			      (if (string-match
				   (regexp-quote (substring s1 end start))
				   s2 start2)
				  (setq start2 (match-end 0)) ;OK
				(setq match nil))) ;Can't find delimiter
		     (setq match nil))	;Words don't match 
		 nil))			;Ran out of delimiters in s1
	   (and match
		(string= (substring s1 start len1)
		 (substring s2 start2 (+ start2 (- len1 start)))))))))


;;;
(defun lisp-last-line (string)
  "Return the last line of STRING with everything else."
  (let* ((position 0))
    (while (string-match "\\(\n+\\)[^\n]" string position)
      (setq position (match-end 1)))
    (cons (substring string position)
	  (substring string 0 position))))


;;;%%File
;;;
(defun lisp-file-extension (file extension)
  "Return FILE with new EXTENSION."
  (concat (substring file 0 (string-match ".[^.]*$" file))
	  "." extension))

(defun ilisp-directory (file &optional dirs)
  "Return the directory of DIRS that FILE is found in.
By default 'load-path' is used for the directories."
  (let* ((dirs (or dirs (cons "" load-path)))
	 (dir (car dirs)))
    (while (and dir (not (file-exists-p (expand-file-name file dir))))
      (setq dirs (cdr dirs)
	    dir (car dirs)))
    dir))


;;; ilisp-update-status --
;;;
;;; Notes:
;;;
;;; 19970412 Marco Antoniotti
;;; Changed in order to propagate the status change in the
;;; underlying process to the menu.
;;;
;;; 19990806 Martin Atzmueller
;;; Added test for FEATUREP ILISP-EASY-MENU.

(defun ilisp-update-status (status)
  "Update process STATUS of the whole ILISP system.
It updates the STATUS of the current buffer and let all lisp mode
buffers know as well.  Also, do some 'exterior' things like make sure
that the menubar is in a consistent state."
  (setq ilisp-status (if lisp-show-status (format " :%s" status)))
  (when (and (not (member +ilisp-emacs-version-id+
			  '(xemacs lucid-19 lucid-19-new)))
	     (not (featurep 'ilisp-easy-menu)))
    (ilisp-update-menu status))
  (comint-update-status status))

;;; end of file -- ilisp-utl.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-val.el0000600000175000001440000000167007277332355016017 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-val.el --
;;; ILISP buffer value interface
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-val.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $

(defun ilisp-value (variable &optional no-error-p)
  "Return the value of VARIABLE in the ILISP buffer.
If NO-ERROR-P is NIL, then an error will be signalled if VARIABLE is nil."
  (save-excursion
    (set-buffer (ilisp-buffer))
    (let ((value (eval variable)))
      (if value
	  value
	  (if no-error-p
	      nil
	      (error "%s is not defined." variable))))))


(defun set-ilisp-value (variable value)
  "Set the value of VARIABLE in the ILISP buffer."
  (save-excursion
    (set-buffer (ilisp-buffer))
    (set variable value)))

;;; end of file -- ilisp-val.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-xfr.el0000600000175000001440000001136007473252006016021 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp-xfr.el --
;;; ILISP transfer commands Lisp <-> Emacs.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-xfr.el,v 1.3 2002/05/23 20:41:42 marcoxa Exp $

(require 'cl)

;;; return-ilisp --
;;; It's too bad that this function copies so much code from comint-send-input.
;;; It ought to be a wrapper around it, instead.

(defun return-ilisp ()
  "Grab the current expression with comint-get-old-input.
If we have a complete sexp, send it.  Otherwise, indent appropriately."
  (interactive)
  (let ((proc (get-buffer-process (current-buffer))))
    (if (not proc)
	(error "Current buffer has no process")
	(let* ((pmark (process-mark proc))
	       (input (ilisp-get-old-input)))
	  (if input
	      (progn 
		(if (>= (point) pmark)
		    (goto-char (point-max))
		    (goto-char pmark)
		    (insert input))
		(if (not ilisp-no-newline) (insert ?\n))
		(if (and (funcall comint-input-filter input)
			 (or (ring-empty-p (ilisp-get-input-ring))
			     (not (string= (ring-ref (ilisp-get-input-ring) 0)
					   input))))
		    (ilisp-ring-insert (ilisp-get-input-ring) input))
		(funcall comint-input-sentinel input)
		;; Ugh, comint changing under my feet....
		;; Note: This used to be
		;;        (eq ilisp-emacs-version-id 'gnu-19)
		;;       25/11/94 Marco Antoniotti
		(when (or (eq +ilisp-emacs-version-id+ 'fsf-19)
			  (eq +ilisp-emacs-version-id+ 'fsf-20)
			  (eq +ilisp-emacs-version-id+ 'fsf-21))
		  (setq comint-input-ring-index nil))
		;; Nuke symbol table
		(setq ilisp-original nil)
		(funcall comint-input-sender proc input)
		(set-marker (process-mark proc) (point))
		(set-marker comint-last-input-end (point))
		(goto-char (point-max)))
	      (if (= pmark (point-max))
		  (let ((comint-send-newline t))
		    (when (not ilisp-no-newline) (insert ?\n))
		    (set-marker (process-mark proc) (point))
		    (funcall comint-input-sender proc ""))
		  (insert ?\n)
		  (save-restriction
		    (narrow-to-region pmark (point-max))
		    (funcall indent-line-function))))))))

;;;%%Keyboard mode
(defun raw-keys-ilisp ()
  "Start using raw keyboard mode to characters to the inferior LISP.
Each character typed is sent to the inferior LISP until a key bound to
interactive-keys-ilisp is encountered.  See also io-bridge-ilisp."
  (interactive)
  (when (not ilisp-raw-map)
    (let ((map (make-keymap)))
      (fillarray map 'ilisp-send-char)
      (when (string-match "Lucid" emacs-version)
	;; not necessary, but friendlier.
	(setq ilisp-completion-map (make-keymap))
	;; (set-keymap-name ilisp-completion-map 'ilisp-completion-map)
	;; (set-keymap-parent ilisp-completion-map lisp-mode-map)
	)
      (define-key map "\C-g" 'interactive-keys-ilisp)
      (setq ilisp-raw-map map)))
  (use-local-map ilisp-raw-map)
  (message ilisp-raw-message))

;;;
(defun interactive-keys-ilisp ()
  "Go back to interactive keyboard interactions in the inferior LISP."
  (interactive)
  (use-local-map ilisp-use-map)
  (message "Interactive keyboard mode"))

;;;
(defun ilisp-send-char ()
  "Send the last typed character to the current inferior LISP.
If 'ilisp-raw-echo' is T then echo it."
  (interactive)
  (when (ilisp-value 'ilisp-raw-echo t)
    (goto-char (point-max))
    (insert last-input-char)
    (set-marker (process-mark (ilisp-process)) (point))
    (set-marker comint-last-input-end (point)))
  (process-send-string (ilisp-process) 
		       (make-string 1 last-input-char))
  (message ilisp-raw-message))

;;;
(defun ilisp-raw-handler (process output)
  "Turn on raw keyboard mode."
  (raw-keys-ilisp))

(defun ilisp-interactive-handler (process output)
  "Turn on interactive keyboard mode."
  (interactive-keys-ilisp))

;;;
(defun io-bridge-ilisp ()
  "Make it possible for the inferior LISP to turn on EMACS raw mode.
When this function is called, the inferior LISP can turn on EMACS raw mode by
sending ^[1^], and turn it off by sending ^[0^]."
  (interactive)
  (require 'bridge)
  (install-bridge)
  (setq bridge-handlers (cons '("1" . ilisp-raw-handler)
			      (cons '("0" . ilisp-interactive-handler)
				    bridge-handlers))))

;;;%%Debugger interface
(defun delete-char-or-pop-ilisp (arg &optional killflag)
  "Delete ARG characters, or pop break level if at end of buffer.  
Optional second arg KILLFLAG non-nil means kill instead (save in kill ring).
Interactively, ARG is the prefix arg, and KILLFLAG is set if
ARG was explicitly specified."
  (interactive "p")
  (cond ((eobp)
	 (message "Pop LISP one level")
	 (comint-simple-send (ilisp-process) (ilisp-value 'comint-fix-error)))
	(t (call-interactively 'delete-char (list arg killflag)))))

;; end of file -- ilisp-xfr.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp-xls.el0000600000175000001440000000153107277332355016037 0ustar  mvelausers;;; -*-Mode: Emacs-Lisp-*-

;;; ilisp-xls.el --
;;; ILISP Xlisp and Xlisp-Stat dialect definition
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-xls.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $

;;; Thanks to John Walker for supplying this file.


(defdialect xlisp "Xlisp" ilisp
  (setq ilisp-load-command "(load \"%s\")"
        ilisp-last-command "*")
  )

(if (not xlisp-program) (setq xlisp-program "xlisp"))

;;;%%Xlisp-Stat

(defdialect xlispstat "Xlisp-Stat" xlisp
  (setq ilisp-binary-extension "fsl"
	;; ilisp-describe-command "(help %s)"))
	))

(if (not xlispstat-program) (setq xlispstat-program "xlispstat"))

;;; endo of file -- ilisp-xls.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp.el0000600000175000001440000001474610020674035015227 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilisp.el --
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp.el,v 1.10 2003/12/13 23:43:44 rgrjr Exp $     

;;; Author: Chris McConnell 
;;; Maintainer: The Net 
;;; Created: 14 Jun 1994

;;; Keywords: lisp common-lisp scheme comint

;;; This file may become part of GNU Emacs in the near future.

;;; GNU Emacs is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY.  No author or distributor
;;; accepts responsibility to anyone for the consequences of using it
;;; or for whether it serves any particular purpose or works at all,
;;; unless he says so in writing.  Refer to the GNU Emacs General Public
;;; License for full details.

;;; Everyone is granted permission to copy, modify and redistribute
;;; GNU Emacs, but only under the conditions described in the
;;; GNU Emacs General Public License.   A copy of this license is
;;; supposed to have been given to you along with GNU Emacs so you
;;; can know your rights and responsibilities.  It should be in a
;;; file named COPYING.  Among other things, the copyright notice
;;; and this notice must be preserved on all copies.

;;; *****************************************************************
;;; Please read the texinfo file (via m-x info in emacs or tex it and
;;; print it out) for installation instructions.
;;; *****************************************************************

;;; This file defines a generic LISP interface that can be customized
;;; to match a specific LISP dialect.  Support is already provided for
;;; a number of common LISP dialects.  Lucid, Allegro and CMU are
;;; fully supported.  Other LISP dialects are missing features like
;;; arglist and find-source.

;;; Since this is built on top of the general command-interpreter-in-
;;; a-buffer mode (comint mode), it shares a common base
;;; functionality, and a common set of bindings, with all modes
;;; derived from comint mode.  This makes it easier to use.

;;; For documentation on the functionality provided by comint mode,
;;; and the hooks available for customizing it, see the file
;;; comint.el.

;;; Throughout this file you will find comment lines with %'s on them.
;;; These lines define sections for outline mode which I use while
;;; programming to temporarily hide code.

;;; See the documentation for ILISP mode, or read texinfo document for
;;; information.  All of the EMACS function names begin or end with
;;; lisp or ilisp to separate ilisp functions from functions in other
;;; packages.  Functions that work only in lisp buffers or that work
;;; in both lisp buffers and inferior lisp buffers use lisp, all other
;;; functions use ilisp.  If a function is intended to be used
;;; interactively, then the lisp or ilisp comes at the end of the
;;; function name, otherwise at the start.

(require 'cl)

;;;%Requirements
(if (string-match "\\`18" emacs-version)
    (load "comint-v18") ; Included older version of comint.
  (require 'comint))


;;; Trying to be compatible with all *Emacs versions.
(load "ilcompat")

(load "comint-ipc")

;; This is optional -- used only by io-bridge-ilisp
(unless (or (eq +ilisp-emacs-version-id+ 'fsf-21)
	    (eq +ilisp-emacs-version-id+ 'fsf-20)
	    (and (eq +ilisp-emacs-version-id+ 'fsf-19)
		 (>= +ilisp-emacs-minor-version-number+ 29)))
  (load "bridge"))


;;; Load the ILISP provided hyperspec if needed.

(unless (featurep 'hyperspec)
  (load-library "extra/hyperspec"))

(unless (featurep 'cltl2)
  (load-library "extra/cltl2"))

;; Load the ilisp mouse interface.  The user may have already loaded this, so we
;; use the require/provide protocol to avoid reloading it.  -- rgr, 9-Apr-03.
(require 'ilisp-mouse)

;;; 19990806 Martin Atzmueller
;;; Added support for ILISP EASY-MENU. Muts be loaded *before* the
;;; rest of ILISP.

;; not integrated yet!
;; (load "custom-ilisp")

(load "ilisp-def")

(load "ilisp-sym")
(load "ilisp-inp")
(load "ilisp-ind")

(load "ilisp-prc")
(load "ilisp-val")
(load "ilisp-out")
(load "ilisp-mov")
(load "ilisp-key")
(load "ilisp-prn")
(load "ilisp-low")
(load "ilisp-doc")
(load "ilisp-ext")			; Some emacs-lisp
					; bindings. Lisp char syntax.
(load "ilisp-mod")
(load "ilisp-dia")
(load "ilisp-cmt")
(load "ilisp-rng")
(load "ilisp-hnd")
(load "ilisp-utl")
(load "ilisp-cmp")
(load "ilisp-kil")
(load "ilisp-snd")
(load "ilisp-xfr")
(load "ilisp-hi")
(load "ilisp-aut")

;; Dialects.
;; The user will define their autoloads to load "ilisp" when trying
;; to run their dialect.  This will load all of the dialects in.
(load "ilisp-cl")
(load "ilisp-cmu")
(load "ilisp-sbcl")
(load "ilisp-chs")
(load "ilisp-acl")
(load "ilisp-hlw")
(load "ilisp-kcl")
(load "ilisp-luc")
(load "ilisp-sch")
(load "ilisp-openmcl")
(load "ilisp-ccl")

;;; Create the keymaps before running the hooks.
;;; This is necessary if you want the lispm bindings in the load
;;; hook. Otherwise you need to put it AFTER the running of the hooks

;;; (if (not ilisp-mode-map) (ilisp-bindings))


;;; Now run the hooks.

(run-hooks 'ilisp-site-hook)
;;; (run-hooks 'load-hook)
(run-hooks 'ilisp-load-hook)		; It seem s more reasonable.

(unless ilisp-mode-map (ilisp-bindings))

;;; Optional:

;;; Old version menu using XEmacs DEF-MENU.
;;; (load "ilisp-menu")
;;;
;;; 19990818 Marco Antoniotti

;;; Load the simple keymap based "Lisp" menu if the easy-menus are not
;;; yet loaded.
;;;
;;; 19990818 Marco Antoniotti

(message "Loading menu interface.")
(message "'ilisp-*enable-cl-easy-meny-p*' is %s"
	 ilisp-*enable-cl-easy-menu-p*)

(unless (and (member +ilisp-emacs-version-id+
		     '(xemacs lucid-19 lucid-19-new fsf-20 fsf-21))
	     (or ilisp-*enable-cl-easy-menu-p*
		 ilisp-*enable-scheme-easy-menu-p*))
  (load "ilisp-mnb"))

(when (and (member +ilisp-emacs-version-id+
		   '(xemacs lucid-19 lucid-19-new fsf-20 fsf-21))
	   ilisp-*enable-cl-easy-menu-p*)
  (load "ilisp-cl-easy-menu"))

(when (and (member +ilisp-emacs-version-id+
		   '(xemacs lucid-19 lucid-19-new fsf-20 fsf-21))
	   ilisp-*enable-scheme-easy-menu-p*)
  (load "ilisp-scheme-easy-menu"))


;;; ILD Support by J. M. Siskind 
;;;
;;; 19990818 Marco Antoniotti

(when ilisp-*enable-ild-support-p*
  (load "ild"))
 
;;; IMENU Support
;;;
;;; 2000-03-04 Martin Atzmueller

(when ilisp-*enable-imenu-p*
  (when (ignore-errors (require 'imenu))
    (load "ilisp-imenu")))

(provide 'ilisp)

;;; end of file -- ilisp.el --
ilisp-5.12.0+cvs.2004.12.26/ilisp.emacs0000600000175000001440000001520510020674035015706 0ustar  mvelausers;;;  -*- Mode: Emacs-Lisp -*-

;;; ilisp.emacs --
;;; This file shows examples of some of the things you might want to
;;; do to install or customize ILISP.  You may not want to include all
;;; of them in your .emacs.  For example, the default key binding
;;; prefix for ILISP is C-z and this file changes the default prefix
;;; to C-c. For more information on things that can be changed, see
;;; the file ilisp.el.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp.emacs,v 1.8 2003/11/24 22:25:49 bill_clementson Exp $


;;; If ilisp lives in some non-standard directory, you must tell
;;; Emacs where to get it. This may or may not be necessary.

(setq load-path (cons (expand-file-name "~jones/emacs/ilisp/")
                      load-path))


;;; If you always want partial minibuffer completion

(require 'completer)

;;; Uncomment the following lines if you want TMC completion (see
;;; completion.el among the Emacs ELisp sources).

; (load "completion")
; (initialize-completions)


;;; If you want to redefine typeout-window keys.

; (add-hook 'ilisp-load-hook
;   '(lambda ()
;      (define-key global-map "\C-c1" 'ilisp-bury-output)
;      (define-key global-map "\C-cv" 'ilisp-scroll-output)
;      (define-key global-map "\C-cg" 'ilisp-grow-output)))


;;; Autoload based on your Lisp. You only really need the one you
;;; use. If called with a prefix, you will be prompted for a
;;; buffer and program.

(autoload 'run-ilisp   "ilisp" "Select a new inferior Lisp." t)

(autoload 'common-lisp "ilisp" "Inferior generic Common Lisp." t)

;; Franz
(autoload 'allegro     "ilisp" "Inferior Allegro Common Lisp." t)

;; Corman
(autoload 'cormanlisp  "ilisp" "Inferior Corman Common Lisp." t)

;; Lucid
; (autoload 'lucid     "ilisp" "Inferior Lucid Common Lisp." t)

;; Harlequin
; (autoload lispworks  "ilisp"
;   "Inferior Harlequin Common Lisp (LispWorks)." t)
; (autoload harlequin  "ilisp"
;   "Inferior Harlequin Common Lisp (LispWorks)." t)
; (autoload pulcinella "ilisp"
;   "Inferior Harlequin Common Lisp (LispWorks)." t)
;; Italian "Commedia dell'Arte" twist.

;; CMUCL
(autoload 'cmulisp     "ilisp" "Inferior CMU Common Lisp." t)

;; CLISP (Bruno Haible and Michael Stoll)
(autoload 'clisp-hs   "ilisp"
  "Inferior Haible/Stoll CLISP Common Lisp." t)

;; KCL dialects
; (autoload 'kcl       "ilisp"
;   "Inferior Kyoto Common Lisp." t)
; (autoload 'akcl      "ilisp"
;   "Inferior Austin Kyoto Common Lisp." t)
; (autoload 'ibcl "ilisp"
;   "Ibuki Common Lisp." t)
; (autoload 'gcl "ilisp"
;   "Inferior GNU Common Lisp." t)
; (autoload 'ecl "ilisp"
;   "Inferior EcoLisp." t)

;; XLisp
; (autoload 'xlisp      "ilisp" "Inferior XLisp." t)
; (autoload 'xlispstat  "ilisp" "Inferior XLisp-Stat." t)

;; Scheme
; (autoload 'scheme     "ilisp" "Inferior generic Scheme." t)
; (autoload 'oaklisp    "ilisp" "Inferior Oaklisp Scheme." t)
; (autoload 'scm        "ilisp" "Inferior SCM Scheme." t)
; (autoload 'chez       "ilisp" "Inferior Chez Scheme." t)
; (autoload 'stk        "ilisp" "Inferior STk Scheme." t)
; (autoload 'snow       "ilisp" "Inferior STk Scheme without Tk." t)
; (autoload 'guile      "ilisp" "Inferior GUILE Scheme." t)


;;; Define where Lisp programs are found. (This may already have
;;; been done at your site).

(setq allegro-program "/usr/local/acl5/lisp")

; (setq lucid-program "/usr/misc/.lucid/bin/lisp")

(setq clisp-hs-program "clisp -I")

;(setq *cormanlisp-dir* "C:\\CORMAN~1\\CORMAN~1.5\\")
;(setq cormanlisp-program
;      (concat *cormanlisp-dir* "clconsole.exe" 
;	       " -image " *cormanlisp-dir* "CormanLisp.img"))

; (setq lispworks-program
;       "/somewhere/in/the/directory/tree/lispworks")

(setq cmulisp-program
      "/usr/local/lib/cmucl/bin/lisp")

;; If you are interested in maintaining CMUCL or compiling it
;; from source then set this to where the source files are.
; (setq cmulisp-local-source-directory
;       "/usr/robotics/shared/cmu-cl/17e/")

; (setq akcl-program "kcl")
; (setq gcl-program "gcl")
; (setq ecl-program "ecl")

; (setq xlisp-program "xlisp")
; (setq xlispstat-program "xlispstat")

; (setq scm-program "scm -i")
; (setq chez-program "petite")
; (setq stk-program "stk -interactive")
; (setq snow-program "snow -interactive")
; (setq guile-program "guile")


;;; This makes reading a Lisp or Scheme file load in ILISP.

(set-default 'auto-mode-alist
	     (append '(("\\.lisp$" . lisp-mode)
                       ("\\.lsp$" . lisp-mode)
                       ("\\.cl$" . lisp-mode))
                     auto-mode-alist))

(add-hook 'lisp-mode-hook '(lambda () (require 'ilisp)))

(set-default 'auto-mode-alist
             (append '(("\\.scm$" . scheme-mode)
                       ("\\.ss$" . scheme-mode)
                       ("\\.stk$" . scheme-mode)
                       ("\\.stklos$" . scheme-mode))
                     auto-mode-alist))

(add-hook 'scheme-mode-hook '(lambda () (require 'ilisp)))


;;; Configuration of Erik Naggum's HyperSpec access package.

;; If you have a local copy of the HyperSpec, set its path here.
; (setq common-lisp-hyperspec-root
;       "file:/home/joe/HyperSpec/")
; (setq common-lisp-hyperspec-symbol-table
;       "/home/joe/HyperSpec/Data/Map_Sym.txt")

;; Here's how to get the newest version of the CLHS:
;; 



;;; Configuration of Utz-Uwe Haus' CLtL2 access package.

;; If you have a local copy of CLtL2, set its path here.
; (setq cltl2-root-url
;       "file:/home/joe/cltl2/")


;;; Sample load hook

(add-hook 'ilisp-load-hook
          '(lambda ()
             ;; Change default key prefix to C-c
             (setq ilisp-*prefix* "\C-c")

             ;; Set a keybinding for the COMMON-LISP-HYPERSPEC command
             (defkey-ilisp "" 'common-lisp-hyperspec)

             ;; Make sure that you don't keep popping up the 'inferior
             ;; Lisp' buffer window when this is already visible in
             ;; another frame. Actually this variable has more impact
             ;; than that. Watch out.
             ; (setq pop-up-frames t)

             (message "Running ilisp-load-hook")
             ;; Define LispMachine-like key bindings, too.
             ; (ilisp-lispm-bindings) Sample initialization hook.

             ;; Set the inferior Lisp directory to the directory of
             ;; the buffer that spawned it on the first prompt.
             (add-hook 'ilisp-init-hook
                       '(lambda ()
                          (default-directory-lisp ilisp-last-buffer)))
             ))


;;; end of file -- ilisp.emacs --
ilisp-5.12.0+cvs.2004.12.26/illuc19.el0000600000175000001440000000341707277332355015402 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; illuc19.el --
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: illuc19.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $


;;;============================================================================
;;; Functions

(defun ilisp-get-input-ring ()
  "Use instead of get-input-ring coming-input-ring or input-ring."
  (if (eq +ilisp-emacs-version-id+ 'lucid-19)
      (get-input-ring)
      ;; else lucid-19-new
      comint-input-ring))


(defun ilisp-ring-insert (ring input)
  (if (eq +ilisp-emacs-version-id+ 'lucid-19)
      (ring-insert-new ring input)
      (ring-insert ring input)))


(defun ilisp-temp-buffer-show-function-symbol ()
  'temp-buffer-show-function)


(defun set-ilisp-temp-buffer-show-function (val)
  (setq temp-buffer-show-function val))


(defun ilisp-temp-buffer-show-function ()
  temp-buffer-show-function)


(defun ilisp-input-ring-index ()
  (if (eq +ilisp-emacs-version-id+ 'lucid-19-new)
      comint-input-ring-index
      input-ring-index))


(defun set-ilisp-input-ring-index (n)
  (if (eq +ilisp-emacs-version-id+ 'lucid-19-new)
      (setq comint-input-ring-index n)
      (setq input-ring-index n)))


(defun ilisp-input-ring-size ()
  (if (eq +ilisp-emacs-version-id+ 'lucid-19-new)
      comint-input-ring-size
      input-ring-size))


(defun set-ilisp-input-ring-size (n)
  (if (eq +ilisp-emacs-version-id+ 'lucid-19-new)
      (setq comint-input-ring-size n)
      (setq input-ring-size n)))


;;============================================================================
;;; Epilogue

(provide 'il-luc19)

;;; end of file -- il-luc19.el --

ilisp-5.12.0+cvs.2004.12.26/ilxemacs.el0000600000175000001440000000411507556227574015727 0ustar  mvelausers;;; -*- Mode: Emacs-Lisp -*-

;;; ilxemacs.el --
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilxemacs.el,v 1.2 2001/05/12 22:10:53 marcoxa Exp $

;;;============================================================================
;;; Variables

;;; XEmacs 19.14 doesn't have comint-input-chunk-size but earlier
;;; versions do, so we define here if needed. (toy@rtp.ericsson.se)

(if (not (boundp 'comint-input-chunk-size))
    (setq comint-input-chunk-size 512))



;;;============================================================================
;;; Functions

(defun ilisp-get-input-ring ()
  "Use instead of get-input-ring coming-input-ring or input-ring."
  (if (eq +ilisp-emacs-version-id+ 'lucid-19)
      (get-input-ring)
      ;; else lucid-19-new
      comint-input-ring))


(defun ilisp-ring-insert (ring input)
  (if (eq +ilisp-emacs-version-id+ 'lucid-19)
      (ring-insert-new ring input)
      (ring-insert ring input)))


(defun ilisp-temp-buffer-show-function-symbol ()
  'temp-buffer-show-function)


(defun set-ilisp-temp-buffer-show-function (val)
  (setq temp-buffer-show-function val))


(defun ilisp-temp-buffer-show-function ()
  temp-buffer-show-function)


(defun ilisp-input-ring-index ()
  (if (eq +ilisp-emacs-version-id+ 'lucid-19-new)
      comint-input-ring-index
      input-ring-index))


(defun set-ilisp-input-ring-index (n)
  (if (eq +ilisp-emacs-version-id+ 'lucid-19-new)
      (setq comint-input-ring-index n)
      (setq input-ring-index n)))


(defun ilisp-input-ring-size ()
  (if (eq +ilisp-emacs-version-id+ 'lucid-19-new)
      comint-input-ring-size
      input-ring-size))


(defun set-ilisp-input-ring-size (n)
  (if (eq +ilisp-emacs-version-id+ 'lucid-19-new)
      (setq comint-input-ring-size n)
      (setq input-ring-size n)))


;;============================================================================
;;; Epilogue

(provide 'il-luc19)

;;; end of file -- ilxemacs.el --

ilisp-5.12.0+cvs.2004.12.26/lispworks.lisp0000600000175000001440000001265407700404325016513 0ustar  mvelausers;;; -*- Mode: Lisp -*-

;;; lispworks.lisp --
;;; LispWorks ILISP initializations.
;;;
;;; Independently written by:
;;;
;;; Jason Trenouth: jason@harlequin.co.uk
;;; Qiegang Long: qlong@cs.umass.edu
;;;
;;; and later merged together by Jason.
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: lispworks.lisp,v 1.10 2003/06/28 02:10:16 rgrjr Exp $

(in-package :ilisp)

;; Make LispWorks interactive
#+Unix
(setf system::*force-top-level* t)


;;; ilisp-eval --
;;;
;;; Notes:
;;;
;;; 19990806 Unknown Author (blame Marco Antoniotti for this)

(defun ilisp-eval (form package filename)
  "Evaluate FORM in PACKAGE recording FILENAME as the source file."
  (let ((*package* (ilisp-find-package package))
 	#+LispWorks3 (compiler::*input-pathname* (merge-pathnames filename))
 	#+LispWorks3 (compiler::*warn-on-non-top-level-defun* nil)
 	)
    #+LispWorks3
    (eval (read-from-string form))
    #+LispWorks4
    (dspec:at-location ((or (probe-file filename) (merge-pathnames filename)))
		       (eval (read-from-string form)))))
 
 
;;; ilisp-trace --
;;;
;;; Notes:
;;;
;;; 19990806 Unknown Author (blame Marco Antoniotti for this)

(defun ilisp-trace (symbol package breakp)
  "Trace SYMBOL in PACKAGE."
  (declare (ignorable breakp))
  (ilisp-errors
   (let ((real-symbol (ilisp-find-symbol symbol package)))
     (when real-symbol (eval `(trace (,real-symbol :break ,breakp)))))))

 
(defun ilisp-callers (symbol package)
  "Print a list of all of the functions that call FUNCTION.
Returns T if successful."
  (ilisp-errors
      (let ((function-name (ilisp-find-symbol symbol package))
	    (*print-level* nil)
	    (*print-length* nil)
	    (*package* (find-package 'lisp))
	    (callers ())
	    )
	(when (and function-name (fboundp function-name))
	  (setf callers (munge-who-calls
			 #+(or :lispworks3 :lispworks4) (hcl:who-calls function-name)
			 #-(or :lispworks3 :lispworks4) (lw:who-calls function-name)
			 ))
	  (dolist (caller callers)
	    (print caller))
	  t))))



;; LispWorks returns, at least, 3 different forms from hcl:who-calls

;; gross hack to munge who-calls output for ILISP
(defun munge-who-calls (who-calls)
  (labels ((top-level-caller (form)
	     (cond ((atom form) form)
		   ;; For method form
		   ((eq (first form) 'method) (second form))
		   ;; For subfunction form
		   (t (top-level-caller (third form))))))
    (delete-if-not 'symbolp
		   (delete-duplicates (mapcar #'top-level-caller who-calls)))))


;; Jason 6 SEP 94 -- tabularized Qiegang's code
;;
;; There are some problems lurking here:
;;   - the mapping ought to be done by LispWorks
;;   - surely you really want just three source types:
;;     function, type, and variable
;;

;; Use dspec:*dspec-classes*
;; LispWorks4.2
(defconstant *ilisp->lispworks-type-mappings*
  '(
    ;; ("class" SQL:DEF-VIEW-CLASS CL:DEFCLASS) ; KMR not all Lispworks has SQL package
    ("class" CL:DEFCLASS)
    ("macro" CL:DEFMACRO)
    ("setf"  CL:FUNCTION)))

(defun ilisp->lispworks-types (type)
  (if (string-equal type "any")
      dspec:*dspec-classes*
      (let ((mapping (assoc type *ilisp->lispworks-type-mappings* :test 'string-equal)))
	(if mapping
	    (cdr mapping)
	    (list (ilisp-find-symbol type "CL"))))))

;; Use dspec:find-name-locations and system:underlying-setf-name
(defun ilisp-source-files (symbol package type)
  "Print each file for PACKAGE:SYMBOL's TYPE definition on a line.
Returns T if successful."
  ;; A function to limit the search with type?
  (ilisp-errors
   (let ((symbol (ilisp-find-symbol symbol package))
	 (processed-pathnames ())
	 (types (ilisp->lispworks-types type)))
     (flet ((process-symbol (symbol)
	      (loop for (ignore pathname) in (dspec:find-name-locations types symbol)
		    when (and (pathnamep pathname)
			      (not (member pathname processed-pathnames :test #'equal)))
		    do (print (namestring (truename pathname)))
		    (push pathname processed-pathnames))))
       (process-symbol symbol)

       ;; Process setf
       (when (or (string-equal type "any")
		 (string-equal type "setf"))
	 (process-symbol (system:underlying-setf-name (list 'setf symbol)))))
     (if processed-pathnames
	 t
	 nil))))

;;; sys::get-top-loop-handler, sys::define-top-loop-handler --
;;;
;;; Notes:
;;;
;;; 19990806 Unknown Author (blame Marco Antoniotti for this)
;;;
;;; 19990806 Marco Antoniotti
;;; I decided to leave these in, although they are a little too system
;;; dependent.  I will remove them if people complain.

(eval-when (:compile-toplevel :load-toplevel :execute)
  (unless (fboundp 'sys::define-top-loop-handler)

    ;; Duplicated from ccl/top-loop.lisp
    (defmacro sys::get-top-loop-handler (command-name)
      `(get ,command-name 'sys::top-loop-handler))

    (defmacro sys::define-top-loop-handler (name &body body)
      (lw:with-unique-names (top-loop-handler)
        `(let ((,top-loop-handler #'(lambda (sys::line) ,@body)))
          (mapc #'(lambda (name)
                    (setf (sys::get-top-loop-handler name) ,top-loop-handler))
           (if (consp ',name) ',name  '(,name))))))))

(sys::define-top-loop-handler :ilisp-send
  (values (multiple-value-list (eval (cadr sys::line))) nil))


(eval-when (load eval)
  (unless (compiled-function-p #'ilisp-callers)
    (ilisp-message t "File is not compiled, use M-x ilisp-compile-inits")))

;;; end of file -- lispworks.lisp --
ilisp-5.12.0+cvs.2004.12.26/lucid.lisp0000600000175000001440000000433007450041060015541 0ustar  mvelausers;;; -*- Mode: Lisp -*-

;;; lucid.lisp --
;;; Lucid initializations 
;;; Author: Chris McConnell, ccm@cs.cmu.edu
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: lucid.lisp,v 1.3 2002/03/26 09:41:04 anisotropy9 Exp $

(in-package :ilisp)

;;;
(defun ilisp-callers (symbol package &aux (list-of-callers nil))
  "Print the callers of PACKAGE::SYMBOL.  Only compiled functions
currently.  Return T if successful."
  (ilisp-errors
   (let ((function-name (ilisp-find-symbol symbol package))
	 (*print-level* nil)
	 (*print-length* nil)
	 (*package* (find-package 'lisp)))
     (when (and function-name (fboundp function-name))
       (flet
	   ((check-symbol (symbol)
	      (labels
		  ((check-function (function &optional exclusions)
		     (do ((i 4 (1+ i)))
			 ((>= i (lucid::procedure-length function)))
		       (let ((element (sys:procedure-ref function i)))
			 (cond ((eq element function-name)
				(pushnew symbol list-of-callers))
			       ((and (compiled-function-p element)
				     (not (find element exclusions)))
				(check-function
				 element
				 (cons element exclusions))))))))
		(check-function (symbol-function symbol)))))
	 (do-all-symbols (symbol)
	   (when (fboundp symbol)
	     (check-symbol symbol)))
	 (dolist (caller list-of-callers)
	   (print caller))
	 t)))))

;;;
(defun ilisp-source-files (symbol package type)
  "Print each file for PACKAGE:SYMBOL's TYPE definition on a line and
return T if successful."
  (ilisp-errors
   (let* ((symbol (ilisp-find-symbol symbol package))
	  (all (equal type "any"))
	  (type (unless all (ilisp-find-symbol type package)))
	  (paths (when symbol
		   (lucid::get-source-file symbol type all))))
     (if paths
	 (progn
	   (if all
	       (dolist (file (remove-duplicates paths
						:key #'cdr :test #'equal))
		 (print (namestring (cdr file))))
	       (print (namestring paths)))
	   t)
	 nil))))

;;;
(dolist (symbol '(ilisp-callers ilisp-source-files))
  (export symbol))
(unless (compiled-function-p #'ilisp-callers)
  (format t "\"ILISP: File is not compiled, use M-x ilisp-compile-inits\""))
ilisp-5.12.0+cvs.2004.12.26/mzscheme-ilisp.scm0000600000175000001440000000173207277332355017231 0ustar  mvelausers;;;; mzscheme-ilisp.scm --- ILISP support functions for MzScheme
;;;; Matthias Koeppe  
;;;
;;; Copyright (C) 2000 Matthias Koeppe
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: mzscheme-ilisp.scm,v 1.2 2001/05/12 22:10:53 marcoxa Exp $

(define (ilisp-matching-symbols string package function? external? prefix?)
  (let loop ((syms (make-global-value-list))
	     (result '()))
    (if (null? syms)
	result
	(let ((sym-str (symbol->string (caar syms))))
	  (if (and (>= (string-length sym-str) (string-length string))
		   (string=? (substring sym-str 0 (string-length string))
			     string))
	      (loop (cdr syms)
		    (cons (list (symbol->string (caar syms))) result))
	      (loop (cdr syms) result))))))

;;; end of file -- mzscheme-ilisp.scm --
ilisp-5.12.0+cvs.2004.12.26/openmcl.lisp0000600000175000001440000000425407531601217016111 0ustar  mvelausers;;; -*- Mode: Lisp -*-

;;; openmcl.lisp --

;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.


(in-package :ilisp)


;;;%% arglist/source-file utils.

(eval-when (:compile-toplevel :load-toplevel :execute)
  (export '(arglist source-file openmcl-trace)))


;;;%% arglist - return arglist of function

(defun arglist (symbol package)
  (ilisp-errors
   (let* ((package-name (if (packagep package)
			    (package-name package)
			    package))
	  (x (ilisp-find-symbol symbol package-name)))
     (ccl::arglist x))))


;;; source-file symbol package type --

    
(defun source-file (name package type)
  (ilisp-errors
   (flet ((print-source (path) (when path (print (namestring (truename path))) t)))
     (setq type (intern (string-upcase (string type)) "CL"))
     (let* ((symbol (ilisp-find-symbol name package))
	    (source-info (ccl::%source-files symbol)))
       (when source-info
	 (if (atom source-info)
	   (when (eq type 'function)
	     (print-source source-info))
	   (let* ((info (or (cdr (assoc type source-info))
			    (and (eq type 'function)
				 (mapcar #'cdr
					  (cdr (assoc 'ccl::method source-info)))))))
	     (when info
	       (if (atom info)
		 (print-source info)
		 (dolist (p info t)
		   (print-source p)))))))))))

(defun ilisp-callers (symbol package)
  (ilisp-errors
   (let* ((function-name (ilisp-find-symbol symbol package))
	  (callers (ccl::callers function-name)))
     (when callers
       (dolist (caller callers t) (print caller))))))



(defun openmcl-trace (symbol package breakp)
  "Trace SYMBOL in PACKAGE."
  (ilisp-errors
   (let ((real-symbol (ilisp-find-symbol symbol package)))
     (setq breakp (read-from-string breakp))
     (when real-symbol (eval `(trace (,real-symbol
				      :before ,(if breakp :break))))))))


;;; Some versions of OpenMCL don't define INSPECT.  The FTYPE declamation
;;; below will keep the compiler from generating UNDEFINED-FUNCTION warnings
;;; when it sees calls to INSPECT.

(declaim (ftype (function (t) t) inspect))

;;; end of file -- openmcl.lisp --
ilisp-5.12.0+cvs.2004.12.26/pictures/0000700000175000001440000000000010162721672015414 5ustar  mvelausersilisp-5.12.0+cvs.2004.12.26/pictures/ilisp-icon.bmp0000600000175000001440000002514607077345241020201 0ustar  mvelausersBMf*6(<<0*ÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏοÏνÏμÎλÎκÎιÎ͸ÎÍ·ÎͶÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÏÆÏÏÅÏÏÄÏÏÃÏÏÁÏÎÀÏοÏξÏνÏμÎλÎκÎ͸ÎÍ·ÎͶÎ͵ÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÏÇÏÏÆÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏοÏξÏνÏλÎκÎιÎ͸ÎÍ·ÎͶÎ͵ÎÍ´ÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱ˜”ƒLJAÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏξÏνÏμÎλÎκÎιÎ͸ÎÍ·Î͵ÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱ31,ÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÁÏÎÀÏοÏξÏνÏμÎλÎκÎ͸ÎÍ·ÎͶÎ͵ÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÐÉÐÏÈÐÏÇÏÏÆÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏοÏξÏνÏλÎκÎιÎ͸ÎÍ·ÎͶÎ͵ÎÍ´ÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱLJA²®™ÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÐÊÐÐÉÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏξÏνÏμÎλÎκÎιÎ͸ÎÍ·Î͵ÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱ²®™˜”ƒ˜”ƒËƯÎͱÎͱÎͱÎͱfcX˜”ƒÎͱ²®™˜”ƒ²®™ÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÐÊÐÐÉÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÂÏÏÁÏÎÀÏοÏξ|mLJALJA˜”ƒÎ͸ÎÍ·LJALJALJAÎͳÎͲ²®™LJALJA|mÎͱÎͱÎͱ²®™31,²®™ÎͱÎͱ˜”ƒfcXLJA31,ËÆ¯ÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏο|mLJAÎιÎ͸31,ÎͳÎÍ²ËÆ¯LJAÎͱÎÍ±ËÆ¯˜”ƒÎͱ²®™ËƯÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÐÌÐÐËÐÐÊÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏο˜”ƒ31,ÎκÎιLJA˜”ƒÎͳÎͲÎͱÎͱfcX|m˜”ƒfcXËÆ¯ÎͱLJA˜”ƒ31,31,ÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÐÍÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÅÏÏÄÏÏÂÏÏÁÏÎÀËÆ¯ÎλÎι|m˜”ƒÎÍ´Îͳ31,ÎͱÎͱLJA˜”ƒÎͱÎͱÎͱ31,˜”ƒÎͱ31,åßÅåßÅåßŘ”ƒÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀËÆ¯Îκ˜”ƒLJAÎ͵ÎͳLJA˜”ƒÎͱ²®™˜”ƒ˜”ƒËƯÎͱÎͱÎͱLJALJAÎͱLJALJAåßÅåßÅåßŲ®™31,ÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁLJA˜”ƒÎλÎκLJAÎ͵ÎÍ´˜”ƒ˜”ƒÎͱÎͱÎͱÎͱÎͱÎͱÎͱ|mfcXÎͱfcX˜”ƒåßÅåßÅåßÅåßÅÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÐÏÐÐÎÐÐÍÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÅÏÏÄÏÏÂÏÏÁLJA|mÏμÎλÎͶÎ͵˜”ƒLJAÎͱÎͱÎͱÎͱ²®™LJAËÆ¯Îͱ˜”ƒfcXåßÅåßÅåßÅåßÅLJA˜”ƒÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÆÏÏÅÏÏÄÏÏÃÏϘ”ƒLJAÏμÏλLJAËÆ¯ÎͶÎÍ´31,ÎͱÎͱÎͱ˜”ƒ31,²®™ÎͱÎÍ±ËÆ¯LJAåßÅåßÅåßÅåßÅ|m˜”ƒÎͱÎͱÎͱÎͱÎͱÎͱÎͱÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÉÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏØ”ƒ31,ÏνÏμLJA˜”ƒÎͶÎ͵ÎͱÎÍ±ËÆ¯fcX²®™ÎͱÎͱÎͱÎͱÎͱåßÅåßÅåßÅåßŘ”ƒ|mÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÐÐÐÐÐÏÐÐÎÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÅÏÏÃÏÏÂÏξÏν˜”ƒ|mÎÍ·ÎͶLJAËÆ¯Îͱ˜”ƒËƯåßÅåßŲ®™˜”ƒ˜”ƒÎͱÎͱ31,|måßÅåßÅåßÅ|m˜”ƒÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÆÏÏÅÏÏÄÏÏò®™Ïν˜”ƒLJAÎ͸ÎÍ·LJA˜”ƒÎÍ±ËÆ¯31,åßÅåßÅåßÅLJA²®™ÎͱLJAËÆ¯åßÅåßÅ31,˜”ƒÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÉÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄLJA˜”ƒÏξÏν31,ÎιÎÍ·˜”ƒ|mÎͲÎͱ31,˜”ƒåßÅËÆ¯ËƯÎͱ|m˜”ƒfcX²®™ÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÅLJAfcXÏοÏξÎιÎ͸²®™LJAÎͳÎÍ±ËÆ¯31,ÎͱÎͱ˜”ƒ31,ÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÆÏÏŘ”ƒLJAÏÎÀÏοLJAËÆ¯ÎιÎ͸31,ÎͳÎͲÎÍ±ËÆ¯31,31,ËÆ¯ÎͱÎͱÎͱ31,˜”ƒËƯÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐÊÐÐÉÐÏÈÐÏÇÐÏÆ²®™ÏÎÀÏοfcX˜”ƒÎκÎ͸ÎÍ·ÎͶÎ͵ÎÍ´ÎͳÎͲÎͱÎÍ±ËÆ¯˜”ƒ˜”ƒËƯÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱ˜”ƒ˜”ƒÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÁÏÎÀ˜”ƒfcXÎκÎι²®™˜”ƒ˜”ƒËƯÎÍ´ÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÇÐÏÆ²®™ÏÏÁ²®™LJAÎλÎκfcX˜”ƒÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐÊÐÐÉÐÏÈÐÏÇLJA˜”ƒÏÏÁÏÎÀÏμÎλ˜”ƒfcXÎ͵ÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈ|mLJALJA˜”ƒÏÏÂÏÏÁLJALJALJAÏνÏÎ»ËÆ¯LJALJA|mÎͶÎ͵ÎÍ´ÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏξÏνÏμÎλÎκÎιÎ͸ÎÍ·Î͵ÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÂÏÏÁÏÎÀÏοÏξÏνÏμÎλÎιÎ͸ÎÍ·ÎͶÎ͵ÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏοÏξÏμÏλÎκÎιÎ͸ÎÍ·ÎͶÎ͵ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏοÏξÏνÏμÎλÎκÎιÎ͸ÎͶÎ͵ÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÅÏÏÄÏÏÂÏÏÁÏÎÀÏοÏξÏνÏμÎλÎιÎ͸ÎÍ·ÎͶÎ͵ÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏοÏξÏμÏλÎκÎιÎ͸ÎÍ·ÎͶÎ͵ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏοÏξÏνÏμÎλÎκÎιÎ͸ÎͶÎ͵ÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÅÏÏÄÏÏÂÏÏÁÏÎÀÏοÏξÏνÏμÎλÎιÎ͸ÎÍ·ÎͶÎ͵ÎÍ´Îͳ˜”ƒ˜”ƒ˜”ƒËƯÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱ²®™LJALJAËÆ¯ÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏοÏνÏμÏλÎκÎιÎ͸ÎÍ·ÎͶÎÍ´ÎͳfcX31,ÎͱÎͱÎͱÎͱÎͱÎͱÎͱ|mËÆ¯ÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÉÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÎÀÏοÏξÏνÏμÎλÎκÎιÎÍ·ÎͶÎ͵ÎÍ´ËÆ¯²®™ÎͱÎͱÎͱÎͱÎÍ±ËÆ¯31,ÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÅÏÏÃÏÏÂÏÏÁÏÎÀÏοÏξÏνÏμÎκÎιÎ͸ÎÍ·ÎͶÎ͵ÎÍ´fcX31,ÎͱÎͱÎͱÎͱÎͱ|mËÆ¯ËƯ31,ÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏοÏνÏμÏλÎκÎιÎ͸ÎÍ·ÎͶÎÍ´ËÆ¯²®™ÎͱÎͱÎͱÎͱ31,²®™ÎͱÎͱ²®™˜”ƒÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÉÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÎÀÏοÏξÏνÏμÎλÎκÎιÎÍ·ÎͶÎ͵ÎÍ´fcX31,ÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱ˜”ƒËƯÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÅÏÏÃÏÏÂÏÏÁÏÎÀÏοÏξÏνÏμÎκÎιÎ͸ÎÍ·ÎͶÎÍµËÆ¯²®™ÎͱÎͱ˜”ƒfcXÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏοÏνÏμÎλÎκÎιÎ͸ÎÍ·ÎͶÎÍ´fcX31,ÎͱÎͱ|m˜”ƒÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐÊÐÐÉÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÁÏÎÀÏοÏξÏνÏμÎλÎκÎ͸ÎÍ·ÎͶÎÍµËÆ¯²®™ÎͱLJAÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏοÏξÏνÏλÎκÎιÎ͸ÎÍ·ÎͶÎ͵fcX31,Îͱ31,31,ÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏξÏνÏμÎλÎκÎιÎ͸ÎÍ·ÎÍµËÆ¯²®™LJAÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐÊÐÐÉÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÁÏÎÀÏοÏξÏνÏμÎλÎκÎ͸ÎÍ·ÎͶÎ͵fcX31,˜”ƒÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏοÏξÏνÏλÎκÎιÎ͸ÎÍ·ÎÍ¶ËÆ¯ËƯÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏξÏνÏμÎλÎκÎιÎ͸ÎÍ·Î͵fcXÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÂÏÏÁÏÎÀÏοÏξÏνÏμÎλÎιÎ͸ÎÍ·ÎͶÎ͵LJAÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏοÏξÏμÏλÎκÎιÎ͸ÎÍ·ÎͶ|m|mÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏοÏξÏνÏμÎλÎκÎιÎ͸ÎͶ˜”ƒ²®™ÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÅÏÏÄÏÏÂÏÏÁÏÎÀÏοÏξÏνÏμÎλÎιÎ͸ÎÍ·|mÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏο˜”ƒLJAÏλÎκÎιÎ͸31,LJAÎ͵ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏο²®™ÏμÎλÎÎºËÆ¯|mÎ͵ÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÅÏÏÄÏÏÂÏÏÁÏÎÀÏοfcXÏÎ¼ËÆ¯ËƯÎͶÎ͵ÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀfcX31,Î͸ÎÍ·ÎͶÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÉÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÎÀËÆ¯ËƯÎιÎÍ·ÎͶÎ͵ÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÅÏÏÃÏÏÂÏÏÁÏÎÀÏο˜”ƒ˜”ƒÏμÎκÎιÎ͸ÎÍ·ÎͶÎ͵ÎÍ´ÎͳÎͱÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÏÁÏÎÀÏοÏνÏμÏλÎκÎιÎ͸ÎÍ·ÎͶÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÉÐÏÈÐÏÇÐÏÆÏÏÅÏÏÄÏÏÃÏÏÂÏÎÀÏοÏξÏνÏμÎλÎκÎιÎÍ·ÎͶÎ͵ÎÍ´ÎͳÎͲÎͱÎͱÎͱÎͱÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÐÐÏÐÐÎÐÐÌÐÐËÐÐÊÐÐÉÐÏÈÐÏÇÏÏÆÏÏÅÏÏÃÏÏÂÏÏÁÏÎÀÏοÏξÏνÏμÎκÎιÎ͸ÎÍ·ÎͶÎ͵ÎÍ´ÎͳÎͱÎͱÎͱÎͱilisp-5.12.0+cvs.2004.12.26/pictures/ilisp-icon.ppm0000600000175000001440000002515007077345237020217 0ustar  mvelausersP6
# CREATOR: XV Version 3.10a  Rev: 12/29/94
60 60
255
ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÅÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎϼÎϺÎιÎθÍηÍζÍεÍδÍγÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÉÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÀÎÏ¿ÎϾÎϽÎϼÎÏ»ÎκÎιÎηÍζÍεÍδÍγÍβÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϽÎϼÎÏ»ÎϺÎιÎθÍηÍζÍδÍγÍβÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÅÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿Îσ”˜ƒ”˜¼ÎϺÎιÎθÍηÍζÍεÍδÍγÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÉÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÀÎϯÆË¯ÆË¹ÎηÍζÍεÍδÍγÍβÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏXcf,13¸ÍηÍζÍδÍγÍβÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÅÏÏÄÏÏÂÏÏÁÏÏÀÎÏ¿ÎÏXcf¼ÎϯÆË¯ÆË¶ÍεÍδÍγÍβÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏ¿ÎÏ™®²¼ÎÏ»ÎκÎίÆËm|µÍδÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿Îσ”˜AJL»ÎϺÎιÎθÍÎ,13AJLµÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÅÏÏÄÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎϼÎÏ»ÎιÎθÍηÍÎm|´ÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏ¿ÎϾÎϽÎϼÎÏ»ÎκÎιÎθÍζÍ΃”˜™®²²ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϼÎÏ»ÎϺÎιÎθÍηÍζÍÎm|m|±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎϼÎÏ»ÎιÎθÍηÍζÍεÍÎAJL±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎϾÎϽÎϼÎÏ»ÎκÎιÎθÍηÍεÍÎXcf±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎÏ»ÎϺÎιÎθÍηÍζÍίÆË¯ÆË±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎϼÎÏ»ÎκÎθÍηÍζÍεÍÎXcf,13ƒ”˜±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎϾÎϽÎϼÎÏ»ÎκÎιÎθÍηÍεÍίÆË™®²AJL±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎÏ»ÎϺÎιÎθÍηÍζÍεÍÎXcf,13±ÍÎ,13,13±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎϼÎÏ»ÎκÎθÍηÍζÍεÍίÆË™®²±ÍÎAJL±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϽÎϼÎÏ»ÎκÎιÎθÍηÍζÍδÍÎXcf,13±ÍαÍÎm|ƒ”˜±ÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÅÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎϼÎϺÎιÎθÍηÍζÍεÍίÆË™®²±ÍαÍ΃”˜Xcf±ÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÉÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÀÎÏ¿ÎϾÎϽÎϼÎÏ»ÎκÎιÎηÍζÍεÍδÍÎXcf,13±ÍαÍαÍαÍαÍαÍαÍαÍ΃”˜¯ÆË±ÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϽÎϼÎÏ»ÎϺÎιÎθÍηÍζÍδÍίÆË™®²±ÍαÍαÍαÍÎ,13™®²±ÍαÍΙ®²ƒ”˜±ÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÅÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎϼÎϺÎιÎθÍηÍζÍεÍδÍÎXcf,13±ÍαÍαÍαÍαÍÎm|¯ÆË¯ÆË,13±ÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÉÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÀÎÏ¿ÎϾÎϽÎϼÎÏ»ÎκÎιÎηÍζÍεÍδÍίÆË™®²±ÍαÍαÍαÍαÍίÆË,13±ÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϽÎϼÎÏ»ÎϺÎιÎθÍηÍζÍδÍγÍÎXcf,13±ÍαÍαÍαÍαÍαÍαÍÎm|¯ÆË±ÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÅÏÏÄÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎϼÎÏ»ÎιÎθÍηÍζÍεÍδÍγÍ΃”˜ƒ”˜ƒ”˜¯ÆË±ÍαÍαÍαÍαÍαÍαÍαÍΙ®²AJLAJL¯ÆË±ÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏ¿ÎϾÎϽÎϼÎÏ»ÎκÎιÎθÍζÍεÍδÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϼÎÏ»ÎϺÎιÎθÍηÍζÍεÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÅÏÏÄÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎϼÎÏ»ÎιÎθÍηÍζÍεÍδÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏ¿ÎϾÎϽÎϼÎÏ»ÎκÎιÎθÍζÍεÍδÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϼÎÏ»ÎϺÎιÎθÍηÍζÍεÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎϼÎÏ»ÎιÎθÍηÍζÍεÍδÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎϾÎϽÎϼÎÏ»ÎκÎιÎθÍηÍεÍδÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐm|AJLAJLƒ”˜ÂÏÏÁÏÏAJLAJLAJL½ÎÏ»ÎϯÆËAJLAJLm|¶ÍεÍδÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐÊÐÐÉÐÐÈÏÐÇÏÐAJLƒ”˜ÁÏÏÀÎϼÎÏ»Î΃”˜XcfµÍδÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÇÏÐÆÏЙ®²ÁÏÏ™®²AJL»ÎκÎÎXcfƒ”˜´ÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÁÏÏÀÎσ”˜XcfºÎιÎΙ®²ƒ”˜ƒ”˜¯ÆË´ÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏЙ®²ÀÎÏ¿ÎÏXcfƒ”˜ºÎθÍηÍζÍεÍδÍγÍβÍαÍαÍίÆËƒ”˜ƒ”˜¯ÆË±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍ΃”˜ƒ”˜±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÑÑÑÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÆÏÐÅÏσ”˜AJLÀÎÏ¿ÎÏAJL¯ÆË¹ÎθÍÎ,13³ÍβÍαÍίÆË,13,13¯ÆË±ÍαÍαÍÎ,13ƒ”˜¯ÆË±ÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÅÏÏAJLXcf¿ÎϾÎϹÎθÍΙ®²AJL³ÍαÍίÆË,13±ÍαÍ΃”˜,13±ÍαÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÉÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏAJLƒ”˜¾ÎϽÎÏ,13¹ÎηÍ΃”˜m|²ÍαÍÎ,13ƒ”˜Åß坯˯ÆË±ÍÎm|ƒ”˜Xcf™®²±ÍαÍαÍαÍαÍαÍαÍÎÑÑÑÑÑÑÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÆÏÐÅÏÏÄÏÏÃÏÏ™®²½Îσ”˜AJL¸ÍηÍÎAJLƒ”˜±ÍίÆË,13ÅßåÅßåÅßåAJL™®²±ÍÎAJL¯ÆËÅßåÅßå,13ƒ”˜±ÍαÍαÍαÍαÍαÍαÍÎÑÑÑÐÐÐÏÐÐÎÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÅÏÏÃÏÏÂÏϾÎϽÎσ”˜m|·ÍζÍÎAJL¯ÆË±Í΃”˜¯ÆËÅßåÅßå™®²ƒ”˜ƒ”˜±ÍαÍÎ,13m|ÅßåÅßåÅßåm|ƒ”˜±ÍαÍαÍαÍαÍαÍαÍÎÐÐÐÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÉÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏσ”˜,13½ÎϼÎÏAJLƒ”˜¶ÍεÍαÍαÍίÆËXcf™®²±ÍαÍαÍαÍαÍÎÅßåÅßåÅßåÅß僔˜m|±ÍαÍαÍαÍαÍαÍαÍÎÏÐÐÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏσ”˜AJL¼ÎÏ»ÎÏAJL¯ÆË¶ÍδÍÎ,13±ÍαÍαÍ΃”˜,13™®²±ÍαÍίÆËAJLÅßåÅßåÅßåÅßåm|ƒ”˜±ÍαÍαÍαÍαÍαÍαÍÎÏÐÐÎÐÐÍÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÅÏÏÄÏÏÂÏÏÁÏÏAJLm|¼ÎÏ»ÎζÍεÍ΃”˜AJL±ÍαÍαÍαÍΙ®²AJL¯ÆË±Í΃”˜XcfÅßåÅßåÅßåÅßåAJLƒ”˜±ÍαÍαÍαÍαÍαÍαÍÎÎÐÐÍÐÐÌÐÐËÐÐÊÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏAJLƒ”˜»ÎκÎÎAJLµÍδÍ΃”˜ƒ”˜±ÍαÍαÍαÍαÍαÍαÍÎm|Xcf±ÍÎXcfƒ”˜ÅßåÅßåÅßåÅßå±ÍαÍαÍαÍαÍαÍαÍαÍÎÍÐÐÌÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎϯÆËºÎ΃”˜AJLµÍγÍÎAJLƒ”˜±ÍΙ®²ƒ”˜ƒ”˜¯ÆË±ÍαÍαÍÎAJLAJL±ÍÎAJLAJLÅßåÅßåÅßå™®²,13±ÍαÍαÍαÍαÍαÍαÍαÍÎÍÐÐËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÆÏÏÅÏÏÄÏÏÂÏÏÁÏÏÀÎϯÆË»ÎιÎÎm|ƒ”˜´ÍγÍÎ,13±ÍαÍÎAJLƒ”˜±ÍαÍαÍÎ,13ƒ”˜±ÍÎ,13ÅßåÅßåÅß僔˜±ÍαÍαÍαÍαÍαÍαÍαÍÎÌÐÐËÐÐÊÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏ¿Îσ”˜,13ºÎιÎÎAJLƒ”˜³ÍβÍαÍαÍÎXcfm|ƒ”˜Xcf¯ÆË±ÍÎAJLƒ”˜,13,13±ÍαÍαÍαÍαÍαÍαÍαÍαÍÎËÐÐÊÐÐÉÐÐÈÏÐÇÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎÏm|AJL¹ÎθÍÎ,13³ÍβÍίÆËAJL±ÍαÍίÆËƒ”˜±ÍΙ®²¯ÆË±ÍαÍαÍαÍαÍαÍαÍαÍαÍÎÊÐÐÉÐÐÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎÏm|AJLAJLƒ”˜¸ÍηÍÎAJLAJLAJL³ÍβÍΙ®²AJLAJLm|±ÍαÍαÍΙ®²,13™®²±ÍαÍ΃”˜XcfAJL,13¯ÆË±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÊÐÐÉÐÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎϾÎϽÎϼÎÏ»ÎκÎιÎθÍηÍεÍδÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍΙ®²ƒ”˜ƒ”˜¯ÆË±ÍαÍαÍαÍÎXcfƒ”˜±ÍΙ®²ƒ”˜™®²±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÉÐÐÈÏÐÇÏÐÆÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎÏ»ÎϺÎιÎθÍηÍζÍεÍδÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎAJL™®²±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÈÏÐÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎϼÎÏ»ÎκÎθÍηÍζÍεÍδÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÇÏÐÆÏÐÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎϾÎϽÎϼÎÏ»ÎκÎιÎθÍηÍεÍδÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎ,13±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÇÏÐÆÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎÏ»ÎϺÎιÎθÍηÍζÍεÍδÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍ΃”˜AJL±ÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÆÏÐÅÏÏÄÏÏÃÏÏÁÏÏÀÎÏ¿ÎϾÎϽÎϼÎÏ»ÎκÎθÍηÍζÍεÍδÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎÅÏÏÄÏÏÃÏÏÂÏÏÁÏÏÀÎÏ¿ÎϽÎϼÎÏ»ÎκÎιÎθÍηÍζÍδÍγÍβÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍαÍÎilisp-5.12.0+cvs.2004.12.26/sbcl.lisp0000600000175000001440000001573110020674035015374 0ustar  mvelausers;;; -*- Mode: Lisp -*-

;;; sbcl.lisp --
;;;
;;; This init file was last tested with SBCL 0.6.13 and
;;; SBCL 0.7pre.71

;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: sbcl.lisp,v 1.11 2003/12/28 22:50:56 rgrjr Exp $


(in-package :ilisp)

(ignore-errors (require :sb-introspect))

;; ILISP-specifics for SBCL. Since version 0.7 introduced lots of changes,
;; e.g.(bytecode-)interpreter goes away, and lots of other 'renaming'-changes,
;; take care of that, by testing via the 'magic'-macros:
;; THE-SYMBOL-IF-DEFINED, and THE-FUNCTION-IF-DEFINED.
;;
;; MNA: 2001-10-20
;; Some annotations:
;; <1> - interpreter related changes (interpreter missing in sbcl-0.7.x)
;; <2> - byte-compiler related changes (sbcl-0.7.x)
;; <3> - renamings in sbcl-0.7.x., where in general this is accounted for
;;       using THE-SYMBOL-IF-DEFINED and THE-FUNCTION-IF-DEFINED macros.
;;       In general, the "new" symbol comes before the "old" symbol.

;;;% CMU CL does not define defun as a macro
(defun ilisp-compile (form package filename)
  "Compile FORM in PACKAGE recording FILENAME as the source file."
  (ilisp-errors
   (ilisp-eval
    (format nil "(funcall (compile nil '(lambda () ~A)))" form)
    package filename)))

;;;% Stream settings, when running connected to pipes.
;;;
;;; When SBCL is running as a piped process, it still manages to open
;;; /dev/tty to use it for the *terminal-io* stream.  This means that an
;;; error will cause lisp to stop and wait for input from /dev/tty, which is
;;; probably not available and certainly not what you were expecting.
;;;
;;; We want it to use the same input that the user is typing at, ie,
;;; the pipe (stdin).

(defvar *Fix-pipe-streams* T
  "Set to Nil if you want them left alone.  And tell me you don't get stuck.")

(when (and *Fix-pipe-streams*
	   (sb-impl::synonym-stream-p *terminal-io*)
	   (eq (sb-impl::synonym-stream-symbol *terminal-io*)
	       'sb-impl::*tty*))
  (setf *terminal-io* (make-two-way-stream sb-impl::*stdin* sb-impl::*stdout*))
  ;; *query-io* and *debug-io* are synonym streams to this, so this fixes
  ;; everything.
  )

;;; Normally, errors which occur while in the debugger are just ignored, unless
;;; the user issues the "flush" command, which toggles this behavior.

(setq sb-debug:*flush-debug-errors* nil)  ; allow multiple error levels.

;;; 2000-04-02: Martin Atzmueller
;;; better (more bulletproof) arglist code adapted from cmulisp.lisp:

(defun massage-arglist (args)
  (typecase args
    (string args)
    (cons (let ((*print-pretty* t)
		(*print-escape* t)
		(*print-base* 10)
		(*print-radix* nil))
	    (format nil "~A" args)))
    (null "()")
    (t "")))

(defun arglist (symbol-name package)
  (ilisp-errors
   (let* ((package-name (if (packagep package)
                            (package-name package)
                          package))
	  (symbol (ilisp-find-symbol symbol-name package-name)))
     (flet ()
       (multiple-value-bind (func kind)
	   (extract-function-info-from-name symbol)
	 (if (and func kind)
             ;; Instruments of darkness
             (macrolet ((madness ()
                          (let ((function-arglist-sym
                                 (maybe-function '#:function-arglist '#:sb-introspect)))
                            (if function-arglist-sym
                                `(massage-arglist
                                  (,function-arglist-sym func))
                              `(case (the-function-if-defined
                                      ((#:widetag-of :sb-impl)
                                       (#:get-type :sb-impl))
                                      func)
                                (,(symbol-value
				   (the-symbol-if-defined
				    ((#:simple-fun-header-widetag :sb-vm)
				     (#:function-header-type :sb-vm))))
                                 (massage-arglist
                                  (the-function-if-defined
                                   ((#:%simple-fun-arglist :sb-impl)
                                    (#:%function-arglist :sb-impl))
                                   func)))
				((,(symbol-value
				    (the-symbol-if-defined
				     ((#:closure-header-widetag :sb-vm)
				      (#:closure-header-type :sb-vm))))
                                  ,(symbol-value
                                    (the-symbol-if-defined
                                     ((#:closure-fun-header-widetag :sb-vm)
                                      (#:closure-function-header-type :sb-vm)))))
                                 (massage-arglist
                                  (the-function-if-defined
                                   ((#:%simple-fun-arglist :sb-impl)
                                    (#:%function-arglist :sb-impl))
                                   (the-function-if-defined
				    ((#:%closure-fun :sb-impl) ())
				    func))))
                                (,(symbol-value
                                   (the-symbol-if-defined
                                    ((#:funcallable-instance-header-widetag :sb-vm)
                                     (#:funcallable-instance-header-type :sb-vm))))
                                 (typecase func
                                   (,(the-symbol-if-defined
                                      ((#:byte-function :sb-kernel) ()))
                                    "Byte compiled function or macro, no arglist available.")
                                   (,(the-symbol-if-defined
                                      ((#:byte-closure :sb-kernel) ()))
                                    "Byte compiled closure, no arglist available.")
                                   ((or generic-function sb-pcl::generic-function)
                                    (sb-pcl::generic-function-pretty-arglist func))
                                   (,(the-symbol-if-defined
                                      ((#:interpreted-function :sb-eval) ()))
                                    (the-function-if-defined
                                     ((#:interpreted-function-arglist :sb-eval) ()
                                      :function-binding-p t)
                                     (massage-arglist (funcall the-function func))))
                                   (t (print 99 *trace-output*)
                                      "No arglist available.")))
                                (t "No arglist available."))))))
               (madness))               ; 
           "Unknown function - no arglist available." ; For the time
					; being I just
					; return this
					; value. Maybe
					; an error would
					; be better.
           ))))))

(defun sbcl-trace (symbol package breakp)
  "Trace SYMBOL in PACKAGE."
  (ilisp-errors
   (let ((real-symbol (ilisp-find-symbol symbol package)))
     (setq breakp (read-from-string breakp))
     (when real-symbol (eval `(trace ,real-symbol :break ,breakp))))))

;;; end of file -- sbcl.lisp --