diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-26 23:05:34 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-26 23:05:34 +0100 |
commit | 88c56a06fd1d006f1d41dfce16c89da79e03bb5b (patch) | |
tree | 740ff97b8941b6da015ee5095be2584dabdc677b /elisp/geiser-autodoc.el | |
parent | 775b81c9be65b71a1d3090d5b80398a82ffc54f2 (diff) | |
download | geiser-guile-88c56a06fd1d006f1d41dfce16c89da79e03bb5b.tar.gz geiser-guile-88c56a06fd1d006f1d41dfce16c89da79e03bb5b.tar.bz2 |
Autodoc not interning symbols
We avoid calling symbol-at-point, and keep the cached signatures with
strings as keys.
Diffstat (limited to 'elisp/geiser-autodoc.el')
-rw-r--r-- | elisp/geiser-autodoc.el | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el index 5612296..7c61b33 100644 --- a/elisp/geiser-autodoc.el +++ b/elisp/geiser-autodoc.el @@ -65,19 +65,22 @@ when `geiser-autodoc-display-module-p' is on." (if (not geiser-autodoc--cached-signatures) (setq missing funs) (dolist (f funs) - (let ((cf (assq f geiser-autodoc--cached-signatures))) + (let ((cf (assoc f geiser-autodoc--cached-signatures))) (if cf (push cf cached) (push f missing))))) (unless (or cached keep-cached) (geiser-autodoc--clean-cache)) (when missing - (let ((res (geiser-eval--send/result `(:eval (:ge autodoc - (quote ,missing))) - 500))) + (let* ((missing (mapcar 'make-symbol missing)) + (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)))))))) + (append (mapcar (lambda (s) + (cons (format "%s" (car s)) (cdr s))) + res) + (if keep-cached + geiser-autodoc--cached-signatures + cached)))))))) geiser-autodoc--cached-signatures))) (defun geiser-autodoc--sanitize-args (args) @@ -176,7 +179,7 @@ when `geiser-autodoc-display-module-p' is on." (p (car path)) (s)) (while (and p (not s)) - (unless (setq s (cdr (assq (car p) signs))) + (unless (setq s (cdr (assoc (car p) signs))) (setq p (car path)) (setq path (cdr path)))) (when s (geiser-autodoc--str p s)))) |