From 0a64ea424dcacf61d5b8ad42e1a064f27cb58e49 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Thu, 15 Oct 2009 03:51:01 +0200 Subject: Silly micro-optimisitation. --- elisp/geiser-syntax.el | 7 +++++-- 1 file 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)) -- cgit v1.2.3