summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elisp/geiser-autodoc.el18
1 files changed, 11 insertions, 7 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el
index 4913088..4b797fc 100644
--- a/elisp/geiser-autodoc.el
+++ b/elisp/geiser-autodoc.el
@@ -81,7 +81,11 @@ when `geiser-autodoc-display-module-p' is on."
(defun geiser-autodoc--sanitize-args (args)
(cond ((null args) nil)
((listp args)
- (cons (car args) (geiser-autodoc--sanitize-args (cdr args))))
+ (let* ((arg (car args))
+ (arg (if (and (consp arg) (eq (caar arg) ':keyword))
+ (format "(#:%s %s)" (cdar arg) (cdr arg))
+ arg)))
+ (cons arg (geiser-autodoc--sanitize-args (cdr args)))))
(t '(...))))
(defun geiser-autodoc--insert-arg-group (args current &optional pos)
@@ -115,12 +119,12 @@ when `geiser-autodoc-display-module-p' is on."
(and (not (zerop pos)) pos))))
(when opts
(insert " [")
- (setq cpos (geiser-autodoc--insert-arg-group opts cpos pos))
- (when keys
- (insert " [")
- (geiser-autodoc--insert-arg-group keys prev nil)
- (insert "]"))
- (insert "]"))))
+ (setq cpos (geiser-autodoc--insert-arg-group opts cpos pos)))
+ (when keys
+ (insert " [")
+ (geiser-autodoc--insert-arg-group keys prev nil)
+ (insert "]"))
+ (when opts (insert "]"))))
(defsubst geiser-autodoc--proc-name (proc module)
(let ((str (if module