summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-05 15:26:37 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-05 15:26:37 +0200
commit99285f865b352ce0658cca3cd4845995af4ea71d (patch)
tree998ed2e32c09f5c2941f19ca62f982473adc16f3
parentf0ff37dc07075298043a8b5319867d355f41a773 (diff)
downloadgeiser-guile-99285f865b352ce0658cca3cd4845995af4ea71d.tar.gz
geiser-guile-99285f865b352ce0658cca3cd4845995af4ea71d.tar.bz2
Racket: better autodoc for syntax forms
-rw-r--r--elisp/geiser-completion.el3
-rw-r--r--scheme/racket/geiser/autodoc.rkt11
-rw-r--r--scheme/racket/geiser/enter.rkt3
3 files changed, 13 insertions, 4 deletions
diff --git a/elisp/geiser-completion.el b/elisp/geiser-completion.el
index b58b6be..c1d1a0f 100644
--- a/elisp/geiser-completion.el
+++ b/elisp/geiser-completion.el
@@ -85,7 +85,8 @@ terminates a current completion."
(defun geiser-completion--window-active-p ()
"Is the completion window currently active?"
(and (window-live-p geiser-completion--completions-window)
- (equal (buffer-name (window-buffer geiser-completion--completions-window))
+ (equal (buffer-name
+ (window-buffer geiser-completion--completions-window))
geiser-completion--comp-buffer)))
(defun geiser-completion--display-comp-list (completions base)
diff --git a/scheme/racket/geiser/autodoc.rkt b/scheme/racket/geiser/autodoc.rkt
index 0bb850d..ac66da9 100644
--- a/scheme/racket/geiser/autodoc.rkt
+++ b/scheme/racket/geiser/autodoc.rkt
@@ -98,10 +98,10 @@
(`(define-syntax-rule (,name . ,formals) . ,_)
(add-signature! name formals store))
(`(define-syntax ,name (syntax-rules ,specials . ,clauses))
- (for-each (lambda (c) (add-signature! name (cdar c) store))
+ (for-each (lambda (c) (add-syntax-signature! name (cdar c) store))
(reverse clauses)))
(`(define-syntax ,name (lambda ,_ (syntax-case ,_ . ,clauses)))
- (for-each (lambda (c) (add-signature! name (cdar c) store))
+ (for-each (lambda (c) (add-syntax-signature! name (cdar c) store))
(reverse clauses)))
(_ void))))
@@ -112,6 +112,13 @@
(cons (parse-formals formals)
(hash-ref store name '())))))
+(define (add-syntax-signature! name formals store)
+ (when (symbol? name)
+ (hash-set! store
+ name
+ (cons (make-signature formals '() '() #f)
+ (hash-ref store name '())))))
+
(define (parse-formals formals)
(let loop ((formals formals) (req '()) (opt '()) (keys '()))
(cond ((null? formals)
diff --git a/scheme/racket/geiser/enter.rkt b/scheme/racket/geiser/enter.rkt
index eff37f6..58be936 100644
--- a/scheme/racket/geiser/enter.rkt
+++ b/scheme/racket/geiser/enter.rkt
@@ -64,7 +64,8 @@
(get-timestamp path)
(if code
(apply append
- (map cdr (module-compiled-imports code)))
+ (map cdr
+ (module-compiled-imports code)))
null))])
(hash-set! loaded path mod))
;; Evaluate the module: