summaryrefslogtreecommitdiff
path: root/elisp
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
commit88c56a06fd1d006f1d41dfce16c89da79e03bb5b (patch)
tree740ff97b8941b6da015ee5095be2584dabdc677b /elisp
parent775b81c9be65b71a1d3090d5b80398a82ffc54f2 (diff)
downloadgeiser-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')
-rw-r--r--elisp/geiser-autodoc.el19
-rw-r--r--elisp/geiser-syntax.el14
2 files changed, 20 insertions, 13 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))))
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index 2bfc1c7..ae1c3dd 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -232,8 +232,10 @@ implementation-specific entries for font-lock-keywords.")
(defsubst geiser-syntax--symbol-at-point ()
(and (not (nth 8 (syntax-ppss)))
- (let ((s (symbol-at-point)))
- (and (not (eq s '.)) s))))
+ (let ((s (thing-at-point 'symbol)))
+ (and s
+ (not (equal s "."))
+ (make-symbol (substring-no-properties s))))))
(defsubst geiser-syntax--skip-comment/string ()
(let ((pos (nth 8 (syntax-ppss))))
@@ -256,8 +258,9 @@ implementation-specific entries for font-lock-keywords.")
(skip-syntax-forward "-<>")
(when (<= (point) boundary)
(forward-sexp)
- (let ((s (symbol-at-point)))
- (when (not (eq s '.)) (push s elems))))))
+ (let ((s (thing-at-point 'symbol)))
+ (cond ((not s) (push s elems))
+ ((not (equal "." s)) (push (make-symbol s) elems)))))))
(nreverse elems)))))
(defun geiser-syntax--scan-sexps (&optional begin)
@@ -276,7 +279,8 @@ implementation-specific entries for font-lock-keywords.")
(prev (and (> pos 1) (nth (1- pos) form)))
(prev (and (keywordp prev) (list prev))))
(push `(,(car form) ,pos ,@prev) path)))))))
- (nreverse path)))
+ (mapcar (lambda (e) (cons (format "%s" (car e)) (cdr e)))
+ (nreverse path))))
(defsubst geiser-syntax--binding-form-p (bfs sbfs f)
(or (memq f '(define define* define-syntax define-syntax-rule