# HG changeset patch # User John W. Eaton # Date 1572456299 14400 # Node ID b54d6ac62fbfe399e54b776d1707a1ccab55e2c1 # Parent f6b729077ebd098d65f3c52426465b304dbf2c19 make "quit cancel" a no-op outside of finish script * interpreter.cc (interpreter::quit): Don't error if "quit cancel" appears outside of finish script. diff -r f6b729077ebd -r b54d6ac62fbf libinterp/corefcn/interpreter.cc --- a/libinterp/corefcn/interpreter.cc Sat Oct 26 11:31:05 2019 -0400 +++ b/libinterp/corefcn/interpreter.cc Wed Oct 30 13:24:59 2019 -0400 @@ -210,13 +210,12 @@ if (cancel) { + // No effect if "quit cancel" appears outside of finish script. + if (interp.executing_finish_script ()) - { - interp.cancel_quit (true); - return ovl (); - } - else - error (R"(invalid use of "cancel" option)"); + interp.cancel_quit (true); + + return ovl (); } interp.quit (exit_status, force);