updated for emacs23