summaryrefslogtreecommitdiff
path: root/geiser/evaluation.scm
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-01-24 20:31:21 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-01-24 20:31:21 +0100
commit98dd4d8c8ae69b19e923387b1dfe62bfe22e6f3e (patch)
tree2f520c1e421fd5af1059b4631a51411506685cd7 /geiser/evaluation.scm
parentc709c1d7c7040ec45331444dd05025884c49ff5e (diff)
downloadgeiser-guile-98dd4d8c8ae69b19e923387b1dfe62bfe22e6f3e.tar.gz
geiser-guile-98dd4d8c8ae69b19e923387b1dfe62bfe22e6f3e.tar.bz2
Guile: Geiser now behaves correctly in buffers for unloaded modules.
Diffstat (limited to 'geiser/evaluation.scm')
-rw-r--r--geiser/evaluation.scm13
1 files changed, 10 insertions, 3 deletions
diff --git a/geiser/evaluation.scm b/geiser/evaluation.scm
index 3811153..3a834bb 100644
--- a/geiser/evaluation.scm
+++ b/geiser/evaluation.scm
@@ -1,6 +1,6 @@
;;; evaluation.scm -- evaluation, compilation and macro-expansion
-;; 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
@@ -31,10 +31,17 @@
(display-error stack (current-output-port) subr msg args rest))
(else (display (format "ERROR: ~a, args: ~a" (car args) (cdr args)))))
`(error (key . ,(car args))))
+(nested-ref the-root-module '(%app modules geiser))
+
+(define (find-module module-name)
+ (and (list? module-name)
+ (or (nested-ref the-root-module (append '(%app modules) module-name))
+ (let ((m (resolve-module module-name)))
+ (beautify-user-module! m)
+ m))))
(define (ge:compile form module-name)
- (let* ((module (or (and (list? module-name)
- (resolve-module module-name))
+ (let* ((module (or (find-module module-name)
(current-module)))
(result #f)
(captured-stack #f)