Search code examples
macosemacsemacs24

How to reverse video by default in Emacs?


I am running Emacs 24.3.1 on Mac OS 10.9, compiled on my machine from source through MacPorts. (For good measure I also tried a 24.3 binary from emacsformacosx.com.) I can use the -r switch from the command line to get Emacs to run in reverse video, however adding a customization to my .emacs file (setq inverse-video t) or through the Emacs customization menu is having no effect. Does anyone know another way to reverse the video without running Emacs from the command line?


Solution

  • The problem is that the usual Emacs init file (~/.emacs or ~/.emacs.d/init.el) is read after the GUI is initialized, so it has no effect on reverse video. You have to stick with the command line option --reverse-video or -rv or -r.

    However, Emacs 28.1 (not yet released) adds an early init file ‘~/.emacs.d/early-init.el which is loaded before GUI is initialized, and if you put

    (add-to-list 'default-frame-alist '(reverse . t))
    (setq initial-frame-alist default-frame-alist)
    

    into it, your Emacs will start with reverse video.