summaryrefslogtreecommitdiff
path: root/scheme/guile
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-15 01:32:31 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-15 01:32:31 +0100
commitf753d35c186ad448e70e84afbc91fb37db2fbb57 (patch)
tree579c37091f8287200b842822fb98d44921e514ed /scheme/guile
parent6fab966acd979bedcd12adacc793999e459cac52 (diff)
downloadgeiser-guile-f753d35c186ad448e70e84afbc91fb37db2fbb57.tar.gz
geiser-guile-f753d35c186ad448e70e84afbc91fb37db2fbb57.tar.bz2
Recognise empty doc string in Emacs side. Small refactorings.
Diffstat (limited to 'scheme/guile')
-rw-r--r--scheme/guile/geiser/introspection.scm11
1 files changed, 5 insertions, 6 deletions
diff --git a/scheme/guile/geiser/introspection.scm b/scheme/guile/geiser/introspection.scm
index aa1e388..19ea2df 100644
--- a/scheme/guile/geiser/introspection.scm
+++ b/scheme/guile/geiser/introspection.scm
@@ -128,23 +128,22 @@
(let* ((args (obj-args obj))
(req (and args (car args)))
(opt (and args (cadr args)))
- (signature (if args (cond ((and (not req) (not opt)) (list sym))
- ((and (not opt) req) (cons sym req))
- ((and (not req) opt) (cons sym opt))
- (else `(,sym ,@req . ,opt)))
+ (signature (if args
+ (if (not opt) `(,sym ,@req) `(,sym ,@req . ,opt))
sym))
(type (cond ((macro? obj) "A macro")
((procedure? obj) "A procedure")
((program? obj) "A compiled program")
(else "An object")))
- (modname (symbol-module sym)))
+ (modname (symbol-module sym))
+ (doc (object-documentation obj)))
(display signature)
(newline)
(display type)
(if modname (begin (display " in module ")
(display modname)))
(newline)
- (display (or (object-documentation obj) ""))))))
+ (if doc (begin (display doc)))))))
(define (docstring sym)
(with-output-to-string