Hi Bram,
I noticed, the :helpgrep command does not execute QuickFix autocommands, 
although it uses the Quickfix list. I am not sure, if this is being done 
on purpose, but here is a patch, that enable the autocommands for the 
:helpgrep commands

regards,
Christian

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -699,7 +699,8 @@
 QuickFixCmdPre			Before a quickfix command is run (|:make|,
 				|:lmake|, |:grep|, |:lgrep|, |:grepadd|,
 				|:lgrepadd|, |:vimgrep|, |:lvimgrep|,
-				|:vimgrepadd|, |:lvimgrepadd|, |:cscope|).
+				|:vimgrepadd|, |:lvimgrepadd|, |:cscope|,
+				|:helpgrep|).
 				The pattern is matched against the command
 				being run.  When |:grep| is used but 'grepprg'
 				is set to "internal" it still matches "grep".
diff --git a/src/quickfix.c b/src/quickfix.c
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -3885,6 +3885,24 @@
     /* Check for a specified language */
     lang = check_help_lang(eap->arg);
 #endif
+#ifdef FEAT_AUTOCMD
+    char_u	*au_name =  NULL;
+
+    switch (eap->cmdidx)
+    {
+	case CMD_helpgrep:     au_name = (char_u *)"helpgrep"; break;
+	case CMD_lhelpgrep:    au_name = (char_u *)"lhelpgrep"; break;
+	default: break;
+    }
+
+    if (au_name != NULL)
+    {
+	apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name,
+					       curbuf->b_fname, TRUE, curbuf);
+	if (did_throw || force_abort)
+	    return;
+    }
+#endif
 
     if (eap->cmdidx == CMD_lhelpgrep)
     {
@@ -4034,6 +4052,12 @@
     qf_update_buffer(qi);
 #endif
 
+#ifdef FEAT_AUTOCMD
+    if (au_name != NULL)
+	apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name,
+					       curbuf->b_fname, TRUE, curbuf);
+#endif
+
     /* Jump to first match. */
     if (qi->qf_lists[qi->qf_curlist].qf_count > 0)
 	qf_jump(qi, 0, 0, FALSE);

Raspunde prin e-mail lui