Mercurial > vim
diff src/message.c @ 840:2c885fab04e3 v7.0e06
updated for version 7.0e06
author | vimboss |
---|---|
date | Sat, 22 Apr 2006 22:33:57 +0000 |
parents | 1f3b1021f002 |
children | d58e3db4a7d1 |
line wrap: on
line diff
--- a/src/message.c +++ b/src/message.c @@ -529,6 +529,25 @@ msg_source(attr) } /* + * 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(s) 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)