a slimmer version of my emacs_d