summaryrefslogtreecommitdiff
path: root/elisp/geiser-autodoc.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-26 23:05:34 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-26 23:05:34 +0100
commit9aedb7dd472ca9d842ea2a6b9c412c66e3d2b849 (patch)
tree900711aa614238c7a7a01646655b0351b341fc40 /elisp/geiser-autodoc.el
parentb30cc842ed1a0cab0b6e68375133820478ba12bd (diff)
downloadgeiser-9aedb7dd472ca9d842ea2a6b9c412c66e3d2b849.tar.gz
geiser-9aedb7dd472ca9d842ea2a6b9c412c66e3d2b849.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.el19
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))))