"plugin/*.vim" files sourced at vim startup. At vim startup no buffers exists, so ":setlocal" command do nothing. Move ":setlocal" command to s:install_plugin() function.
Example of usage: autocmd FileType html EmmetInstall | setlocal omnifunc=emmet#completeTag