summaryrefslogtreecommitdiff
path: root/elisp
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
commit783c68684fcdc1826a24e8aa3a299a6de41ed12c (patch)
treea186e1324c4c723b63307112b389639e4f602448 /elisp
parenta134dcaeb6d218482f5eb186eec3288571bec89f (diff)
downloadgeiser-783c68684fcdc1826a24e8aa3a299a6de41ed12c.tar.gz
geiser-783c68684fcdc1826a24e8aa3a299a6de41ed12c.tar.bz2
Silly micro-optimisitation.
Diffstat (limited to 'elisp')
-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))