emacs: various small changes and cleanups