Since your ACL version 5 code doesn't work on my ACL 6 and vice versa, how about the following patch. Although ugly, it should work on both ACL 5 & 6.
- Bill
*** c:/DOCUME~1/BC1886~1/LOCALS~1/Temp/swank-allegro.lisp Fri May 21 22:31:26 2004 --- c:/DOCUME~1/BC1886~1/LOCALS~1/Temp/swank-allegro.lisp1912grE Fri May 21 22:31:26 2004 *************** *** 203,222 **** ;;;; Definition Finding
(defun find-fspec-location (fspec type) ! (let* (#-(version>= 6)(fspec (if (consp fspec) ! (excl::to-internal-fspec fspec) ! fspec)) ! #-(version>= 6)(info (car (excl::fspec-fspec-info fspec))) ! #-(version>= 6)(file (excl::fspec-info-pathname info)) ! #+(version>= 6)(file (excl:source-file fspec type))) (etypecase file (pathname (let ((start (scm:find-definition-in-file fspec type file))) (make-location (list :file (namestring (truename file))) (if start (list :position (1+ start)) ! #-(version>= 6)(list :function-name (string (third info))) ! #+(version>= 6)(list :function-name (string fspec)))))) ((member :top-level) (list :error (format nil "Defined at toplevel: ~A" fspec))) (null --- 203,220 ---- ;;;; Definition Finding
(defun find-fspec-location (fspec type) ! (let* ((fspec (if (consp fspec) ! (excl::to-internal-fspec fspec) ! fspec)) ! (info (car (excl::fspec-fspec-info fspec))) ! (file (excl::fspec-info-pathname info))) (etypecase file (pathname (let ((start (scm:find-definition-in-file fspec type file))) (make-location (list :file (namestring (truename file))) (if start (list :position (1+ start)) ! (list :function-name (string (third info))))))) ((member :top-level) (list :error (format nil "Defined at toplevel: ~A" fspec))) (null
Bill_Clementson@peoplesoft.com writes:
Since your ACL version 5 code doesn't work on my ACL 6 and vice versa, how about the following patch. Although ugly, it should work on both ACL 5 & 6.
Now I know what the problem was: scm:find-definition-in-file returns nil for the generic function itself (the defgeneric form), but pointed to the file of a method. This happened with the generic functions in the swank-backend. I can live with that and we can use your original version.
Helmut.