summaryrefslogtreecommitdiff
path: root/geiser/xref.scm
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-06-19 16:52:03 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-06-19 16:52:03 +0200
commit789248bf92f9e6431d83199d3d1c0023b9d25567 (patch)
tree4eab14f5196148c78fffec986e597a8f54f9d8cb /geiser/xref.scm
parent6590f6b8f7b767ff8dd37cd22e9a30b25c259b9f (diff)
downloadgeiser-guile-789248bf92f9e6431d83199d3d1c0023b9d25567.tar.gz
geiser-guile-789248bf92f9e6431d83199d3d1c0023b9d25567.tar.bz2
Guile: backtrace buttonization.
Diffstat (limited to 'geiser/xref.scm')
-rw-r--r--geiser/xref.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/geiser/xref.scm b/geiser/xref.scm
index f00f724..2336fb2 100644
--- a/geiser/xref.scm
+++ b/geiser/xref.scm
@@ -28,7 +28,8 @@
#:export (symbol-location
generic-methods
callers
- callees)
+ callees
+ find-file)
#:use-module (geiser utils)
#:use-module (geiser modules)
#:use-module (geiser doc)
@@ -90,4 +91,10 @@
(and obj
(map procedure-xref (procedure-callees obj)))))
+(define (find-file path)
+ (let loop ((dirs %load-path))
+ (if (null? dirs) #f
+ (let ((candidate (string-append (car dirs) "/" path)))
+ (if (file-exists? candidate) candidate (loop (cdr dirs)))))))
+
;;; xref.scm ends here