From 88c56a06fd1d006f1d41dfce16c89da79e03bb5b Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Fri, 26 Nov 2010 23:05:34 +0100 Subject: Autodoc not interning symbols We avoid calling symbol-at-point, and keep the cached signatures with strings as keys. --- elisp/geiser-syntax.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'elisp/geiser-syntax.el') 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 -- cgit v1.2.3