summaryrefslogtreecommitdiff
path: root/src/ex_eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-12-09 21:34:53 +0000
committerBram Moolenaar <Bram@vim.org>2004-12-09 21:34:53 +0000
commit293ee4d421cd55f4a3c014c1c26edf02f718cc83 (patch)
treeae4856e718b752ea0c6c807912bfbb51967fae80 /src/ex_eval.c
parent741b07e0092eb6d7b81c9cbe149196c6cf9d5bbe (diff)
downloadvim-git-293ee4d421cd55f4a3c014c1c26edf02f718cc83.tar.gz
updated for version 7.0021v7.0021
Diffstat (limited to 'src/ex_eval.c')
-rw-r--r--src/ex_eval.c55
1 files changed, 32 insertions, 23 deletions
diff --git a/src/ex_eval.c b/src/ex_eval.c
index 8be11e13b..e2699bc74 100644
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -1820,19 +1820,25 @@ ex_endtry(eap)
}
/*
- * Function to be called before a failed command invokes a sequence of
- * autocommands for cleanup. (Failure means here that a call to emsg() has
- * been made, an interrupt occurred, or there is an uncaught exception from a
- * previous autocommand execution of the same command.) This function works a
- * bit like ex_finally() except that there was not actually an extra try block
- * around the part that failed and an error or interrupt has not (yet) been
- * converted to an exception. This function saves the
- * error/interrupt/exception state and prepares for the call to do_cmdline()
- * that is going to be made for the cleanup autocommand execution.
+ * enter_cleanup() and leave_cleanup()
*
- * Stores the pending error/interrupt/exception state in the cleanup_T
- * structure pointed to by "csp", which has to be passed as an argument to
- * leave_cleanup() after the autocommand execution has finished.
+ * Functions to be called before/after invoking a sequence of autocommands for
+ * cleanup for a failed command. (Failure means here that a call to emsg()
+ * has been made, an interrupt occurred, or there is an uncaught exception
+ * from a previous autocommand execution of the same command.)
+ *
+ * Call enter_cleanup() with a pointer to a cleanup_T and pass the same
+ * pointer to leave_cleanup(). The cleanup_T structure stores the pending
+ * error/interrupt/exception state.
+ */
+
+/*
+ * This function works a bit like ex_finally() except that there was not
+ * actually an extra try block around the part that failed and an error or
+ * interrupt has not (yet) been converted to an exception. This function
+ * saves the error/interrupt/ exception state and prepares for the call to
+ * do_cmdline() that is going to be made for the cleanup autocommand
+ * execution.
*/
void
enter_cleanup(csp)
@@ -1883,16 +1889,19 @@ enter_cleanup(csp)
}
/*
- * Function to be called after a failed command invoked a sequence of
- * autocommands for cleanup. It is a bit like ex_endtry() except that there
- * was not actually an extra try block around the part that failed and an
- * error or interrupt had not (yet) been converted to an exception when the
- * cleanup autocommand sequence was invoked. This function has to be called
- * with the address of the cleanup_T structure filled by enter_cleanup() as an
- * argument; it restores the error/interrupt/exception state saved by that
- * function - except there was an aborting error, an interrupt or an uncaught
- * exception during execution of the cleanup autocommands. In the latter
- * case, the saved error/interrupt/ exception state is discarded.
+ * See comment above enter_cleanup() for how this function is used.
+ *
+ * This function is a bit like ex_endtry() except that there was not actually
+ * an extra try block around the part that failed and an error or interrupt
+ * had not (yet) been converted to an exception when the cleanup autocommand
+ * sequence was invoked.
+ *
+ * This function has to be called with the address of the cleanup_T structure
+ * filled by enter_cleanup() as an argument; it restores the error/interrupt/
+ * exception state saved by that function - except there was an aborting
+ * error, an interrupt or an uncaught exception during execution of the
+ * cleanup autocommands. In the latter case, the saved error/interrupt/
+ * exception state is discarded.
*/
void
leave_cleanup(csp)
@@ -1959,7 +1968,7 @@ leave_cleanup(csp)
/* Report if required by the 'verbose' option or when debugging. */
report_resume_pending(pending,
- (pending & CSTP_THROW) ? (void *)current_exception : NULL);
+ (pending & CSTP_THROW) ? (void *)current_exception : NULL);
}
}