rewrite setting to use Emacs24