branch: externals/poke
commit f0e70059f259b5b96e453a5c56835672bd51bea1
Author: Jose E. Marchesi <[email protected]>
Commit: Jose E. Marchesi <[email protected]>
poke.el: emit poke output in the minibuffer if no repl mark is found
2022-03-22 Jose E. Marchesi <[email protected]>
* emacs/poke.el (poke-repl-end-of-iteration): Echo output in the
minibuffer instead of the repl buffer if no repl mark is found.
---
poke.el | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/poke.el b/poke.el
index 440649627d..c0f7d03707 100644
--- a/poke.el
+++ b/poke.el
@@ -794,14 +794,17 @@ fun plet_elval = (string s) void:
(with-current-buffer "*poke-repl*"
(let ((buffer-read-only nil))
(save-excursion
- (re-search-backward
- (regexp-quote (concat "-prv-"))
- nil t)
- (delete-region (point) (line-end-position))
- (if (> (length valstring) 0)
- (insert valstring)
- (unless (equal (point) (point-max))
- (delete-char 1)))))))
+ (if
+ (re-search-backward
+ (regexp-quote (concat "-prv-"))
+ nil t)
+ (progn
+ (delete-region (point) (line-end-position))
+ (if (> (length valstring) 0)
+ (insert valstring)
+ (unless (equal (point) (point-max))
+ (delete-char 1))))
+ (message valstring))))))
(defun poke-repl-set-prompt (string)
(let ((previous-prompt poke-repl-prompt))