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-syntax.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-syntax.el')
-rw-r--r-- | elisp/geiser-syntax.el | 14 |
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 |