Sync with emacs-24 branch in emacs