patch for Emacs 24