[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-guile 5be0195 049/284: Cache arguments parsed from
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-guile 5be0195 049/284: Cache arguments parsed from documentation; don't treat quasiquote as a function. |
Date: |
Sun, 1 Aug 2021 18:29:14 -0400 (EDT) |
branch: elpa/geiser-guile
commit 5be0195e6ca13734477a222bfe2e93057dee421f
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>
Cache arguments parsed from documentation; don't treat quasiquote as a
function.
---
geiser/doc.scm | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/geiser/doc.scm b/geiser/doc.scm
index 175fe19..1057b89 100644
--- a/geiser/doc.scm
+++ b/geiser/doc.scm
@@ -45,7 +45,8 @@
(cond ((symbol? lst) (or (describe-application (list lst))
(describe-application form)))
((pair? lst)
- (or (and (not (eq? (car lst) 'quote)) (autodoc (pair->list
lst)))
+ (or (and (not (memq (car lst) '(quote quasiquote)))
+ (autodoc (pair->list lst)))
(autodoc (map (lambda (s) (if (pair? s) (gensym) s))
form))))
(else (describe-application form)))))
(else #f)))
@@ -109,7 +110,7 @@
((procedure-property proc 'arglist) => arglist->args)
((procedure-source proc) => source->args)
((program? proc) ((@ (system vm program) program-arguments) proc))
- ((doc->args (object-documentation proc)))
+ ((doc->args proc))
((procedure-property proc 'arity) => arity->args)
(else #f)))
@@ -141,13 +142,19 @@
(keyword . ,(caddr arglist))
(rest . ,(car (cddddr arglist)))))
-(define (doc->args doc)
+(define (doc->args proc)
(define proc-rx "-- Scheme Procedure: ([^[\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))))
- (and match (parse-signature-string (match:substring match 1))))))
+ (cond ((procedure-property proc 'geiser-document-args))
+ ((object-documentation proc)
+ => (lambda (doc)
+ (let* ((match (or (string-match proc-rx doc)
+ (string-match proc-rx2 doc)))
+ (args (and match
+ (parse-signature-string (match:substring match
1)))))
+ (set-procedure-property! proc 'geiser-document-args args)
+ args)))
+ (else #f)))
(define (parse-signature-string str)
(define opt-arg-rx "\\[([^] ]+)\\]?")
- [nongnu] elpa/geiser-guile c60b2e0 035/284: Put new procedure-arguments into (geiser introspection) until it goes upstream., (continued)
- [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, 2021/08/01
- [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 <=
- [nongnu] elpa/geiser-guile 6ff9936 052/284: They say call/cc is slow in Guile., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile a96b437 053/284: turn-on/off-geiser-mode commands added and used in scheme-mode-hook., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile d71825c 058/284: Small bug fix., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile fe48642 008/284: M-. working for any symbol whose module can be located., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 75df3b1 024/284: Better symbol documentation., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 8cb76f1 045/284: Breakdown of schemeland into neat submodules., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 7b77380 054/284: New command to display generic methods (C-cC-dg) implemented., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 33b8c53 066/284: Callers/callees (C-c <, C-c >)., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile 3398bc2 012/284: Inconsequential refactorings., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-guile af1c5a3 013/284: Small improvements., Philip Kaludercic, 2021/08/01