updated for version 7.3.442
Problem: Still read modelines for ":doautocmd".
Solution: Move check for <nomodeline> to separate function.
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 83bf50c..133fa7d 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -4955,7 +4955,7 @@
map_clear(eap->cmd, eap->arg, TRUE, TRUE);
}
-#ifdef FEAT_AUTOCMD
+#if defined(FEAT_AUTOCMD) || defined(PROTO)
static void
ex_autocmd(eap)
exarg_T *eap;
@@ -4982,8 +4982,12 @@
ex_doautocmd(eap)
exarg_T *eap;
{
- (void)do_doautocmd(eap->arg, TRUE);
- do_modelines(0);
+ char_u *arg = eap->arg;
+ int call_do_modelines = check_nomodeline(&arg);
+
+ (void)do_doautocmd(arg, TRUE);
+ if (call_do_modelines) /* Only when there is no <nomodeline>. */
+ do_modelines(0);
}
#endif