summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-06 20:20:57 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-06 20:20:57 +0200
commit2a540e211f05121448df37ac2fb3944c3a78a556 (patch)
tree356b4cbb12e095290f41c8398dd85be79269ab78
parent55377502cc1c71e2c791f9e2a4ba473de2bdb36f (diff)
downloadgeiser-2a540e211f05121448df37ac2fb3944c3a78a556.tar.gz
geiser-2a540e211f05121448df37ac2fb3944c3a78a556.tar.bz2
Elisp: fixes for key args display.
-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