Mac – How to change the background colour of a single emacs buffer

colorsemacsthemes

I want to make SQL interactive buffers that are connected to production DBs very, very obvious, so my thought was to change the background of the buffer to a dark red colour.

set-background-color doesn't work, though; it sets the colour of all frames to the specified colour.

How can I change the background of just a single buffer?

Best Answer

I've created a emacs lisp package for this: https://github.com/vic/color-theme-buffer-local it uses Emacs' Face remapping to install theme faces locally.


(require 'color-theme-buffer-local)
(add-hook 'java-mode-hook (lambda nil (color-theme-buffer-local 'color-theme-robin-hood (current-buffer)) ))

Related Question