summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiogo F. S. Ramos <dfsr@riseup.net>2017-04-11 12:42:23 -0300
committerJose Antonio Ortega Ruiz <jao@gnu.org>2017-04-11 19:21:07 +0200
commitac349b913616bea9c1b4f5a0f1ae06f2f83d7a20 (patch)
tree489d7b74bc0b525cc056b016abf01b2ff1906c7f
parentb75e0376942c1ee54f7d173362d4a38e665342f9 (diff)
downloadgeiser-guile-ac349b913616bea9c1b4f5a0f1ae06f2f83d7a20.tar.gz
geiser-guile-ac349b913616bea9c1b4f5a0f1ae06f2f83d7a20.tar.bz2
Eval last expression even after a comment char
Scan for beginning and end of a sexp, instead of using (point) as the end. Previously, if (point) was after a comment character, the REPL would freeze.
-rw-r--r--elisp/geiser-mode.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index aebdbce..b5c2029 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -144,8 +144,13 @@ With prefix, goes to the REPL buffer afterwards (as
With a prefix, revert the effect of `geiser-mode-eval-last-sexp-to-buffer' "
(interactive "P")
- (let* ((ret (geiser-eval-region (save-excursion (backward-sexp) (point))
- (point)
+ (let* (bosexp
+ (eosexp (save-excursion (backward-sexp)
+ (setq bosexp (point))
+ (forward-sexp)
+ (point)))
+ (ret (geiser-eval-region bosexp ;beginning of sexp
+ eosexp ;end of sexp
nil
t
print-to-buffer-p))