[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-gauche 0de6385 025/119: Finish key argument handlin
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-gauche 0de6385 025/119: Finish key argument handling in autodoc |
Date: |
Sun, 1 Aug 2021 18:27:50 -0400 (EDT) |
branch: elpa/geiser-gauche
commit 0de6385289a007f78cb9a6640416785421e72991
Author: András Simonyi <andras.simonyi@gmail.com>
Commit: András Simonyi <andras.simonyi@gmail.com>
Finish key argument handling in autodoc
---
geiser.scm | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/geiser.scm b/geiser.scm
index 3ea5b47..58c4a40 100644
--- a/geiser.scm
+++ b/geiser.scm
@@ -34,12 +34,17 @@
(cons (car dl) (dotted-list-head (cdr dl)))
(list (car dl))))
-;; Get the first leaf of a tree
+;; Replace the first leaf of a tree with a coloned version
(define (get-first-leaf tree)
(if (pair? tree)
(get-first-leaf (car tree))
tree))
+;; Return coloned version of symbol
+(define (coloned-sym sym)
+ (if (string-prefix? ":" (symbol->string sym))
+ sym
+ (symbol-append ': sym)))
(define (geiser:macroexpand form . rest)
@@ -121,17 +126,20 @@
(let ((required '("required"))
(optional '("optional"))
(key '("key"))
- (section :required))
+ (section :required)
+ (arg-no 0))
(dolist (x arg-info)
(if (memq x '(:optional :key :rest))
(set! section x)
- (case section
- ((:optional) (push! optional x))
- ((:key) (push! key
- (let1 sym (get-first-leaf x)
- (symbol-append ': sym))))
- ((:rest) (push! required "..."))
- (else (push! required x)))))
+ (begin
+ (inc! arg-no)
+ (case section
+ ((:optional) (push! optional x))
+ ((:key) (push! key
+ (cons (coloned-sym (get-first-leaf x))
+ arg-no)))
+ ((:rest) (push! required "..."))
+ (else (push! required x))))))
(map (cut reverse <>)
(list required optional key))))
- [nongnu] elpa/geiser-gauche 26e3c14 105/119: Change minimum required Gauche version to 9.9, (continued)
- [nongnu] elpa/geiser-gauche 26e3c14 105/119: Change minimum required Gauche version to 9.9, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 8908ad8 108/119: Lower require minimal version to 0.9.6, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche b10594b 042/119: Fixes and logging, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 30f4558 052/119: Fix no-values, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 429ad45 055/119: Add special handling for compile-file in the elisp eval proc, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 72f5107 054/119: Minor fixes, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche b702719 057/119: Simplify elisp-side eval, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche bdd8976 017/119: First version with working autocomplete, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 94546ce 016/119: Add ^_ to the keyword lists, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 32b94a9 008/119: Remove diagnostic message, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 0de6385 025/119: Finish key argument handling in autodoc,
Philip Kaludercic <=
- [nongnu] elpa/geiser-gauche dc40919 026/119: Correct a comment, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 652927a 041/119: Pass the module as a last argument to geiser: functions, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 698a685 038/119: Fix eval and compile, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 8adaf75 037/119: Improvements, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 5d8264b 033/119: Add (commented out) debugging logging of commands in *scratch*, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche a90a648 032/119: Implement module location, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 558a52e 034/119: Fix module-re, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 530f4f2 040/119: Add rest arguments to all geiser: procedures, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 206f5be 045/119: Lots of cleanups, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 6110849 067/119: Add dash to module name regex, Philip Kaludercic, 2021/08/01