summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-10-15 03:51:01 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-10-15 03:51:01 +0200
commit0a64ea424dcacf61d5b8ad42e1a064f27cb58e49 (patch)
tree93406d8fa671356a56206719a449750ac3788e1f
parent561fd4e8fd676a0e5b0a710d9234303673b34959 (diff)
downloadgeiser-chez-0a64ea424dcacf61d5b8ad42e1a064f27cb58e49.tar.gz
geiser-chez-0a64ea424dcacf61d5b8ad42e1a064f27cb58e49.tar.bz2
Silly micro-optimisitation.
-rw-r--r--elisp/geiser-syntax.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index 6be186a..c961105 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -202,7 +202,7 @@
(save-excursion
(geiser-syntax--skip-comment/string)
(let* ((fst (symbol-at-point))
- (path (and fst (list (list fst 0)))))
+ (path))
(while (not (zerop (geiser-syntax--nesting-level)))
(let ((boundary (1+ (point))))
(backward-up-list)
@@ -216,7 +216,10 @@
(push `(,(car form)
,len-1 ,@(and prev (symbolp prev) (list prev)))
path))))))
- (nreverse path))))
+ (let ((path (nreverse path)))
+ (if (or (not fst) (eq fst (caar path)))
+ path
+ (cons (list fst 0) path))))))
(defun geiser-syntax--scan-locals (form partial locals)
(flet ((if-symbol (x) (and (symbolp x) x))