diff options
author | Philip K <philip@warpmail.net> | 2020-04-06 13:04:24 +0200 |
---|---|---|
committer | Philip K <philip@warpmail.net> | 2020-04-06 13:04:24 +0200 |
commit | bc481f48551fbee3e22da593f3a1698b43237118 (patch) | |
tree | 2fa4148fa06d84095fd8b0eaa95e1173d52884f2 /elisp | |
parent | 8b07def2de860cbb4f4a28991572fb34b45a9941 (diff) | |
download | geiser-bc481f48551fbee3e22da593f3a1698b43237118.tar.gz geiser-bc481f48551fbee3e22da593f3a1698b43237118.tar.bz2 |
Chop off trailing whitespace before printing REPL result
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-debug.el | 6 |
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)) |