Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

basic/simple implementation of find-definitions

  • Loading branch information...
commit 98a99bdab195d0c9ddcc43017d37a01410d64c94 1 parent 2c2baba
Geo Carncross authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 swank-ecl.lisp
10 swank-ecl.lisp
View
@@ -10,6 +10,8 @@
(in-package :swank-backend)
+(defvar *tmp*)
+
(if (find-package :gray)
(import-from :gray *gray-stream-symbols* :swank-backend)
(import-from :ext *gray-stream-symbols* :swank-backend))
@@ -300,16 +302,20 @@
;;;; Definitions
-(defimplementation find-definitions (name) nil)
+(defimplementation find-definitions (name)
+ (if (fboundp name)
+ (let ((tmp (find-source-location (symbol-function name))))
+ `(((defun ,name) ,tmp)))))
(defimplementation find-source-location (obj)
+ (setf *tmp* obj)
(or
(typecase obj
(function
(multiple-value-bind (file pos) (ignore-errors (si:bc-file obj))
(if (and file pos)
(make-location
- `(:file ,file)
+ `(:file ,(namestring file))
`(:position ,pos)
`(:snippet
,(with-open-file (s file)
Please sign in to comment.
Something went wrong with that request. Please try again.