From 4db7f46808502e3a667d442d7a77f83f4593650b Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Tue, 16 Feb 2016 00:44:33 +0100 Subject: implemented ^C command * acts like exit(3) -- ie. the program is terminated immediately but the quit hook (aka SciTECO's atexit() handlers) will still run. * for "compatibility" with classic TECOs. Can also be used as a shorter variant of "-EX$$" but working from every macro level. * disallowed in interactive mode to avoid typing it accidentally. --- doc/sciteco.1.in | 4 ++-- doc/sciteco.7.template | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/sciteco.1.in b/doc/sciteco.1.in index 0a96cab..468c060 100644 --- a/doc/sciteco.1.in +++ b/doc/sciteco.1.in @@ -69,8 +69,8 @@ macro arguments. . .LP If the munged macro does not request program termination using the -\fBEX\fP command, \*(ST will automatically switch into its graphical -\fIinteractive\fP mode. +\fBEX\fP command or exits using \fB^C\fP, \*(ST will automatically +switch into its graphical \fIinteractive\fP mode. \*(ST may be built with different graphical user interfaces, including Curses and GTK+ based ones. Eventually when the user terminates interactive mode by calling diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template index 71bc501..eab26e5 100644 --- a/doc/sciteco.7.template +++ b/doc/sciteco.7.template @@ -523,7 +523,8 @@ pressing \fB^C\fP on the attached console or by explicitly sending it. If \*(ST is not busy, .B ^C -is self-inserting and might be used as a regular command. +is self-inserting and might be typed as part of regular commands. +The \fB^C\fP command itself is disallowed in interactive mode, though. T} .TE . @@ -1034,13 +1035,15 @@ This is \*(ST's equivalent of handlers. The hook is not run when some command fails, but only when \*(ST exits normally. -This is the case when a macro specified via -\fB--eval\fP reaches the end, when a munged -file calls \fBEX\fP or when \fBEX\fP has been -called in interactive mode. -Note however that \fBEX\fP is never executed -immediately, but only requests program termination -(so it can still be rubbed out). +This is the case when control in a macro specified via +\fB--eval\fP reaches the end, or otherwise returns +(using \fB^C\fP or by returning from the top-level +macro via \fB$$\fP). +Similarily the hook is executed when a munged +file calls \fB^C\fP or \fBEX\fP has been called before +the top-level macro returns. +It is also called after the interactive mode has shut down +by calling \fBEX$$\fP. The \fBquit\fP hook will always run in \fIbatch\fP mode (after any user interface has shut down). Errors in the hook's execution will not prevent -- cgit v1.2.3