branch: elpa/geiser-mit
commit ddd2ba733e8274d40a26b5d6d2ee11f1bac8abe6
Author: Federico Beffa <be...@fbengineering.ch>
Commit: Federico Beffa <be...@fbengineering.ch>

    Change default evaluation environment to REPL one. Fixes issue 7
---
 src/geiser/emacs.scm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/geiser/emacs.scm b/src/geiser/emacs.scm
index 32b13ad300..dbec826f3c 100644
--- a/src/geiser/emacs.scm
+++ b/src/geiser/emacs.scm
@@ -133,10 +133,9 @@
 (define (geiser:eval module form . rest)
   rest
   (let* ((output (open-output-string))
-         (environment (package/environment (find-package (if module
-                                                             module
-                                                             '(user))
-                                                         #t)))
+         (environment (if module
+                          (package/environment (find-package module #t))
+                          (nearest-repl/environment)))
          (result (with-output-to-port output
                    (lambda ()
                      (eval form environment)))))

Reply via email to