summaryrefslogtreecommitdiff
path: root/elisp/geiser-syntax.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-syntax.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-syntax.el')
-rw-r--r--elisp/geiser-syntax.el14
1 files changed, 9 insertions, 5 deletions
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