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
 
diff --git a/src/fileio.c b/src/fileio.c
index 6d1bbbc..a06452f 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -8740,13 +8740,7 @@
     aco_save_T	aco;
     buf_T	*buf;
     char_u	*arg = eap->arg;
-    int		call_do_modelines = TRUE;
-
-    if (STRNCMP(arg, "<nomodeline>", 12) == 0)
-    {
-	call_do_modelines = FALSE;
-	arg = skipwhite(arg + 12);
-    }
+    int		call_do_modelines = check_nomodeline(&arg);
 
     /*
      * This is a bit tricky: For some commands curwin->w_buffer needs to be
@@ -8786,6 +8780,23 @@
 }
 
 /*
+ * Check *argp for <nomodeline>.  When it is present return FALSE, otherwise
+ * return TRUE and advance *argp to after it.
+ * Thus return TRUE when do_modelines() should be called.
+ */
+    int
+check_nomodeline(argp)
+    char_u **argp;
+{
+    if (STRNCMP(*argp, "<nomodeline>", 12) == 0)
+    {
+	*argp = skipwhite(*argp + 12);
+	return FALSE;
+    }
+    return TRUE;
+}
+
+/*
  * Prepare for executing autocommands for (hidden) buffer "buf".
  * Search for a visible window containing the current buffer.  If there isn't
  * one then use "aucmd_win".
diff --git a/src/proto/fileio.pro b/src/proto/fileio.pro
index cb4012f..d65ec7c 100644
--- a/src/proto/fileio.pro
+++ b/src/proto/fileio.pro
@@ -35,6 +35,7 @@
 void do_autocmd __ARGS((char_u *arg, int forceit));
 int do_doautocmd __ARGS((char_u *arg, int do_msg));
 void ex_doautoall __ARGS((exarg_T *eap));
+int check_nomodeline __ARGS((char_u **argp));
 void aucmd_prepbuf __ARGS((aco_save_T *aco, buf_T *buf));
 void aucmd_restbuf __ARGS((aco_save_T *aco));
 int apply_autocmds __ARGS((event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf));
diff --git a/src/version.c b/src/version.c
index 9285e43..35aa34c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    442,
+/**/
     441,
 /**/
     440,