summaryrefslogtreecommitdiff
path: root/scheme
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-14 20:52:27 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-14 20:52:27 +0100
commit5ee2ae3ccd73f5dfae68db011c581f918eea8751 (patch)
treec121a321d93bdc852ac99051be4c78b11db92348 /scheme
parent13d84e514446438f0115585f3a14e36f535e2225 (diff)
downloadgeiser-chez-5ee2ae3ccd73f5dfae68db011c581f918eea8751.tar.gz
geiser-chez-5ee2ae3ccd73f5dfae68db011c581f918eea8751.tar.bz2
New command to get docstrings (C-cC-d).
Diffstat (limited to 'scheme')
-rw-r--r--scheme/guile/geiser/emacs.scm3
-rw-r--r--scheme/guile/geiser/introspection.scm5
2 files changed, 7 insertions, 1 deletions
diff --git a/scheme/guile/geiser/emacs.scm b/scheme/guile/geiser/emacs.scm
index 79da237..1458c73 100644
--- a/scheme/guile/geiser/emacs.scm
+++ b/scheme/guile/geiser/emacs.scm
@@ -29,7 +29,8 @@
ge:completions
ge:symbol-location
ge:compile-file
- ge:load-file)
+ ge:load-file
+ ge:docstring)
#:use-module ((geiser introspection)
:renamer (symbol-prefix-proc 'ge:))
#:use-module ((geiser eval)
diff --git a/scheme/guile/geiser/introspection.scm b/scheme/guile/geiser/introspection.scm
index cd48740..14cd021 100644
--- a/scheme/guile/geiser/introspection.scm
+++ b/scheme/guile/geiser/introspection.scm
@@ -28,6 +28,7 @@
#:export (arguments completions symbol-location docstring)
#:use-module (system vm program)
#:use-module (ice-9 session)
+ #:use-module (ice-9 documentation)
#:use-module (srfi srfi-1))
(define (arguments sym . syms)
@@ -118,4 +119,8 @@
(define (make-location-from-module-name name)
(make-location (module-filename name) #f))
+
+(define (docstring sym)
+ (object-documentation (symbol->obj sym)))
+
;;; introspection.scm ends here