summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elisp/geiser-doc.el4
-rw-r--r--scheme/guile/geiser/introspection.scm11
2 files changed, 7 insertions, 8 deletions
diff --git a/elisp/geiser-doc.el b/elisp/geiser-doc.el
index 7113b25..9dcb951 100644
--- a/elisp/geiser-doc.el
+++ b/elisp/geiser-doc.el
@@ -51,8 +51,8 @@ With prefix argument, ask for symbol (with completion)."
(geiser-completion--read-symbol "Symbol: " (symbol-at-point)))))
(when symbol
(let ((ds (geiser-doc--get-docstring symbol)))
- (if (not (stringp ds))
- (message "No docstring available for '%s'" symbol)
+ (if (or (not (stringp ds)) (zerop (length ds)))
+ (message "No documentation available for '%s'" symbol)
(geiser-doc--with-buffer
(erase-buffer)
(insert ds))
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