summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2018-06-26 12:35:39 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2018-06-26 12:40:52 +0100
commit1bdd966a4fbe0c8bd5bcb04dad5213e47a1534e6 (patch)
tree48e78a8389f61f51d6526cc8621212044763c313 /elisp
parenteaaf40da7405cec4b7f7ca685de7797c3ca79875 (diff)
downloadgeiser-guile-1bdd966a4fbe0c8bd5bcb04dad5213e47a1534e6.tar.gz
geiser-guile-1bdd966a4fbe0c8bd5bcb04dad5213e47a1534e6.tar.bz2
Not killing partial outputs when leaving the REPL
Since this job is done in the process sentinel, the clean up is also triggered when the Scheme process exits unexpectedly, deleting any traces the dying guy might have left. I added a flag to control the behaviour, but upon reflection the old behaviour seems wrong and i've defaulted to the new one. This one should fix #251.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-repl.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index ab101e0..f61aba5 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -1,6 +1,6 @@
;;; geiser-repl.el --- Geiser's REPL
-;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2015, 2016 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2015, 2016, 2018 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -128,6 +128,11 @@ second.
:type 'boolean
:group 'geiser-repl)
+(geiser-custom--defcustom geiser-repl-delete-last-output-on-exit-p nil
+ "Whether to delete partial outputs when the REPL's process exits."
+ :type 'boolean
+ :group 'geiser-repl)
+
(geiser-custom--defcustom geiser-repl-query-on-kill-p t
"Whether to prompt for confirmation when killing a REPL buffer with
a life process."
@@ -542,9 +547,10 @@ If SAVE-HISTORY is non-nil, save CMD in the REPL history."
(geiser-repl--on-quit)
(push pb geiser-repl--closed-repls)
(goto-char (point-max))
- (comint-kill-region comint-last-input-start (point))
+ (when geiser-repl-delete-last-output-on-exit-p
+ (comint-kill-region comint-last-input-start (point)))
(insert "\nIt's been nice interacting with you!\n")
- (insert "Press C-c C-z to bring me back.\n" ))))))
+ (insert "Press C-c C-z to bring me back.\n"))))))
(defun geiser-repl--on-kill ()
(geiser-repl--on-quit)