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

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

[nongnu] elpa/geiser-gauche 4195803 028/119: Prefer longest require arg


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-gauche 4195803 028/119: Prefer longest require arg list in autodoc
Date: Sun, 1 Aug 2021 18:27:51 -0400 (EDT)

branch: elpa/geiser-gauche
commit 4195803a9788618c09e2163d63f1540aa3a522b6
Author: András Simonyi <andras.simonyi@gmail.com>
Commit: András Simonyi <andras.simonyi@gmail.com>

    Prefer longest require arg list in autodoc
---
 geiser.scm | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/geiser.scm b/geiser.scm
index 4a0fc2e..21eacb6 100644
--- a/geiser.scm
+++ b/geiser.scm
@@ -85,12 +85,7 @@
   (delete-duplicates
    (remove
     (^x (or (string=? x "")
-           (string-prefix? "(" x)
-           ;; TODO check whether it is bound in the current module?
-           ;; probably needs changing this into a macro...
-           ;; (not (global-variable-bound? (current-module)
-           ;;                           (string->symbol x)))
-           ))
+           (string-prefix? "(" x)))
     (string-split
      (with-output-to-string
        (cut apropos (string->regexp (string-append "^" prefix))))
@@ -106,13 +101,13 @@
 ;;; Autodoc
 
 (define (geiser:autodoc ids . rest)
-  (concatenate
-   (map (cut gauche-info <>)
-       ids)))
+  (map (cut gauche-info <>)
+       ids))
 
 (define (gauche-info id)
-  (filter-map (cut gauche-info-in-module id <>)
-             (all-modules)))
+  (car 
+   (sort (filter-map (cut gauche-info-in-module id <>) (all-modules))
+        > (^x (length (car (cadadr x)))))))
 
 (define (gauche-info-in-module id module)
   (if (hash-table-get (module-table module) id #f)



reply via email to

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