added compatibilty to emacs 24
added compatibilty to emacs 24