[slime-cvs] CVS update: slime/swank-openmcl.lisp

Alan Ruttenberg aruttenberg at common-lisp.net
Wed Dec 17 17:07:51 UTC 2003


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv31963/slime

Modified Files:
	swank-openmcl.lisp 
Log Message:
Fix an error with frame-source-location-for-emacs when the function was a method-function.
Defined method-source-location that handles this case. You can still end up looking at the wrong
definition, as the protocol doesn't allow passing back the qualifiers and specializers to look
up the correct one in the file.
Date: Wed Dec 17 12:07:51 2003
Author: aruttenberg

Index: slime/swank-openmcl.lisp
diff -u slime/swank-openmcl.lisp:1.39 slime/swank-openmcl.lisp:1.40
--- slime/swank-openmcl.lisp:1.39	Tue Dec 16 03:22:03 2003
+++ slime/swank-openmcl.lisp	Wed Dec 17 12:07:51 2003
@@ -13,7 +13,7 @@
 ;;; The LLGPL is also available online at
 ;;; http://opensource.franz.com/preamble.html
 ;;;
-;;;   $Id: swank-openmcl.lisp,v 1.39 2003/12/16 08:22:03 aruttenberg Exp $
+;;;   $Id: swank-openmcl.lisp,v 1.40 2003/12/17 17:07:51 aruttenberg Exp $
 ;;;
 
 ;;;
@@ -423,7 +423,20 @@
      (declare (ignore p tcr pc))
      (when (and (= frame-number index) lfun)
        (return-from frame-source-location-for-emacs
-         (function-source-location (ccl:function-name lfun)))))))
+         (if (typep lfun 'ccl::method-function)
+             (method-source-location lfun)
+             (function-source-location (ccl:function-name lfun))))))))
+
+;; FIXME this is still wrong since it doesn't pass back which method in the file is the one you are looking for.
+(defun method-source-location (method)
+  (multiple-value-bind (files name type specializers qualifiers)
+      (ccl::edit-definition-p method)
+    (declare (ignore type specializers qualifiers))
+    (let ((file (cdr (car files))))
+      `(:location
+        (:file
+         ,(namestring (translate-logical-pathname file)))
+        (:function-name ,(string name))))))
 
 (defun nth-restart (index)
   (nth index *sldb-restarts*))





More information about the slime-cvs mailing list