Bill_Clementson@peoplesoft.com writes:
When I use M-. on a defun or macro, I am taken to the source location. However, when I use M-. on a method that has multiple implementations, I
am
not getting taken to the source location correctly in every instance. Instead, I get the following results (all tests are on Win2000):
Allegro (never works): The "*XREF[definition: node-xform]*" buffer is opened with a list of the different specialized methods. When I positon
the
cursor on the correct method and press enter, I get the following error message: "Unkown source location for (METHOD NODE-XFORM (T (EQL 'WORK)))" despite the fact that there is such a method available.
Attached is a patch for ACL to fix this problem.
-- Bill Clementson
-------------Cut here----------------------------
*** c:/DOCUME~1/BC1886~1/LOCALS~1/Temp/swank-allegro.lisp Thu May 20 12:46:28 2004 --- c:/DOCUME~1/BC1886~1/LOCALS~1/Temp/swank-allegro.lisp1996D0P Thu May 20 12:46:28 2004 *************** *** 214,220 **** ;;;; Definition Finding
(defun find-fspec-location (fspec type) ! (let ((file (excl:source-file fspec type))) (etypecase file (pathname (let ((start (scm:find-definition-in-file fspec type file))) --- 214,220 ---- ;;;; Definition Finding
(defun find-fspec-location (fspec type) ! (let ((file (excl::fspec-pathname fspec type))) (etypecase file (pathname (let ((start (scm:find-definition-in-file fspec type file)))
Bill_Clementson@peoplesoft.com writes:
Attached is a patch for ACL to fix this problem.
Thanks for the patch. I modified it a bit to work in Allegro 5.0. I hope it works in 6.x too.
For LispWorks we search currently only the function name (no specializers). So if you have multiple methods in one file only the first is found. We could probably read (and perhaps macroexpand) toplevel forms and search for dspecs to improve the accuracy. But I think Xanalys will do that for us.
I don't know if and where CLISP records the source location for methods. ISTR that generic functions are opaque objects (implemented in C) in CLISP. I guess someone more knowledgeable about CLISP's internals has to fix this.
Helmut.