summaryrefslogtreecommitdiff
path: root/elisp
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
commitd08f649e8bd6ddad39a4e9d4766f88dbb5d24048 (patch)
treece15b7228fdbe21d8fa7936193c2883020511650 /elisp
parent5bf13eeeccded1d5bf087b988e4e4efeea5d9ae1 (diff)
downloadgeiser-d08f649e8bd6ddad39a4e9d4766f88dbb5d24048.tar.gz
geiser-d08f649e8bd6ddad39a4e9d4766f88dbb5d24048.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')
-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