borrow some useful funcs from purcell/emacs.d