[emacs] look: refactoring highlight 'warnings' for some modes.

Set a list of specific modes and loop on it with a map and a dedicated
function.