summaryrefslogtreecommitdiff
path: root/elisp/geiser-guile.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2014-06-05 06:14:44 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2014-06-05 06:14:44 +0200
commit7cf34c0c92cac3039849b8be40b468d0c52d2472 (patch)
tree4cafd2872813a70f51d59a8ae3075d802357cc6a /elisp/geiser-guile.el
parentf7c97ae42913e22df4532aa820a07751a5e8c71e (diff)
downloadgeiser-guile-7cf34c0c92cac3039849b8be40b468d0c52d2472.tar.gz
geiser-guile-7cf34c0c92cac3039849b8be40b468d0c52d2472.tar.bz2
Possible fix for scanning problem
Apparently, the nesting level returned by emacs's syntax parser can be negative (presumably when it gets confused), and we were not avoiding calling backward-up-list when that happened. Could or could not address issue #41...
Diffstat (limited to 'elisp/geiser-guile.el')
-rw-r--r--elisp/geiser-guile.el4
1 files changed, 1 insertions, 3 deletions
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index fbe6075..e8eb11a 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -171,9 +171,7 @@ This function uses `geiser-guile-init-file' if it exists."
(defun geiser-guile--get-module (&optional module)
(cond ((null module)
(save-excursion
- (ignore-errors
- (while (not (zerop (geiser-syntax--nesting-level)))
- (backward-up-list)))
+ (geiser-syntax--pop-to-top)
(if (or (re-search-backward geiser-guile--module-re nil t)
(looking-at geiser-guile--library-re)
(re-search-forward geiser-guile--module-re nil t))