Wrap quickfix autocmd in function