summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-07-31 03:52:08 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-07-31 03:52:08 +0200
commit88a259b78e3cf4d7ea6a95ef8540d2365df7038c (patch)
treef210943ead962fa1b8972b091f5319ac7cd10086
parent02baf409daf8922c1612e5e6ac988519cb919a92 (diff)
downloadgeiser-88a259b78e3cf4d7ea6a95ef8540d2365df7038c.tar.gz
geiser-88a259b78e3cf4d7ea6a95ef8540d2365df7038c.tar.bz2
Fix for the fix.
-rw-r--r--elisp/geiser-syntax.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index ea702a4..23f0ed3 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -218,6 +218,7 @@
(defun geiser-syntax--scan-sexps (&optional begin)
(let* ((fst (symbol-at-point))
+ (smth (or fst (not (looking-at-p "[\\s \\s)\\s>\\s<\n]"))))
(path (and fst `((,fst 0)))))
(save-excursion
(geiser-syntax--skip-comment/string)
@@ -228,7 +229,7 @@
(nth-value 0 (geiser-syntax--form-after-point boundary))))
(when (and (listp form) (car form) (symbolp (car form)))
(let* ((len (geiser-syntax--pair-length form))
- (pos (if path (1- len) len))
+ (pos (if smth (1- len) (progn (setq smth t) len)))
(prev (and (> pos 1) (nth (1- pos) form)))
(prev (and (keywordp prev) (list prev))))
(push `(,(car form) ,pos ,@prev) path)))))))