summaryrefslogtreecommitdiff
path: root/elisp/geiser-autodoc.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-09-06 01:50:24 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-09-06 01:50:24 +0200
commit4257f514dff18d5dfbc35e75e7ad049b506002d6 (patch)
tree83a17cc39bf26c895a053662b02081b1fe3f614a /elisp/geiser-autodoc.el
parent636318cf4c3a6ced1bcdd88ec278adc6a3a7c8fb (diff)
downloadgeiser-4257f514dff18d5dfbc35e75e7ad049b506002d6.tar.gz
geiser-4257f514dff18d5dfbc35e75e7ad049b506002d6.tar.bz2
Autodoc: clean cache upon evaluation
Diffstat (limited to 'elisp/geiser-autodoc.el')
-rw-r--r--elisp/geiser-autodoc.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el
index 90295b7..628b408 100644
--- a/elisp/geiser-autodoc.el
+++ b/elisp/geiser-autodoc.el
@@ -54,6 +54,9 @@ when `geiser-autodoc-display-module-p' is on."
(make-variable-buffer-local
(defvar geiser-autodoc--cached-signatures nil))
+(defsubst geiser-autodoc--clean-cache ()
+ (setq geiser-autodoc--cached-signatures nil))
+
(defun geiser-autodoc--get-signatures (funs &optional keep-cached)
(when funs
(let ((fs (assq (car funs) geiser-autodoc--cached-signatures)))
@@ -65,8 +68,7 @@ when `geiser-autodoc-display-module-p' is on."
(let ((cf (assq f geiser-autodoc--cached-signatures)))
(if cf (push cf cached)
(push f missing)))))
- (unless (or cached keep-cached)
- (setq geiser-autodoc--cached-signatures nil))
+ (unless (or cached keep-cached) (geiser-autodoc--clean-cache))
(when missing
(let ((res (geiser-eval--send/result `(:eval ((:ge autodoc)
(quote ,missing)))