summaryrefslogtreecommitdiff
path: root/elisp/geiser-autodoc.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-14 14:07:08 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-14 14:07:08 +0100
commit93b51a8d4613364e04f52f78914c0f635b681f9f (patch)
treedd45abc633a169f5e38ea2cd15b4e4f775c71aab /elisp/geiser-autodoc.el
parentcfd1fdcd949b71251157acdcb8ab92d6d0c4169c (diff)
downloadgeiser-93b51a8d4613364e04f52f78914c0f635b681f9f.tar.gz
geiser-93b51a8d4613364e04f52f78914c0f635b681f9f.tar.bz2
Small autodoc fixes.
Diffstat (limited to 'elisp/geiser-autodoc.el')
-rw-r--r--elisp/geiser-autodoc.el24
1 files changed, 13 insertions, 11 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el
index 4f4a43a..f8e682b 100644
--- a/elisp/geiser-autodoc.el
+++ b/elisp/geiser-autodoc.el
@@ -71,25 +71,27 @@ when `geiser-autodoc-display-module-p' is on."
(defvar geiser-autodoc--last-funs nil))
(defun geiser-autodoc--function-args (funs)
- (let ((pr (and (eq (car geiser-autodoc--last) (caar funs)) (car funs))))
- (if pr (geiser-autodoc--fun-args-str (car pr)
- (cdr geiser-autodoc--last)
- (cdr pr))
- (setq geiser-autodoc--last-funs funs)
- (geiser-eval--send `(:gs ((:ge arguments) ,@(mapcar (lambda (f) (list 'quote (car f)))
- funs)))
- 'geiser-autodoc--function-args-cont)
- "")))
+ (when funs
+ (let ((pr (and (eq (car geiser-autodoc--last) (caar funs)) (car funs))))
+ (if pr (geiser-autodoc--fun-args-str (car pr)
+ (cdr geiser-autodoc--last)
+ (cdr pr))
+ (setq geiser-autodoc--last-funs funs)
+ (geiser-eval--send `(:gs ((:ge arguments) ,@(mapcar (lambda (f) (list 'quote (car f)))
+ funs)))
+ 'geiser-autodoc--function-args-cont)
+ ""))))
(defun geiser-autodoc--function-args-cont (ret)
(let ((result (geiser-eval--retort-result ret)))
- (when (listp result)
+ (when (and result (listp result))
(setq geiser-autodoc--last result)
(eldoc-message
(geiser-autodoc--fun-args-str (car result)
(cdr result)
(or (cdr (assoc (car result)
- geiser-autodoc--last-funs))))))))
+ geiser-autodoc--last-funs))
+ 0))))))
(defun geiser-autodoc--insert (sym current pos)
(let ((str (format "%s" sym)))