emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/geiser-guile 6f2ed87 018/284: Recognise empty doc string i


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-guile 6f2ed87 018/284: Recognise empty doc string in Emacs side. Small refactorings.
Date: Sun, 1 Aug 2021 18:29:08 -0400 (EDT)

branch: elpa/geiser-guile
commit 6f2ed8776bdba8ca7772b29132af384ebeabec07
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>

    Recognise empty doc string in Emacs side. Small refactorings.
---
 geiser/introspection.scm | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/geiser/introspection.scm b/geiser/introspection.scm
index aa1e388..19ea2df 100644
--- a/geiser/introspection.scm
+++ b/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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]