From e116d12176035a901a1214a2605392baf7afbf83 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Sun, 9 Aug 2015 16:46:39 +0200 Subject: [PATCH] Do not override ##sys#quit-hook in csi This is not needed; the "repl" procedure already overrides it anyway. The old behaviour seems to have been that this (incorrectly!) created a "local" ##sys#quit-hook in csi which ",q" would invoke, ignoring the global one. However, it's fine to simply call the default quit hook. Instead of directly calling ##sys#quit-hook (which has a different signature than the aforementioned "local" quit-hook), we now call the official API: "quit". This has an optional argument, so it won't bomb out like ",q" did before this patch. --- csi.scm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/csi.scm b/csi.scm index 7e48e8d..c30714b 100644 --- a/csi.scm +++ b/csi.scm @@ -338,7 +338,7 @@ EOF [xn (eval n)] ) (dump xe xn) ) ) ((r) (report)) - ((q) (##sys#quit-hook)) + ((q) (quit)) ((l) (let ((fns (string-split (read-line)))) (for-each load fns) @@ -1103,10 +1103,7 @@ EOF (do ([args args (cdr args)]) ((null? args) (unless batch - (call/cc - (lambda (k) - (set! ##sys#quit-hook (lambda _ (k #f))) - (repl csi-eval))) + (repl csi-eval) (##sys#write-char-0 #\newline ##sys#standard-output) ) ) (let* ((arg (car args))) (cond ((member arg simple-options)) -- 2.1.4