diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-08-26 00:58:36 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-08-26 00:58:36 +0200 |
commit | 2f5a1cce9e66e6f931749e5d3df6fe3fb220ad1f (patch) | |
tree | dd7097a10bd75fc0cf824117169d957e21852509 /elisp/geiser-autodoc.el | |
parent | 1f933f075530a5397c6413cae307b3c372ae9a53 (diff) | |
download | geiser-guile-2f5a1cce9e66e6f931749e5d3df6fe3fb220ad1f.tar.gz geiser-guile-2f5a1cce9e66e6f931749e5d3df6fe3fb220ad1f.tar.bz2 |
Slightly faster autodoc.
Diffstat (limited to 'elisp/geiser-autodoc.el')
-rw-r--r-- | elisp/geiser-autodoc.el | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el index c2746a0..e00f6b6 100644 --- a/elisp/geiser-autodoc.el +++ b/elisp/geiser-autodoc.el @@ -70,23 +70,26 @@ when `geiser-autodoc-display-module-p' is on." (defun geiser-autodoc--get-signatures (funs &optional keep-cached) (when funs - (let ((missing) (cached)) - (if (not geiser-autodoc--cached-signatures) - (setq missing funs) - (dolist (f funs) - (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)) - (when missing - (let ((res (geiser-eval--send/result `(:eval ((:ge autodoc) - (quote ,missing))) - 500))) - (when res - (setq geiser-autodoc--cached-signatures - (append res (if keep-cached geiser-autodoc--cached-signatures cached)))))) - geiser-autodoc--cached-signatures))) + (let ((fs (assq (car funs) geiser-autodoc--cached-signatures))) + (if fs + (list fs) + (let ((missing) (cached)) + (if (not geiser-autodoc--cached-signatures) + (setq missing funs) + (dolist (f funs) + (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)) + (when missing + (let ((res (geiser-eval--send/result `(:eval ((:ge autodoc) + (quote ,missing))) + 500))) + (when res + (setq geiser-autodoc--cached-signatures + (append res (if keep-cached geiser-autodoc--cached-signatures cached)))))) + geiser-autodoc--cached-signatures))))) (defun geiser-autodoc--insert-args (args current &optional pos) (dolist (a args) |