Compatible with emacs 24.1 and 24.2