diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-10-15 03:51:01 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-10-15 03:51:01 +0200 |
commit | 783c68684fcdc1826a24e8aa3a299a6de41ed12c (patch) | |
tree | a186e1324c4c723b63307112b389639e4f602448 /elisp | |
parent | a134dcaeb6d218482f5eb186eec3288571bec89f (diff) | |
download | geiser-783c68684fcdc1826a24e8aa3a299a6de41ed12c.tar.gz geiser-783c68684fcdc1826a24e8aa3a299a6de41ed12c.tar.bz2 |
Silly micro-optimisitation.
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-syntax.el | 7 |
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)) |