emacs: import best defuns from @rejeep