summaryrefslogtreecommitdiff
path: root/elisp/geiser-autodoc.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp/geiser-autodoc.el')
-rw-r--r--elisp/geiser-autodoc.el25
1 files changed, 9 insertions, 16 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el
index 8222e0b..a338bb9 100644
--- a/elisp/geiser-autodoc.el
+++ b/elisp/geiser-autodoc.el
@@ -90,21 +90,11 @@ when `geiser-autodoc-display-module-p' is on."
(t '("..."))))
(defun geiser-autodoc--format-arg (a)
- (cond ((null a) "()")
- ((symbolp a) (format "%s" a))
- ((equal a "...") "...")
- ((stringp a) (format "%S" a))
- ((and (listp a) (keywordp (car a)))
+ (cond ((and (listp a) (geiser-syntax--keywordp (car a)))
(if (and (cdr a) (listp (cdr a)))
- (format "(#%s %s)" (car a) (geiser-autodoc--format-arg (cadr a)))
+ (format "(#%s %s)" (car a) (geiser-syntax--display (cadr a)))
(format "(#%s)" (car a))))
- ((and (listp a) (eq (car a) 'quote))
- (format "'%s" (geiser-autodoc--format-arg (cadr a))))
- ((listp a) (format "(%s)"
- (mapconcat 'geiser-autodoc--format-arg
- (geiser-autodoc--sanitize-args a)
- " ")))
- (t (format "%s" a))))
+ (t (geiser-syntax--display a))))
(defun geiser-autodoc--insert-arg-group (args current &optional pos)
(when args (insert " "))
@@ -115,9 +105,9 @@ when `geiser-autodoc-display-module-p' is on."
(numberp current)
(setq current (1+ current))
(= (1+ pos) current))
- (and (keywordp current)
+ (and (geiser-syntax--keywordp current)
(listp a)
- (eq current (car a))))
+ (geiser-syntax--symbol-eq current (car a))))
(put-text-property p (point)
'face 'geiser-font-lock-autodoc-current-arg)
(setq pos nil current nil)))
@@ -129,7 +119,10 @@ when `geiser-autodoc-display-module-p' is on."
(let ((cpos 1)
(reqs (cdr (assoc "required" args)))
(opts (mapcar (lambda (a)
- (if (and (symbolp a) (not (eq a '...))) (list a) a))
+ (if (and (symbolp a)
+ (not (equal (symbol-name a) "...")))
+ (list a)
+ a))
(cdr (assoc "optional" args))))
(keys (cdr (assoc "key" args))))
(setq cpos