You can subscribe to this list here.
| 2000 | 
          Jan
           | 
        
        
        
        
          Feb
           | 
        
        
        
        
          Mar
           | 
        
        
        
        
          Apr
           | 
        
        
        
        
          May
           | 
        
        
        
        
          Jun
           | 
        
        
        
        
          Jul
           | 
        
        
        
        
          Aug
           | 
        
        
        
        
          Sep
           | 
        
        
        
        
          Oct
           | 
        
        
        
        
          Nov
           (8)  | 
        
        
        
        
          Dec
           (15)  | 
        
      
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 | 
          Jan
           (3)  | 
        
        
        
        
          Feb
           (14)  | 
        
        
        
        
          Mar
           (6)  | 
        
        
        
        
          Apr
           (9)  | 
        
        
        
        
          May
           (8)  | 
        
        
        
        
          Jun
           | 
        
        
        
        
          Jul
           (10)  | 
        
        
        
        
          Aug
           (8)  | 
        
        
        
        
          Sep
           (4)  | 
        
        
        
        
          Oct
           (11)  | 
        
        
        
        
          Nov
           (9)  | 
        
        
        
        
          Dec
           (15)  | 
        
      
| 2002 | 
          Jan
           (19)  | 
        
        
        
        
          Feb
           (31)  | 
        
        
        
        
          Mar
           (25)  | 
        
        
        
        
          Apr
           (35)  | 
        
        
        
        
          May
           (26)  | 
        
        
        
        
          Jun
           (7)  | 
        
        
        
        
          Jul
           (7)  | 
        
        
        
        
          Aug
           (41)  | 
        
        
        
        
          Sep
           (4)  | 
        
        
        
        
          Oct
           (16)  | 
        
        
        
        
          Nov
           (3)  | 
        
        
        
        
          Dec
           (13)  | 
        
      
| 2003 | 
          Jan
           (1)  | 
        
        
        
        
          Feb
           (17)  | 
        
        
        
        
          Mar
           (13)  | 
        
        
        
        
          Apr
           (10)  | 
        
        
        
        
          May
           (18)  | 
        
        
        
        
          Jun
           (3)  | 
        
        
        
        
          Jul
           (19)  | 
        
        
        
        
          Aug
           (23)  | 
        
        
        
        
          Sep
           (1)  | 
        
        
        
        
          Oct
           (5)  | 
        
        
        
        
          Nov
           (14)  | 
        
        
        
        
          Dec
           (11)  | 
        
      
| 2004 | 
          Jan
           | 
        
        
        
        
          Feb
           | 
        
        
        
        
          Mar
           (1)  | 
        
        
        
        
          Apr
           | 
        
        
        
        
          May
           | 
        
        
        
        
          Jun
           (1)  | 
        
        
        
        
          Jul
           | 
        
        
        
        
          Aug
           | 
        
        
        
        
          Sep
           | 
        
        
        
        
          Oct
           | 
        
        
        
        
          Nov
           | 
        
        
        
        
          Dec
           | 
        
      
| 2005 | 
          Jan
           | 
        
        
        
        
          Feb
           | 
        
        
        
        
          Mar
           | 
        
        
        
        
          Apr
           | 
        
        
        
        
          May
           | 
        
        
        
        
          Jun
           (1)  | 
        
        
        
        
          Jul
           | 
        
        
        
        
          Aug
           | 
        
        
        
        
          Sep
           | 
        
        
        
        
          Oct
           | 
        
        
        
        
          Nov
           | 
        
        
        
        
          Dec
           (2)  | 
        
      
| 
     
      
      
      From: Nikodemus S. <tsi...@cc...> - 2005-12-13 19:42:17
      
     
   | 
On Sun, 11 Dec 2005, Thom Scanlan wrote:
> I'm trying to use XLisp as an Inferior process.
> I'd prefer to use Tom Almy xlisp+ but I'm unable
> to run any lisp binary under an Xemacs shell.
> I'm running Xemacs 21.4 in an XP environment.
Have you tried doing
  (setq inferior-lisp-program "path/to/your/xlisp")
in ~/.emacs (or the Xemacs equivalent), and then issuing the command M-x 
run-lisp? (This is neither shell nor Ilisp, but probably your best bet.)
Ilisp is currently neither maintained nor developed anymore in the (in my 
opinion) any usefull sense of the word, and I suspect the same applies to 
xlisp+.
Unless you specifically and really need xlisp+ I suggest you replace 
xlisp+ with a modern Common Lisp implementation (eg. Clisp), and Ilisp 
with Slime.
Cheers,
  -- Nikodemus              Schemer: "Buddha is small, clean, and serious."
                   Lispnik: "Buddha is big, has hairy armpits, and laughs."
 | 
| 
     
      
      
      From: Thom S. <tsc...@ad...> - 2005-12-11 23:00:36
      
     
   | 
I'm trying to use XLisp as an Inferior process.
I'd prefer to use Tom Almy xlisp+ but I'm unable
to run any lisp binary under an Xemacs shell.
I'm running Xemacs 21.4 in an XP environment.
After issuing a shell, everything sems ok...
C:\XLisp+>dir
dir
 Volume in drive C has no label.
 Volume Serial Number is D007-51AD
 Directory of C:\XLisp+
11/28/2005  08:29 PM    <DIR>          .
11/28/2005  08:29 PM    <DIR>          ..
11/25/2005  02:00 AM    <DIR>          bin
07/15/2005  10:08 PM    <DIR>          docs
11/26/2005  11:05 AM    <DIR>          lsp
07/16/2005  01:41 PM    <DIR>          xl304dos
11/22/2005  09:37 AM    <DIR>          xl304req
07/03/2005  12:26 PM    <DIR>          xl304win
11/28/2005  08:06 PM                82 xlisp.bat
08/04/1996  11:00 AM           293,888 XLISP30.EXE
07/02/2005  09:18 PM           348,084 xlisp300.hlp
07/16/2005  01:41 PM           122,728 xlispsml.exe
11/27/2005  06:07 PM             2,855 xlispsml.PIF
07/02/2005  09:18 PM           324,608 xlispwin.exe
11/25/2005  01:15 AM               227 xlispwin.ini
07/02/2005  09:18 PM           280,064 xlwin32.exe
              22 File(s)      2,806,620 bytes
               8 Dir(s)  175,013,314,560 bytes free
but when I invoke the lisp binary either directly or via batch file...
C:\XLisp+>xlisp.bat
xlisp.bat
C:\XLisp+>cd c:\XLisp+
C:\XLisp+>xlispsml.exe lsp\init lsp\classes lsp\common lsp\common2
XLISP-PLUS version 3.04
Portions Copyright (c) 1988, by David Betz.
Modified by Thomas Almy and others.
; loading "lsp\init.lsp" ; loading "lsp\classes.lsp" ; loading
"lsp\common.lsp" ; loading "lsp\common2.lsp"
no Lisp prompt is returned...
'1' does not evaluate, nor (+ 1 1),however,
(system "dir") returns
 Volume in drive C has no label
 Volume Serial Number is D007-51AD
 Directory of C:\XLISP_~1
.            <DIR>     07/02/05   9:15p
..           <DIR>     07/02/05   9:15p
BIN          <DIR>     11/23/05   5:06p
DOCS         <DIR>     07/02/05   9:15p
LSP          <DIR>     07/16/05   1:47p
XL304DOS     <DIR>     07/16/05   1:41p
XL304REQ     <DIR>     07/02/05   9:15p
XL304WIN     <DIR>     07/02/05   9:18p
XLDOCMSW ZIP    350000 11/19/05   1:13p
XLDOCW6  A4     471552 07/02/05   9:17p
XLDOCW6  LTR    471552 07/02/05   9:17p
XLISP    BAT        82 11/28/05   8:06p
XLISP30  EXE    293888 08/04/96  11:00a
XLISP300 HLP    348084 07/02/05   9:18p
XLISPSML EXE    122728 07/16/05   1:41p
XLISPSML PIF      2855 11/27/05   6:07p
XLISPWIN EXE    324608 07/02/05   9:18p
XLISPWIN INI       227 11/25/05   1:15a
XLWIN32  EXE    280064 07/02/05   9:18p
       30 file(s)    2806620 bytes
                  1023932928 bytes free
(exit)
XLISP-PLUS 3.03 contains contributed code by:
Tom Almy, Mikael Pettersson, Neal Holtz, Johnny Greenblatt, Ken Whedbee,
Blake McBride, Pete Yadlowsky, Hume Smith, and Richard Zidlicky.
Portions copyright (c) 1988, Luke Tierney.
t
C:\XLISP_~1>
 | 
| 
     
      
      
      From: Neateye <nit...@ao...> - 2005-06-06 23:59:33
      
     
   | 
Call out Gouranga be happy!!! Gouranga Gouranga Gouranga .... That which brings the highest happiness!!  | 
| 
     
      
      
      From: Irvin H. <irv...@gm...> - 2004-06-27 06:04:40
      
     
   | 
Hi, I'm kind of new to using lisp/linux and want to get started with ilisp and cmucl. I've installed both, but am having a hard time figuring out how to get everything setup. I've tried following the guide from 1. the installation guide 2. http://ww.telent.net/lisp/howto.html#getting_started and the guide 3. http://cl-cookbook.sourceforge.net/emacs-ide.html The problem I had when following guide #2 was after I tried running "M-x cmulisp" I got the error "Cannot open load file: ilisp" When I tried following guide #3 it didn't list how to start ilisp and when I tried starting it the way guides #1 and #2 described the commands were usually not found. I tried searching through the help archive, but I didn't really find anything about this or links to different tutorials. I'm not sure my .emacs file is right because I don't really know what it does (I just copied the examples given in the tutorials). Anyway I was just wondering if anyone knew what the problem was or another resource that might help, thanks. irvin h.  | 
| 
     
      
      
      From: <d9...@na...> - 2004-03-31 12:51:55
      
     
   | 
I upgraded CMUCL to a 2003-11 snapshot, and updated ilisp from CVS. Now tab completion of symbols in packages does not work properly. Ie, before the upgrade, I could type "(ext:" M-tab to get all the external function symbols of the ext package in the completions buffer. Now I just get "Completed" in the minibuffer and "(No match)" flashes right after the point. If I give one more character, eg "(ext:r" M-tab, it works and I get all functions starting with an 'r'. Has anybody else experienced this problem, and/or have any idea how to solve it? Bj=C3=B6rn  | 
| 
     
      
      
      From: Russell M. <rus...@ya...> - 2003-12-29 19:34:33
      
     
   | 
I'm running a lispworks image dumped from lispworks 4.2.6 for linux under ilisp-20021222 and xemacs 21.4. Whenever I C-M-x an expression to lispworks that causes the listener to enter the debugger, xemacs hangs, I have to C-g, then switch to the lispworks buffer, C-c C-c, then repair ilisp connection. Any suggestions for figuring out what is going wrong? -russ  | 
| 
     
      
      
      From: Lynn Q. <qu...@AI...> - 2003-12-18 17:43:10
      
     
   | 
Changing (setq lisp-edit-file nil) to (setq lisp-edit-files nil)
fixed some problems, but I have isolated another problem related
to setf methods.  Here is a test file:
File: /tmp/ilisp-test.lisp
#########################################
(in-package :cl-user)
(defclass foo ()
    ((x :initform 'x)))
(defmethod bar ((obj foo))
  nil)
(defmethod (setf bar) (value (obj foo))
  nil)
(defun foo (x)
  nil)
(defun (setf foo) (value x)
  nil)
#|
(load (compile-file "/tmp/ilisp-test.lisp"))
(bar x)
(foo x)
|#
#########################################
Again, starting emacs -q and evaluating:
(progn 
  (push "/opt/share/emacs/site-lisp/packages/ilisp" load-path)
  (require 'ilisp)
  (setq lisp-edit-file nil)
  (setq lisp-find-definition-verbose-p  t)
  (setq allegro-program "allegro")
  )
followed by M-. on BAR gives:
*Messages* buffer:
Finding any bar definitions
COMMON-LISP-USER::BAR is a generic function with 1 method.
lisp-find-next-possibility returned nil.
No more bar definitions in *cmulisp*.
lisp-next-definition returns nil.
Can't find any bar.
In Lisp:
(ilisp::source-file "BAR" "CL-USER" "any")
((:COMMENT "COMMON-LISP-USER::BAR is a generic function with 1 method.")
 (:DEFINITION :NAME (METHOD COMMON-LISP-USER::BAR (COMMON-LISP-USER::FOO))
  :TYPE :FUNCTION :FILES ("/r/tmp/ilisp-test.lisp"))
 (:COMMENT "(SETF COMMON-LISP-USER::BAR) is a generic function with 1 method.")
 (:DEFINITION :NAME
  (METHOD (SETF COMMON-LISP-USER::BAR) (T COMMON-LISP-USER::FOO)) :TYPE
  :FUNCTION :FILES ("/r/tmp/ilisp-test.lisp"))) 
T
So, ILISP::SOURCE-FILE is doing the right thing, but
LISP-FIND-NEXT-POSSIBILITY is losing.
This problem appears to be specific to the setf methods.
Doing M-. on FOO sucessfully finds the function definition for foo.
 | 
| 
     
      
      
      From: Bob R. <rog...@rg...> - 2003-12-18 02:58:48
      
     
   | 
   From: Lynn Quam <qu...@AI...>
   Date: Tue, 16 Dec 2003 21:18:55 -0800
   . . .
   Here is a trivial test file that appears to cause this problem in 
   both Allegro 6.0 and CMU Common Lisp CVS snapshot 2003-12.
   In both cases I started Emacs 21.1.95.1 with -q so that my emacs init
   file was ignored, just in case something it loads might be causing
   then problems.
Thank you for isolating a test case; I was able to reproduce the problem
using "emacs -q" with ACL 6.1 (though, as it turns out, I expect any
Lisp would have done as well).
   Then in emacs I did:
   (progn 
     (push "/opt/share/emacs/site-lisp/packages/ilisp" load-path)
     (require 'ilisp)
     (setq lisp-edit-file nil)
     (setq lisp-find-definition-verbose-p  t)
     (setq allegro-program "allegro")
   )
You needed to do "(setq lisp-edit-files nil)" [note plural] instead.
But no matter; I have committed the obvious (and overdue) fix, so this
setting should cause problems for M-. users no longer.
   In the process, though, I found it sometimes finds the bar method,
and sometimes it thinks it can't, depending perhaps on the cursor
position, and maybe the cache state (though I did try to rule that out).
Something else for me to track down . . .
   Thanks for hanging in there,
					-- Bob Rogers
					   http://rgrjr.dyndns.org/
 | 
| 
     
      
      
      From: Bob R. <rog...@rg...> - 2003-12-16 03:18:49
      
     
   | 
   From: Lynn Quam <qu...@AI...>
   Date: Mon, 15 Dec 2003 09:06:23 -0800
   I did a cvs update of my ilisp sources on Dec 12, 2003.
   It had been a year or so since my last cvs update.
   Almost everything appears to work ok except for EDIT-DEFINITIONS-LISP.
   It appears that something is broken for finding the methods of generic
   functions.
   I have a generic-function named SELECTED-OBJECT. 
   If I start up CMUCL without loading and definitions for
   SELECTED-OBJECT and do <meta>-. on (SELECTED-OBJECT ...) I get the
   following messages:
     No symbol "selected-object" available in package "COMMON-LISP-USER".
     No more selected-object definitions in *cmulisp*.
     Searching /opt/IU/FREEDIUS/lisp/basic-gui/display.lisp for any selected-object
     lisp-locate-clisp: shouldn't have been given type "any", for (nil nil "selected-object").
   Everything looks fine except the last message:
     lisp-locate-clisp: shouldn't have been given type "any", for (nil  nil "selected-object").
I suspect this is because lisp-edit-files is non-nil (in emacs).  If you
haven't done M-x lisp-directory, then setting it to nil should be
sufficient.  This is a feature that doesn't work with the new M-., but
was never fully disabled, since I intended to make it work eventually.
I will fix M-. not to use lisp-edit-files, as I should have done long
ago; my apologies for the bother.  (A year and a half ago, I shut it off
in my init file, so I never noticed.)
   Some other notes on using/debugging M-. when combining bleeding edge
CMUCL with bleeding edge ILISP:
   1.  Two weeks ago, I couldn't get M-. to work on methods in the CMUCL
November snapshot, but that appeared to be because of a low-level CLOS
problem, and I didn't have time to track it down.  It seems to work in
the December snapshot, though, but other such problems may be lurking.
   2.  When M-. is involved, it is often useful to post the contents of
the *Edit-Definitions* buffer.  In such cases, you might also want to
try setting lisp-find-definition-verbose-p to t in emacs, which will
generate additional debugging messages.
   3.  ILISP in emacs caches the last M-. result it got from the Lisp,
so it helps to do M-. on something different between test cases in order
to flush the cache.
   4.  Also in the November snapshot, I discovered I needed to do
	(setq pcl::*optimize-accessor-calls-p* nil)
before compiling the find-src.lisp file in order to work around another
CMUCL CLOS problem.  This may have been fixed -- I haven't checked --
but if M-. on a method or GF gives you "#<STANDARD-GENERIC-FUNCTION
GLORP (1) {48096749}> is not of type INSTANCE" errors, then you need it.
   Please let me know whether clearing lisp-edit-files works for you.
					-- Bob Rogers
					   http://rgrjr.dyndns.org/
 | 
| 
     
      
      
      From: Paul L. <zen...@ya...> - 2003-12-16 02:00:34
      
     
   | 
I have found a problem with using both ilisp and the Emacs
inferior shell (M-x shell).  I use XEmacs, but I have heard
of the same problem under Emacs.
The problem is that the inferior Emacs shell doesn't
complete properly.  To reproduce the problem:
1. Start (X)Emacs: (x)emacs -q
2. M-x shell
3. In the shell, type `mak<TAB>', it should complete to
`make' and then bring up a *Completions* buffer as a half
pane (i.e. (display-buffer))
4. Start ilisp: (progn (load "ilisp") (cmulisp)).  I really
don't know if it is just the cmulisp module here, I > > did
find this dialect setting comint variables, but there are
many other ilisp files which modify comint variables.
5. Go back to the shell buffer and type `<TAB>' again.  It
still completes to `make' but this time it inserts the '(No
Completions)' _in_ the shell buffer, does not display the
*Completions* buffer, and puts `Completing command name...'
in the minibuffer.
I think I found a fix or at least at least a band-aid fix.
The problem is in completer.el (attached).  I don't know if
I have the latest or not, if not, then you might want to
diff it.  Whatever the case, this fix is simple.
completer.el redefines a couple comint functions, namely the
dynamic complete file name function, which is what was the
cause of the problem I was having:
(fset 'comint-dynamic-complete-filename
      'completer-comint-dynamic-complete-filename)
(fset 'comint-dynamic-list-completions 
      'completer-comint-dynamic-list-completions)
While, one approach is to fix the completer-* functions,
another is to just use the comint-* functions for what they
were intended for, since after all, completer is for
completing LISP forms (please correct me if I am wrong).
So the fix is to before the fseting, remember the old
function with:
(fset 'old-comint-dynamic-complete-filename
      (symbol-function 'comint-dynamic-complete-filename))
(fset 'old-comint-dynamic-list-completions 
      (symbol-function 'comint-dynamic-list-completions))
Note that setting the symbol isn't good enough because you
will end up dereferencing the completer-* functions again
by transitivity.
Then we just use the old function defs for any other mode
but ilisp and lisp modes:
(defun completer-comint-dynamic-list-completions (completions)
  "List in help buffer sorted COMPLETIONS.
Typing SPC flushes the help buffer."
  (if (completer-use-override-p)
      (completer-comint-dynamic-complete-1 nil 'help)
    (old-comint-dynamic-list-completions completions)
    ))
(defun completer-comint-dynamic-complete-filename ()
  "Dynamically complete the filename at point."
  (interactive)
  (if (completer-use-override-p)
      (completer-comint-dynamic-complete-1 nil t)
    (old-comint-dynamic-complete-filename)
    ))
I don't know how `symbol-function' (in the fsets above)
will work if this file is byte compiled but I really don't
think this matters.  However, in general, more testing
should probably be done.
;;; -*- 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, cc...@cs....
;;; Copyright (C) 2000 Ben Wing.
;;; Copyright (C) 2002 Marco Antoniotti and the ILISP Maintainers
;;;
;;; Author: Chris Mcconnell <ch...@mi...>
;;; 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)
;;;%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 (string-match "Lucid" emacs-version)))
	(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 (eq system-type 'windows-nt)
    (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)
;; completer overriding comint functionality in `shell' doesn't work
;; -- start completer override fix
(fset 'old-comint-dynamic-complete-filename
      (symbol-function 'comint-dynamic-complete-filename))
(fset 'old-comint-dynamic-list-completions 
      (symbol-function 'comint-dynamic-list-completions))
(defun completer-use-override-p ()
  (memq major-mode '(ilisp-mode lisp-mode)))
;;;%comint 
(defun completer-comint-dynamic-list-completions (completions)
  "List in help buffer sorted COMPLETIONS.
Typing SPC flushes the help buffer."
  (if (completer-use-override-p)
      (completer-comint-dynamic-complete-1 nil 'help)
    (old-comint-dynamic-list-completions completions)
    ))
(defun completer-comint-dynamic-complete-filename ()
  "Dynamically complete the filename at point."
  (interactive)
  (if (completer-use-override-p)
      (completer-comint-dynamic-complete-1 nil t)
    (old-comint-dynamic-complete-filename)
    ))
;; -- end completer override fix
;;;
(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 " <f>")
			  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) " <f>")
					     (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 --
=====
Paul Landes
la...@ac...
 | 
| 
     
      
      
      From: Lynn Q. <qu...@AI...> - 2003-12-15 17:07:18
      
     
   | 
------- Start of message -------
From: Lynn Quam <qu...@AI...>
To: ili...@co...
Subject: edit-definitions-lisp problems
Date: Sat, 13 Dec 2003 10:22:21 -0800
I did a cvs update of my ilisp sources on Dec 12, 2003.
It had been a year or so since my last cvs update.
Almost everything appears to work ok except for EDIT-DEFINITIONS-LISP.
It appears that something is broken for finding the methods of generic
functions.
I have a generic-function named SELECTED-OBJECT. 
If I start up CMUCL without loading and definitions for
SELECTED-OBJECT and do <meta>-. on (SELECTED-OBJECT ...) I get the
following messages:
  No symbol "selected-object" available in package "COMMON-LISP-USER".
  No more selected-object definitions in *cmulisp*.
  Searching /opt/IU/FREEDIUS/lisp/basic-gui/display.lisp for any selected-object
  lisp-locate-clisp: shouldn't have been given type "any", for (nil nil "selected-object").
Everything looks fine except the last message:
  lisp-locate-clisp: shouldn't have been given type "any", for (nil  nil "selected-object").
Now when I load my definition for SELECTED-OBJECT and do <meta>-. on
(SELECTED-OBJECT ...) I get the following messages:
  Finding any selected-object definitions
  GUI::SELECTED-OBJECT is a generic function with 1 method.
  No more selected-object definitions in *freedius-cmucl*.
  Searching /opt/IU/FREEDIUS/lisp/basic-gui/display.lisp for any selected-object
  lisp-locate-clisp: shouldn't have been given type "any", for (nil nil "selected-object").
I set do (setq debug-on-error t) and do <meta>-.  again and get the
following backtrace:
Debugger entered--Lisp error: (error "shouldn't have been given type \"any\", for (nil nil \"selected-object\").")
  signal(error ("shouldn't have been given type \"any\", for (nil nil \"selected-object\")."))
  error("shouldn't have been given type %S, for %S." "any" (nil nil "selected-object"))
  lisp-locate-clisp((nil nil "selected-object") "any" t nil)
  lisp-locate-definition-in-file(lisp-locate-clisp [cl-struct-ilisp-defn-spec (nil nil "selected-object") "selected-object" "any" "/opt/IU/FREEDIUS/lisp/basic-gui/display.lisp" nil nil] t)
  lisp-next-definition(nil t)
  next-definition-lisp(nil t)
  lisp-edit-definitions-normal(("GUI" "::" "selected-object") "any" nil nil)
  edit-definitions-lisp(("GUI" "::" "selected-object") "any")
  call-interactively(edit-definitions-lisp)
Any ideas?
 | 
| 
     
      
      
      From: Paolo A. <am...@mc...> - 2003-12-08 09:14:54
      
     
   | 
Edi Weitz writes: > I see garbled documentation with ILISP functions, too. Is anybody else > having this problem? This may be the case with the ILISP `loadfile' make target, which concatenates the *.elc files together. Paolo -- Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film  | 
| 
     
      
      
      From: <Bil...@pe...> - 2003-12-07 23:52:38
      
     
   | 
I also had this problem on MS Windows. I can notice no difference in the
concatenated ilisp-all.elc performance compared to having the individual
files and have not used ilisp-all.elc since before v5.12 was released. In
fact, I changed the icompile.bat file in CVS some time back to make it the
default to not build ilisp-all.elc under Windows. I agree with Bob that it
would be better to drop ilisp-all.elc altogether (or at least change the
default in the make file).
--
Bill Clementson
                                                                                                                                                 
                      "Bob Rogers"                                                                                                               
                      <rog...@rg....        To:       ed...@ag...                                                                
                      org>                               cc:       ili...@li...                                              
                      Sent by:                           Subject:  [Ilisp-help] Garbled documentation                                            
                      ili...@li...                                                                                                
                      ceforge.net                                                                                                                
                                                                                                                                                 
                                                                                                                                                 
                      12/07/2003 03:56 PM                                                                                                        
                                                                                                                                                 
                                                                                                                                                 
   From: Edi Weitz <ed...@ag...>
   Date: Sun, 07 Dec 2003 21:07:36 +0100
   With a very recent ILISP from CVS and FSF Emacs 21.2 on Linux I can
   reproduce the following behaviour . . .
   Now the contents of the *Help* buffer look rather strange:
     M-q runs the command reindent-lisp
             which is an interactive compiled Lisp function in
`ilisp-all.elc'.
     (reindent-lisp)
     fvar lisp-wait-p nil (#$ . -2260))
     #@301 *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.
   I see garbled documentation with ILISP functions, too. Is anybody else
   having this problem?
   Cheers,
   Edi.
I can reproduce this, on essentially the identical configuration.  The
output looks like an offset problem with the documentation strings; the
byte compiler replaces inline documentation strings with an integer
offset into the .elc file, and the elisp 'documentation' function
converts this back to the original string by reading the file starting
at that offset.  The way ilisp-all.elc is made (concatenating all the
binaries) probably screws this up, though why it worked before is beyond
me.
   For the time being, it should work to delete ilisp-all.elc, and then
do "make compile" again.  "(require 'ilisp)" will then load the
individual .elc files.
   This seems to undermine the whole point of having an ilisp-all.elc in
the first place.  The idea (as I understand it) was to make ilisp load
faster by cutting down the overhead of opening separate .elc files.  But
shutting off the byte-compile-dynamic-docstrings feature means that
emacs has to read and store all doc strings.  I would argue for dropping
ilisp-all.elc altogether, rather than trying to make it work well both
ways.  (FWIW, I don't use ilisp-all.elc on my ancient 300MHz system, and
I can't say I notice the difference.)
   Comments?
                                                             -- Bob Rogers
http://rgrjr.dyndns.org/
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Ilisp-help mailing list
Ili...@li...
https://lists.sourceforge.net/lists/listinfo/ilisp-help
 | 
| 
     
      
      
      From: Edi W. <ed...@ag...> - 2003-12-07 23:13:06
      
     
   | 
On Sun, 7 Dec 2003 17:56:44 -0500, Bob Rogers <rog...@rg...> wrote:
>    From: Edi Weitz <ed...@ag...>
>    Date: Sun, 07 Dec 2003 21:07:36 +0100
>
>    [...]
>    I see garbled documentation with ILISP functions, too.
                           ----------^
                           other
> For the time being, it should work to delete ilisp-all.elc, and then
> do "make compile" again. "(require 'ilisp)" will then load the
> individual .elc files.
Yes, I can confirm that this resolves the problem. Thanks for the
quick fix.
> I would argue for dropping ilisp-all.elc altogether, rather than
> trying to make it work well both ways.  (FWIW, I don't use
> ilisp-all.elc on my ancient 300MHz system, and I can't say I notice
> the difference.)
I never thought about it but now that I've removed ilisp-all.elc I
have to say that I also don't notice a difference.
Thanks again,
Edi.
 | 
| 
     
      
      
      From: Bob R. <rog...@rg...> - 2003-12-07 22:56:52
      
     
   | 
   From: Edi Weitz <ed...@ag...>
   Date: Sun, 07 Dec 2003 21:07:36 +0100
   With a very recent ILISP from CVS and FSF Emacs 21.2 on Linux I can
   reproduce the following behaviour . . .
   Now the contents of the *Help* buffer look rather strange:
     M-q runs the command reindent-lisp
	which is an interactive compiled Lisp function in `ilisp-all.elc'.
     (reindent-lisp)
     fvar lisp-wait-p nil (#$ . -2260))
     #@301 *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.
   I see garbled documentation with ILISP functions, too. Is anybody else
   having this problem?
   Cheers,
   Edi.
I can reproduce this, on essentially the identical configuration.  The
output looks like an offset problem with the documentation strings; the
byte compiler replaces inline documentation strings with an integer
offset into the .elc file, and the elisp 'documentation' function
converts this back to the original string by reading the file starting
at that offset.  The way ilisp-all.elc is made (concatenating all the
binaries) probably screws this up, though why it worked before is beyond
me.
   For the time being, it should work to delete ilisp-all.elc, and then
do "make compile" again.  "(require 'ilisp)" will then load the
individual .elc files.
   This seems to undermine the whole point of having an ilisp-all.elc in
the first place.  The idea (as I understand it) was to make ilisp load
faster by cutting down the overhead of opening separate .elc files.  But
shutting off the byte-compile-dynamic-docstrings feature means that
emacs has to read and store all doc strings.  I would argue for dropping
ilisp-all.elc altogether, rather than trying to make it work well both
ways.  (FWIW, I don't use ilisp-all.elc on my ancient 300MHz system, and
I can't say I notice the difference.)
   Comments?
					-- Bob Rogers
					   http://rgrjr.dyndns.org/
 | 
| 
     
      
      
      From: Edi W. <ed...@ag...> - 2003-12-07 20:07:43
      
     
   | 
With a very recent ILISP from CVS and FSF Emacs 21.2 on Linux I can
reproduce the following behaviour:
1. Start Emacs with emacs -q
2. In the *scratch* buffer execute these two forms:
     (setq load-path (cons (expand-file-name "/usr/local/share/emacs/site-lisp/ilisp")
                           load-path))
     (setq lisp-mode-hook '(lambda () (require 'ilisp)))
   [The first form is obviously only necessary for my specific setup.]
3. Load some random Lisp file, say, /tmp/foo.lisp.
4. Press C-h k M-q
Now the contents of the *Help* buffer look rather strange:
  M-q runs the command reindent-lisp
     which is an interactive compiled Lisp function in `ilisp-all.elc'.
  (reindent-lisp)
  fvar lisp-wait-p nil (#$ . -2260))
  #@301 *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.
I see garbled documentation with ILISP functions, too. Is anybody else
having this problem?
Cheers,
Edi.
 | 
| 
     
      
      
      From: rif <ri...@MI...> - 2003-11-26 17:39:49
      
     
   | 
I now have an actual fix (but no understanding) of the problem. The offending coe is, in find-src.lisp, lines 45-49 ;; [necessary in cmucl 18d, but not in 18f (we expect). -- rgr, 19-Feb-03.] #+cmu (defmethod class-name ((class structure-class)) (kernel::structure-class-name class)) I have no idea what this is actually doing, but it seems that in both CMUCL 18e and 19a, this code causes find-src.lisp to only load successfully when compiled, not when interpreted, which causes all the problems discussed yesterday. I came upon the solution just by randomly poking around in the files, so I guess this is a cargo cult solution. Suggested fix, change the #+cmu to #+(and cmu (not (or cmu18e cmu18f cmu19))) If anyone would care to explain what this code actually does/means, I'd be grateful. Cheers, rif  | 
| 
     
      
      
      From: Bob R. <rog...@rg...> - 2003-11-26 03:13:57
      
     
   | 
From: rif <ri...@MI...> Date: Tue, 25 Nov 2003 17:01:23 -0500 OK, I've spent a bunch of time looking at things, and I've somewhat isolated the problem. My problem is NOT a CMUCL version skew problem. This problem occurs with a brand-new out-of-the-CVS ILISP, which contains no .x86f files whatsoever. Then this needs to be fixed, no question. M-x ilisp-compile-inits tries to compile all of these files, if they are not compiled. For reasons I'm unclear on, this does not work, regardless of whether or not the workaround above has been applied. . . . Then it's almost certainly a CMUCL compiler issue. I wonder if this is related to the CLX compilation issue that was recently discussed on the cmucl-imp list? The solution was to bind conditions::*make-condition-accessor-methods* to T, but I just tried something similar, with no luck. I'm not sure what else to say. I'm willing to poke at this some more if anyone has some good ideas or suggestions. Cheers, rif Other than the speculation I made above, I'm clueless. Since find-src.lisp is mostly my code, I figure the ball is in my court, but if you can think of a way to pin it down, I'd greatly appreciate the help. Good thing Thursday is a holiday . . . -- Bob  | 
| 
     
      
      
      From: rif <ri...@MI...> - 2003-11-25 22:03:07
      
     
   | 
OK, I've spent a bunch of time looking at things, and I've somewhat isolated the problem. My problem is NOT a CMUCL version skew problem. This problem occurs with a brand-new out-of-the-CVS ILISP, which contains no .x86f files whatsoever. ILISP, at startup time, tries to load the files ilisp-pkg, cl-ilisp, cmulisp, and find-src. For each file, it loads a .x86f if one is available (which could perhaps lead to version skew problems if one changes CMUCL versions), and if not, a .lisp file. The problem directly relates to the fact that recent versions of CMUCL (including at least Snapshot 2003-11 and post-18e CVS 2003-08-15) cannot successfully load the file find-src.lisp in the ILISP distribution. If the file is compiled, the resulting find-src.x86f can be loaded normally. I have sent mail to the CMUCL help mailing list about this. Therefore, one (currently my only) workaround is to go into a CMUCL from the shell (NOT from ILISP), and compile find-src.lisp there (after loading the other three in either .lisp or .x86f form). This at least gets ILISP working --- we should really come up with something better, or at least publicize this workaround so newbies don't get caught up in it for too long. M-x ilisp-compile-inits tries to compile all of these files, if they are not compiled. For reasons I'm unclear on, this does not work, regardless of whether or not the workaround above has been applied. In particular, all attempts to compile cl-ilisp inside an ILISP buffer yield 67 errors, which seem to all be of the form "blah is not of type KERNEL::STRUCTURE-CLASS" (same problem we face if we try to load find-src.lisp.) Note, however, that if I start a CMUCL from the shell, I can load ilisp-pkg.[lisp|x86f] and then compile cl-ilisp no problem. So this seems to be some weird interaction between ILISP and CMUCL, rather than strictly a CMUCL problem. I'm not sure what else to say. I'm willing to poke at this some more if anyone has some good ideas or suggestions. Cheers, rif  | 
| 
     
      
      
      From: Thomas F. B. <tf...@OC...> - 2003-11-25 18:29:31
      
     
   | 
I had this problem a couple times too.  If the ILISP maintainers put
something like this:
  (eval-when (:load-toplevel)
    (assert (string= #.(lisp-implementation-version) (lisp-implementation-version))
            ()
            "This file was compiled with CMUCL version ~A but is being loaded into version ~A"
	    #.(lisp-implementation-version) (lisp-implementation-version)))
at the top of the cmulisp.lisp, it would probably help a lot.
-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
 | 
| 
     
      
      
      From: Nicolas N. <Nic...@iw...> - 2003-11-25 09:20:09
      
     
   | 
Bob Rogers <rog...@rg...> writes: > From: rif <ri...@MI...> > Date: Mon, 24 Nov 2003 16:47:47 -0500 > > A while back, Nicolas Neuss posted a bug trying to make a new CMUCL > run with the CVS ILISP. In particular, this is CMUCL post-18e CVS > 2003-08-15, and I downloaded ILISP today (24 Nov 2003). I'm getting > exactly the same error Nicolas described (see > http://sourceforge.net/mailarchive/forum.php?thread_id=3281533&forum_id=5778), > although for Nicolas, the problem eventually seemed to go away on its > own, and for me it's not. > > Any ideas or suggestions? > > Cheers, > > rif > > Sorry; I didn't see the original post, though I'm not sure why. > Probably trying to read too fast. > > Anyway, I had what appears to be the same problem with ilisp CVS and > the CMUCL November snapshot, and I think the solution was to blow away > all of the *.x86f files before starting cmucl under ilisp, then do M-x > ilisp-compile-inits. If that doesn't work, try invoking CMUCL from a > shell and compiling the relevant files manually (ilisp-pkg.lisp, > cl-ilisp.lisp, cmulisp.lisp, and find-src.lisp, in that order), loading > the new binary after each compile. > > One of these solutions worked with CMUCL, and the other worked with > SBCL 0.8.4, but I'm afraid I don't remember which was which. > > HTH, > > -- Bob Rogers > http://rgrjr.dyndns.org/ For me the solution was also something like this. If this does not work, maybe the following helps. I also had problems because ilisp used some site-wide initialization files which were compiled for an older Ilisp and older CMUCL. These existed because I once had installed Debian ilisp and "apt-get remove ilisp" did not do its clean up properly. Nicolas.  | 
| 
     
      
      
      From: Bob R. <rog...@rg...> - 2003-11-25 02:16:29
      
     
   | 
From: rif <ri...@MI...> Date: Mon, 24 Nov 2003 16:47:47 -0500 A while back, Nicolas Neuss posted a bug trying to make a new CMUCL run with the CVS ILISP. In particular, this is CMUCL post-18e CVS 2003-08-15, and I downloaded ILISP today (24 Nov 2003). I'm getting exactly the same error Nicolas described (see http://sourceforge.net/mailarchive/forum.php?thread_id=3281533&forum_id=5778), although for Nicolas, the problem eventually seemed to go away on its own, and for me it's not. Any ideas or suggestions? Cheers, rif Sorry; I didn't see the original post, though I'm not sure why. Probably trying to read too fast. Anyway, I had what appears to be the same problem with ilisp CVS and the CMUCL November snapshot, and I think the solution was to blow away all of the *.x86f files before starting cmucl under ilisp, then do M-x ilisp-compile-inits. If that doesn't work, try invoking CMUCL from a shell and compiling the relevant files manually (ilisp-pkg.lisp, cl-ilisp.lisp, cmulisp.lisp, and find-src.lisp, in that order), loading the new binary after each compile. One of these solutions worked with CMUCL, and the other worked with SBCL 0.8.4, but I'm afraid I don't remember which was which. HTH, -- Bob Rogers http://rgrjr.dyndns.org/  | 
| 
     
      
      
      From: <Bil...@pe...> - 2003-11-24 22:27:22
      
     
   | 
> ps. Will someone PLEASE change line 171 of ilisp.emacs so that the > referenced file is Map_Sym.txt, rather than Map_Sym.Txt? Map_Sym.Txt > is not part of the hyperspec and this leads to hard to find bugs that > have cost at least me and someone else a lot of time hunting down. Done.  | 
| 
     
      
      
      From: rif <ri...@MI...> - 2003-11-24 21:47:50
      
     
   | 
A while back, Nicolas Neuss posted a bug trying to make a new CMUCL run with the CVS ILISP. In particular, this is CMUCL post-18e CVS 2003-08-15, and I downloaded ILISP today (24 Nov 2003). I'm getting exactly the same error Nicolas described (see http://sourceforge.net/mailarchive/forum.php?thread_id=3281533&forum_id=5778), although for Nicolas, the problem eventually seemed to go away on its own, and for me it's not. Any ideas or suggestions? Cheers, rif ps. Will someone PLEASE change line 171 of ilisp.emacs so that the referenced file is Map_Sym.txt, rather than Map_Sym.Txt? Map_Sym.Txt is not part of the hyperspec and this leads to hard to find bugs that have cost at least me and someone else a lot of time hunting down.  | 
| 
     
      
      
      From: rif <ri...@MI...> - 2003-11-24 18:55:57
      
     
   | 
> Mathias Broxvall wrote: > > > On Thursday 20 November 2003 08:34, you wrote: > > > > > What happens to me is that after the cmucl > > > > > debugger has been entered once, next function i type, after I type > > > > > space, emacs hangs and i have to type C-g and restart cmucl. > > > > I had a similar problem before which seems to ahve to do with ilisp looking up > > all completions of a function name. The fix was to add this to my .emacs > > file. > > > > ;; Fix spacebar bug > > (setq ilisp-*arglist-message-lisp-space-p* nil) Of course, the problem with this "solution" is that one no longer gets a function argument list when one presses space, which is probably to me one of the most useful things in the ilisp interface. This question has been asked several times on the ilisp mailing list, but no satisfactory answer has been found, to my knowledge. rif  |