summaryrefslogtreecommitdiff
path: root/scheme/guile/geiser/xref.scm
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-07 00:23:17 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-07 00:23:17 +0200
commit8f5e58189692663901266dc83f2e2b4e47803b8d (patch)
treeaf04cbe37abec51cbf4106f06a497445904dc7a6 /scheme/guile/geiser/xref.scm
parent61edb258a45d5ad00ee907594c6dfbcd21d93485 (diff)
parent3a80af06f2b9272db379fed3b5b659ecfeeceb70 (diff)
downloadgeiser-guile-8f5e58189692663901266dc83f2e2b4e47803b8d.tar.gz
geiser-guile-8f5e58189692663901266dc83f2e2b4e47803b8d.tar.bz2
Merge branch 'devel'
Diffstat (limited to 'scheme/guile/geiser/xref.scm')
-rw-r--r--scheme/guile/geiser/xref.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/scheme/guile/geiser/xref.scm b/scheme/guile/geiser/xref.scm
index f00f724..2336fb2 100644
--- a/scheme/guile/geiser/xref.scm
+++ b/scheme/guile/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