summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-05-04 20:49:20 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-05-04 20:49:20 +0200
commit41ec4384042deaf4a6093594a4dbff2958485e32 (patch)
treef6d265482ec05b1c1e6995aeddd4897120ef4537
parentcdd90c3af5a1a0fcd206293e8c8cb584b575e4f0 (diff)
downloadgeiser-chez-41ec4384042deaf4a6093594a4dbff2958485e32.tar.gz
geiser-chez-41ec4384042deaf4a6093594a4dbff2958485e32.tar.bz2
Autodoc: support for info about variables.
-rw-r--r--elisp/geiser-autodoc.el33
1 files changed, 18 insertions, 15 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el
index 6565d88..f6d36a8 100644
--- a/elisp/geiser-autodoc.el
+++ b/elisp/geiser-autodoc.el
@@ -122,21 +122,24 @@ when `geiser-autodoc-display-module-p' is on."
str))
(defun geiser-autodoc--str (signature pos module)
- (when signature
- (save-current-buffer
- (set-buffer (geiser-syntax--font-lock-buffer))
- (erase-buffer)
- (let* ((proc (car signature))
- (args (cdr signature))
- (current 1)
- (pos (if (> pos (length args)) (length args) pos)))
- (insert (format "(%s" (geiser-autodoc--proc-name proc module)))
- (dolist (a args)
- (insert " ")
- (geiser-autodoc--insert-arg a current pos)
- (setq current (1+ current)))
- (insert ")")
- (buffer-string)))))
+ (when (consp signature)
+ (let* ((proc (car signature))
+ (args (cdr signature))
+ (len (if (listp args) (length args) 0))
+ (current 1)
+ (pos (if (> pos len) len pos)))
+ (if (eq args 'variable)
+ (geiser-autodoc--proc-name proc module)
+ (save-current-buffer
+ (set-buffer (geiser-syntax--font-lock-buffer))
+ (erase-buffer)
+ (insert (format "(%s" (geiser-autodoc--proc-name proc module)))
+ (dolist (a args)
+ (insert " ")
+ (geiser-autodoc--insert-arg a current pos)
+ (setq current (1+ current)))
+ (insert ")")
+ (buffer-string))))))
;;; Autodoc function: