[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-guile 0d62495 048/284: Fix autodoc support for mult
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-guile 0d62495 048/284: Fix autodoc support for multiline arities in documentation. |
Date: |
Sun, 1 Aug 2021 18:29:13 -0400 (EDT) |
branch: elpa/geiser-guile
commit 0d624953c2a5e3c999b9b36e1f777d2aa4548674
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>
Fix autodoc support for multiline arities in documentation.
---
geiser/doc.scm | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/geiser/doc.scm b/geiser/doc.scm
index f446fde..175fe19 100644
--- a/geiser/doc.scm
+++ b/geiser/doc.scm
@@ -143,9 +143,10 @@
(define (doc->args doc)
(define proc-rx "-- Scheme Procedure: ([^[\n]+)\n")
- (define proc-rx2 "-- Scheme Procedure: ([^[\n]+\\[[^\n]*(\n[\n]+]+)?)")
+ (define proc-rx2 "-- Scheme Procedure: ([^[\n]+\\[[^\n]*(\n[^\n]+\\]+)?)")
(and doc
- (let ((match (or (string-match proc-rx doc) (string-match proc-rx2
doc))))
+ (let ((match (or (string-match proc-rx doc)
+ (string-match proc-rx2 doc))))
(and match (parse-signature-string (match:substring match 1))))))
(define (parse-signature-string str)
@@ -155,11 +156,12 @@
(if (< (length tokens) 2)
'()
(let loop ((tokens (cdr tokens)) (req '()) (opt '()) (rest #f))
- (cond ((null? tokens) `((required ,@(map string->symbol (reverse!
req)))
- (optional ,@(map string->symbol (reverse!
opt)))
- ,@(if rest
- (list (cons 'rest (string->symbol
rest)))
- '())))
+ (cond ((null? tokens)
+ `((required ,@(map string->symbol (reverse! req)))
+ (optional ,@(map string->symbol (reverse! opt)))
+ ,@(if rest
+ (list (cons 'rest (string->symbol rest)))
+ '())))
((string=? "." (car tokens))
(if (not (null? (cdr tokens)))
(loop (cddr tokens) req opt (cadr tokens))
@@ -167,7 +169,10 @@
((or (string-match opt-arg-rx (car tokens))
(string-match opt-arg-rx2 (car tokens)))
=> (lambda (m)
- (loop (cdr tokens) req (cons (match:substring m 1) opt)
rest)))
+ (loop (cdr tokens)
+ req
+ (cons (match:substring m 1) opt)
+ rest)))
(else (loop (cdr tokens) (cons (car tokens) req) opt
rest)))))))
(define (generic-args gen)
- [nongnu] elpa/geiser-guile b20a784 010/284: Better arg lists., (continued)
- [nongnu] elpa/geiser-guile b20a784 010/284: Better arg lists., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile b853bac 009/284: Faster M-., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 9ff1f7e 033/284: Eval/load file in the correct module., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 441cc2a 037/284: Refactoring: local bindings discovery moved to schemeland., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile ceca3e5 038/284: Display (quote foo) as 'foo in autodoc strings., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 4ab2e9c 016/284: Autodoc: try symbol at point first. Some cleanups., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile a64467d 022/284: New command to open module file., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 8c8790c 029/284: Capture backtrace. Fix load/compile from Emacs., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 8db7920 030/284: Better stack delimitation: include only frames relevant to the eval'd expression., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile c60b2e0 035/284: Put new procedure-arguments into (geiser introspection) until it goes upstream., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 0d62495 048/284: Fix autodoc support for multiline arities in documentation.,
Philip Kaludercic <=
- [nongnu] elpa/geiser-guile 4a647eb 011/284: Faster, asynchronous autodoc., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 8cd5259 014/284: Small autodoc fixes., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 56671f6 015/284: New command to get docstrings (C-cC-d)., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile f857023 007/284: Edit symbol at point for programs., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile d0f98a7 036/284: Simpler handling of rest args in Emacs' side., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 221e64e 042/284: Some refactoring and new ge:macroexpand., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile d69ca12 044/284: Autodoc support for GOOPS methods., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 4d48077 046/284: Fix recursive require. Nicer arg names in autodoc., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 5be0195 049/284: Cache arguments parsed from documentation; don't treat quasiquote as a function., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 6ff9936 052/284: They say call/cc is slow in Guile., Philip Kaludercic, 2021/08/01