~ chicken-core (chicken-5) c0395ce2f1a4683e5401f7b72c09612d61590015
commit c0395ce2f1a4683e5401f7b72c09612d61590015 Author: Peter Bex <peter@more-magic.net> AuthorDate: Sun Aug 9 16:46:39 2015 +0200 Commit: Evan Hanson <evhan@foldling.org> CommitDate: Thu Aug 20 09:19:50 2015 +1200 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. Signed-off-by: Evan Hanson <evhan@foldling.org> diff --git a/csi.scm b/csi.scm index 7e48e8dc..c30714b9 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))Trap