summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip K <philip@warpmail.net>2020-04-06 13:04:24 +0200
committerPhilip K <philip@warpmail.net>2020-04-06 13:04:24 +0200
commitbc481f48551fbee3e22da593f3a1698b43237118 (patch)
tree2fa4148fa06d84095fd8b0eaa95e1173d52884f2
parent8b07def2de860cbb4f4a28991572fb34b45a9941 (diff)
downloadgeiser-bc481f48551fbee3e22da593f3a1698b43237118.tar.gz
geiser-bc481f48551fbee3e22da593f3a1698b43237118.tar.bz2
Chop off trailing whitespace before printing REPL result
-rw-r--r--elisp/geiser-debug.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el
index 9c652fe..971001f 100644
--- a/elisp/geiser-debug.el
+++ b/elisp/geiser-debug.el
@@ -194,7 +194,11 @@ buffer.")
(save-excursion
(goto-char (/ (+ end start) 2))
(geiser-autodoc--clean-cache))
- (unless nomsg (message "%s" res)))
+ (unless nomsg
+ (save-match-data
+ (when (string-match "\\(?:[ \t\n\r]+\\)\\'" res)
+ (setq res (replace-match "" t t res))))
+ (message "%s" res)))
(geiser-debug--display-retort (geiser-syntax--scheme-str str) ret res)
ret))