summaryrefslogtreecommitdiff
path: root/scheme
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-16 22:21:28 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-16 22:21:28 +0100
commit41d54012368ca33461fe3e8668c2b0e3052af3b8 (patch)
tree52137aa1371e7c1ec81b95508a504eabba3b0bc3 /scheme
parentfbc65dfc767da1dc3b28262eae041e9d303752c2 (diff)
downloadgeiser-chez-41d54012368ca33461fe3e8668c2b0e3052af3b8.tar.gz
geiser-chez-41d54012368ca33461fe3e8668c2b0e3052af3b8.tar.bz2
New command to open module file.
Diffstat (limited to 'scheme')
-rw-r--r--scheme/guile/geiser/emacs.scm3
-rw-r--r--scheme/guile/geiser/eval.scm6
-rw-r--r--scheme/guile/geiser/introspection.scm11
3 files changed, 12 insertions, 8 deletions
diff --git a/scheme/guile/geiser/emacs.scm b/scheme/guile/geiser/emacs.scm
index 0f7b7c7..b5ba284 100644
--- a/scheme/guile/geiser/emacs.scm
+++ b/scheme/guile/geiser/emacs.scm
@@ -32,7 +32,8 @@
ge:load-file
ge:docstring
ge:all-modules
- ge:module-children)
+ ge:module-children
+ ge:module-location)
#:use-module ((geiser introspection)
:renamer (symbol-prefix-proc 'ge:))
#:use-module ((geiser eval)
diff --git a/scheme/guile/geiser/eval.scm b/scheme/guile/geiser/eval.scm
index 0e3c7dc..a74bf29 100644
--- a/scheme/guile/geiser/eval.scm
+++ b/scheme/guile/geiser/eval.scm
@@ -26,7 +26,8 @@
(define-module (geiser eval)
#:export (eval-in comp-file load-file)
- #:use-module (srfi srfi-1))
+ #:use-module (srfi srfi-1)
+ #:no-backtrace)
(define (eval-in form module-name)
"Evals @var{form} in the module designated by @var{module-name}.
@@ -35,7 +36,8 @@ The result is a list of the form ((RESULT . <form-value>) (OUTPUT . <string>))
if no evaluation error happens, or ((ERROR (KEY . <error-key>) <error-arg>...))
in case of errors. Each error arg is a cons (NAME . VALUE), where NAME includes
SUBR, MSG and REST."
- (let ((module (or (and module-name (resolve-module module-name))
+ (let ((module (or (and (list? module-name)
+ (resolve-module module-name))
(current-module))))
(catch #t
(lambda ()
diff --git a/scheme/guile/geiser/introspection.scm b/scheme/guile/geiser/introspection.scm
index 110ab01..2021a32 100644
--- a/scheme/guile/geiser/introspection.scm
+++ b/scheme/guile/geiser/introspection.scm
@@ -30,7 +30,8 @@
symbol-location
docstring
all-modules
- module-children)
+ module-children
+ module-location)
#:use-module (system vm program)
#:use-module (ice-9 session)
#:use-module (ice-9 documentation)
@@ -114,8 +115,11 @@
(apropos-internal (string-append "^" prefix)))
string<?))
+(define (module-location name)
+ (make-location (module-filename name) #f))
+
(define (symbol-location sym)
- (cond ((symbol-module sym) => make-location-from-module-name)
+ (cond ((symbol-module sym) => module-location)
(else '())))
(define (make-location file line)
@@ -124,9 +128,6 @@
(define module-filename (@@ (ice-9 session) module-filename))
-(define (make-location-from-module-name name)
- (make-location (module-filename name) #f))
-
(define (display-docstring sym)
(let ((obj (symbol->obj sym)))
(if obj