[Ilisp-help] edit-definitions-lisp problems

Bob Rogers <[email protected]> Mon, 15 Dec 2003 22:18:45 -0500
Newsgroups gmane.lisp.ilisp.devel,gmane.lisp.ilisp.general
Message-ID <[email protected]>
   From: Lynn Quam <[email protected]>
   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/


-------------------------------------------------------
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/