diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2017-01-17 03:34:33 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2017-01-17 03:34:33 +0100 |
commit | 2debaa8433970d215dfcd7091c8c5ca7357e864d (patch) | |
tree | 0f2217837c6525564a58ced7c9f1201a9f98c4b4 | |
parent | d3706444c52927db4b7be1415a2991241eb43ed8 (diff) | |
download | geiser-2debaa8433970d215dfcd7091c8c5ca7357e864d.tar.gz geiser-2debaa8433970d215dfcd7091c8c5ca7357e864d.tar.bz2 |
Not inserting a trailing \n when eval prefix is empty
And, on reflection, it's better we do the same thing with the ERROR
insertion...
-rw-r--r-- | elisp/geiser-mode.el | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el index 743855f..6607e86 100644 --- a/elisp/geiser-mode.el +++ b/elisp/geiser-mode.el @@ -67,7 +67,7 @@ active when `geiser-mode' is activated in a buffer." :group 'geiser-mode :type 'boolean) -(geiser-custom--defcustom geiser-mode-eval-to-buffer-prefix "" +(geiser-custom--defcustom geiser-mode-eval-to-buffer-prefix " " "When `geiser-mode-eval-last-sexp-to-buffer', the prefix string which will prepend to results" :group 'geiser-mode :type 'string) @@ -156,13 +156,11 @@ With a prefix, revert the effect of `geiser-mode-eval-last-sexp-to-buffer' " (str (geiser-eval--retort-result-str ret (when will-eval-to-buffer "")))) (cond ((not will-eval-to-buffer) str) ((string= "" str)) - (err (insert (format "\n%sERROR:%s\n" + (err (insert (format "%sERROR:%s" geiser-mode-eval-to-buffer-prefix (geiser-eval--error-str err)))) - (t (progn (push-mark) - (insert (format "%s%s\n" - geiser-mode-eval-to-buffer-prefix - str))))))) + (t (push-mark) + (insert (format "%s%s" geiser-mode-eval-to-buffer-prefix str)))))) (defun geiser-compile-definition (&optional and-go) "Compile the current definition in the Geiser REPL. |