updated for version 7.0173
diff --git a/src/fileio.c b/src/fileio.c
index 0cfbc22..5b083f9 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -7483,6 +7483,8 @@
  * :autocmd bufleave	     *		set tw=79 nosmartindent ic infercase
  *
  * :autocmd * *.c		show all autocommands for *.c files.
+ *
+ * Mostly a {group} argument can optionally appear before <event>.
  */
     void
 do_autocmd(arg, forceit)
@@ -8168,11 +8170,26 @@
 }
 
 #if defined(FEAT_AUTOCMD) || defined(PROTO)
+/*
+ * Return TRUE when there is a CursorHold autocommand defined.
+ */
     int
 has_cursorhold()
 {
     return (first_autopat[(int)EVENT_CURSORHOLD] != NULL);
 }
+
+/*
+ * Return TRUE if the CursorHold event can be triggered.
+ */
+    int
+trigger_cursorhold()
+{
+    return (!did_cursorhold
+	    && has_cursorhold()
+	    && !Recording
+	    && get_real_state() == NORMAL_BUSY);
+}
 #endif
 
     static int