diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-09-06 01:50:24 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-09-06 01:50:24 +0200 |
commit | 43c915add421637b4db12941e6d738b8de46ff7b (patch) | |
tree | 53703c04f4b997638c589bdaa1ff960e2471ea0c /elisp | |
parent | 6c5ab9fbb37f6691395ddcc8b985819b7809cac4 (diff) | |
download | geiser-chez-43c915add421637b4db12941e6d738b8de46ff7b.tar.gz geiser-chez-43c915add421637b4db12941e6d738b8de46ff7b.tar.bz2 |
Autodoc: clean cache upon evaluation
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-autodoc.el | 6 | ||||
-rw-r--r-- | elisp/geiser-compile.el | 7 | ||||
-rw-r--r-- | elisp/geiser-debug.el | 2 | ||||
-rw-r--r-- | elisp/geiser-reload.el | 2 |
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 |