[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Geiser-users] [PATCH 1/2] Eval last expression even after a comment cha
From: |
Diogo F. S. Ramos |
Subject: |
[Geiser-users] [PATCH 1/2] Eval last expression even after a comment char |
Date: |
Tue, 11 Apr 2017 12:42:23 -0300 |
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.
---
elisp/geiser-mode.el | 9 +++++++--
1 file 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))
--
2.1.4
- [Geiser-users] [PATCH 1/2] Eval last expression even after a comment char,
Diogo F. S. Ramos <=