various emacs fixes