How can I ask Emacs to automatically use a different color theme (e.g. using the Elisp ColorTheme package) depending on the mode of the buffer?
Some color-themes work great when editing code, but not in Dired+, TERM or shell mode.
Thanks
|
|
It seems that you can't set a separate color themes for different buffers, but you can set it for different frames. You can find instructions for setting per frame color themes here http://www.emacswiki.org/emacs/ColorTheme#toc8. You can use a load-hook to automatically change the color theme when a mode is loaded, but it'll apply the change to all buffers. You can change the color theme when a mode loads using a load hook. e.g.
Edit: Here is a function that opens shell in a new frame using a different color theme:
|
|||||||||||||
|
|
The package You can mode-hook it like this: The packages are available on MELPA ( |
|||
|
|
|
I'm using zenburn colors and
didn't work for me but,
works perfectly with the version of dired+ released on 2011/01/04. |
|||||||||||||
|
|
I've faced the same problem in the past with unreadable dired buffers in terminal. As a workaround, I did M-x customize-option font-lock-maximum-decoration; you can also set the variable directly in your config file, e.g. This doesn't exactly answer the question -- I don't know if it's possible to use per-buffer or per-mode color themes -- but it might help solve the underlying problem. |
|||
|
|