Run prog-mode hooks in erlang