summaryrefslogtreecommitdiff
path: root/scheme/guile/geiser
diff options
context:
space:
mode:
Diffstat (limited to 'scheme/guile/geiser')
-rw-r--r--scheme/guile/geiser/evaluation.scm6
-rw-r--r--scheme/guile/geiser/modules.scm5
-rw-r--r--scheme/guile/geiser/xref.scm6
3 files changed, 11 insertions, 6 deletions
diff --git a/scheme/guile/geiser/evaluation.scm b/scheme/guile/geiser/evaluation.scm
index 4fec3ed..cd4d6a4 100644
--- a/scheme/guile/geiser/evaluation.scm
+++ b/scheme/guile/geiser/evaluation.scm
@@ -42,10 +42,12 @@
(define (ge:compile form module-name)
(let* ((module (or (find-module module-name) (current-module)))
(result #f)
- (form `(start-stack 'geiser-evaluation-stack ,form))
(ev (lambda ()
(set! result (call-with-values
- (lambda () (compile form #:env module))
+ (lambda ()
+ (compile (start-stack
+ 'geiser-evaluation-stack form)
+ #:env module))
(lambda vs (map object->string vs)))))))
(let ((output (with-output-to-string ev)))
(write `(,(cons 'result result) (output . ,output)))
diff --git a/scheme/guile/geiser/modules.scm b/scheme/guile/geiser/modules.scm
index 3ca593e..2934603 100644
--- a/scheme/guile/geiser/modules.scm
+++ b/scheme/guile/geiser/modules.scm
@@ -1,6 +1,6 @@
;;; modules.scm -- module metadata
-;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -27,7 +27,8 @@
(lambda ()
(apropos-fold (lambda (module name var init)
(if (eq? name sym)
- (throw 'module-name (module-name module)) init))
+ (throw 'module-name (module-name module))
+ init))
#f
(regexp-quote (symbol->string sym))
(if (or (null? all) (not (car all)))
diff --git a/scheme/guile/geiser/xref.scm b/scheme/guile/geiser/xref.scm
index 54a0d9c..060bec4 100644
--- a/scheme/guile/geiser/xref.scm
+++ b/scheme/guile/geiser/xref.scm
@@ -1,6 +1,6 @@
;;; xref.scm -- cross-referencing utilities
-;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -24,7 +24,9 @@
(define (symbol-location sym)
(cond ((symbol-module sym) => module-location)
- (else '())))
+ (else (let ((obj (symbol->object sym)))
+ (or (and (program? obj) (program-location obj))
+ '())))))
(define (generic-methods sym)
(let* ((gen (symbol->object sym))