summaryrefslogtreecommitdiff
path: root/elisp/geiser-mode.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-10-01 23:03:41 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-10-01 23:03:41 +0200
commit8167ddb673800b43d78b6164673506e6d6fd6ef7 (patch)
treeeb05c4c63c71d4aa2737502bd894b35cb7347d35 /elisp/geiser-mode.el
parent3a6dfbf743cc56b7d454bc6c688cd983966acc6c (diff)
downloadgeiser-guile-8167ddb673800b43d78b6164673506e6d6fd6ef7.tar.gz
geiser-guile-8167ddb673800b43d78b6164673506e6d6fd6ef7.tar.bz2
Bug fix: avoiding sending unbalanced sexps in C-c C-r and friends
We were not checking that the region sent to the scheme process was balanced, resulting in said process waiting for ever on `read' (or its moral equivalent in our current implementation). We now just refuse to evaluate an improper region in the first place.
Diffstat (limited to 'elisp/geiser-mode.el')
-rw-r--r--elisp/geiser-mode.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index c0388f0..ac670b8 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -71,6 +71,9 @@ scheme buffers."
With prefix, goes to the REPL buffer afterwards (as
`geiser-eval-region-and-go')"
(interactive "rP")
+ (save-restriction
+ (narrow-to-region start end)
+ (check-parens))
(geiser-debug--send-region nil
start
end