summaryrefslogtreecommitdiff
path: root/elisp
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
parent636318cf4c3a6ced1bcdd88ec278adc6a3a7c8fb (diff)
downloadgeiser-4257f514dff18d5dfbc35e75e7ad049b506002d6.tar.gz
geiser-4257f514dff18d5dfbc35e75e7ad049b506002d6.tar.bz2
Autodoc: clean cache upon evaluation
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-autodoc.el6
-rw-r--r--elisp/geiser-compile.el7
-rw-r--r--elisp/geiser-debug.el2
-rw-r--r--elisp/geiser-reload.el2
4 files changed, 12 insertions, 5 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)))
diff --git a/elisp/geiser-compile.el b/elisp/geiser-compile.el
index 8260b34..41ca4bd 100644
--- a/elisp/geiser-compile.el
+++ b/elisp/geiser-compile.el
@@ -1,6 +1,6 @@
;; geiser-compile.el -- compile/load scheme files
-;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -12,6 +12,7 @@
(require 'geiser-debug)
+(require 'geiser-autodoc)
(require 'geiser-eval)
(require 'geiser-base)
@@ -38,8 +39,10 @@
(path (cdr b/p))
(msg (format "%s %s ..." msg path)))
(message msg)
+ (geiser-autodoc--clean-cache)
(geiser-compile--display-result
- msg (geiser-eval--send/wait `(,(if compile-p :comp-file :load-file) ,path)))))
+ msg (geiser-eval--send/wait
+ `(,(if compile-p :comp-file :load-file) ,path)))))
;;; User commands:
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el
index 4c1f93e..909dffb 100644
--- a/elisp/geiser-debug.el
+++ b/elisp/geiser-debug.el
@@ -11,6 +11,7 @@
+(require 'geiser-autodoc)
(require 'geiser-impl)
(require 'geiser-eval)
(require 'geiser-menu)
@@ -103,6 +104,7 @@ non-null value.")
(ret (geiser-eval--send/wait code))
(res (geiser-eval--retort-result-str ret))
(err (geiser-eval--retort-error ret)))
+ (geiser-autodoc--clean-cache)
(when and-go (funcall and-go))
(when (not err) (message "%s" res))
(geiser-debug--display-retort str ret res)))
diff --git a/elisp/geiser-reload.el b/elisp/geiser-reload.el
index 0e52083..d6c72fd 100644
--- a/elisp/geiser-reload.el
+++ b/elisp/geiser-reload.el
@@ -26,13 +26,13 @@
geiser-repl
geiser-xref
geiser-doc
+ geiser-compile
geiser-debug
geiser-impl
geiser-company
geiser-edit
geiser-completion
geiser-autodoc
- geiser-compile
geiser-eval
geiser-connection
geiser-syntax