help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Correct way of overriding custom-set-faces after the color-theme is load


From: Vineet Naik
Subject: Correct way of overriding custom-set-faces after the color-theme is loaded
Date: Fri, 3 Feb 2012 13:18:31 +0530

Hello,

I use the Solarized Dark theme on emacs 23. This theme defines
background color as orange for flymake error line. I wanted to change
this to DarkRed. So in my .emacs file, I added the following lines
after requiring the color theme

;; flymake error and warning faces
(custom-set-faces
 '(flymake-errline ((t (:background "DarkRed"))))
 '(flymake-warnline ((((class color)) (:background "DarkBlue")))))

This was working as expected. Today I set some customization options
using M-x customize-group and saved them due to which, emacs moved the
above lines to the top of the .emacs file resulting in the default
solalized faces to be applied to flymake error.

It also added the following comment under custom-set-faces which is
self explanatory

 ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.

I need to know what would be the correct way to manage my
customizations for the solarized theme without editing the definitions
in the theme itself and make sure they are not overwritten by
customize-*

Thanks
--
Vineet Naik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]