updated for emacs 24 and capture mode