migrate to emacs 24 macros, fixed warnings