diff options
Diffstat (limited to 'scheme/guile')
-rw-r--r-- | scheme/guile/geiser/emacs.scm | 3 | ||||
-rw-r--r-- | scheme/guile/geiser/xref.scm | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/scheme/guile/geiser/emacs.scm b/scheme/guile/geiser/emacs.scm index edae487..2aa91da 100644 --- a/scheme/guile/geiser/emacs.scm +++ b/scheme/guile/geiser/emacs.scm @@ -39,7 +39,8 @@ ge:module-exports ge:module-location ge:callers - ge:callees) + ge:callees + ge:find-file) #:use-module (geiser evaluation) #:use-module ((geiser modules) :renamer (symbol-prefix-proc 'ge:)) #:use-module ((geiser completion) :renamer (symbol-prefix-proc 'ge:)) 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 |