import from emacs-tiny-tools