updated for version 7.0e06
diff --git a/src/message.c b/src/message.c
index c0146c9..08810ad 100644
--- a/src/message.c
+++ b/src/message.c
@@ -529,6 +529,25 @@
}
/*
+ * Return TRUE if not giving error messages right now:
+ * If "emsg_off" is set: no error messages at the moment.
+ * If "msg" is in 'debug': do error message but without side effects.
+ * If "emsg_skip" is set: never do error messages.
+ */
+ int
+emsg_not_now()
+{
+ if ((emsg_off > 0 && vim_strchr(p_debug, 'm') == NULL
+ && vim_strchr(p_debug, 't') == NULL)
+#ifdef FEAT_EVAL
+ || emsg_skip > 0
+#endif
+ )
+ return TRUE;
+ return FALSE;
+}
+
+/*
* emsg() - display an error message
*
* Rings the bell, if appropriate, and calls message() to do the real work
@@ -559,17 +578,8 @@
emsg_severe = FALSE;
#endif
- /*
- * If "emsg_off" is set: no error messages at the moment.
- * If "msg" is in 'debug': do error message but without side effects.
- * If "emsg_skip" is set: never do error messages.
- */
- if ((emsg_off > 0 && vim_strchr(p_debug, 'm') == NULL
- && vim_strchr(p_debug, 't') == NULL)
-#ifdef FEAT_EVAL
- || emsg_skip > 0
-#endif
- )
+ /* Skip this if not giving error messages at the moment. */
+ if (emsg_not_now())
return TRUE;
if (!emsg_off || vim_strchr(p_debug, 't') != NULL)