Use "silent doautocmd" to suppress annoying "No matching autocmds" message

Signed-off-by: James McCoy <vega.james@gmail.com>
This commit is contained in:
James McCoy 2012-05-31 21:17:07 -04:00
parent 8b38e3e859
commit 70cfdc99bd

View File

@ -489,7 +489,7 @@ function s:GPGBufReadPost()
silent 1delete silent 1delete
let &undolevels = levels let &undolevels = levels
" call the autocommand for the file minus .gpg$ " call the autocommand for the file minus .gpg$
execute ':doautocmd BufReadPost ' . fnameescape(expand('<afile>:r')) silent execute ':doautocmd BufReadPost ' . fnameescape(expand('<afile>:r'))
call s:GPGDebug(2, 'called autocommand for ' . fnameescape(expand('<afile>:r'))) call s:GPGDebug(2, 'called autocommand for ' . fnameescape(expand('<afile>:r')))
call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGBufReadPost()") call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGBufReadPost()")
endfunction endfunction
@ -502,7 +502,7 @@ endfunction
function s:GPGBufWritePre() function s:GPGBufWritePre()
call s:GPGDebug(3, ">>>>>>>> Entering s:GPGBufWritePre()") call s:GPGDebug(3, ">>>>>>>> Entering s:GPGBufWritePre()")
" call the autocommand for the file minus .gpg$ " call the autocommand for the file minus .gpg$
execute ':doautocmd BufWritePre ' . fnameescape(expand('<afile>:r')) silent execute ':doautocmd BufWritePre ' . fnameescape(expand('<afile>:r'))
call s:GPGDebug(2, 'called autocommand for ' . fnameescape(expand('<afile>:r'))) call s:GPGDebug(2, 'called autocommand for ' . fnameescape(expand('<afile>:r')))
call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGBufWritePre()") call s:GPGDebug(3, "<<<<<<<< Leaving s:GPGBufWritePre()")
endfunction endfunction