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?
I put this in my .emacs file: (Running GNU Emacs 21.1.3 on x86 linux)
(set-background-color "black")
(set-foreground-color "white")
Edit / update: Works just fine for the first frame. But a new frame is opened with a white background, and black text. Have some vague recollection of separately setting the frame background/foreground colors in the past, but don't know the name of the setting.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With