emacs does this already ;)