[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Correct way of overriding custom-set-faces after the color-theme is
From: |
Vineet Naik |
Subject: |
Re: Correct way of overriding custom-set-faces after the color-theme is loaded |
Date: |
Fri, 3 Feb 2012 16:34:33 +0530 |
On Fri, Feb 3, 2012 at 3:41 PM, Vineet Naik <naikvin@gmail.com> wrote:
> @Philipp - Oops, I replied back to you directly instead of the list.
> Sorry for that.
>
> I couldn't find your reply on the list besides the first one. I
> checked here -
> http://lists.gnu.org/archive/html/help-gnu-emacs/2012-02/threads.html
>
> is there a different emacs.help list ?
>
> Thanks
>
> On Fri, Feb 3, 2012 at 2:28 PM, Philipp Haselwarter
> <philipp.haselwarter@gmx.de> wrote:
>> two solutions come to my mind:
>>
>> 1) set the face attributes outside of customize, that way they won't be
>> affected by customize.
>> #+begin_src elisp
>> (set-face-background 'flymake-errline "DarkRed")
>> #+end_src
>>
>> 2) put custom stuff into a separate file and load that at some point of
>> your .emacs
>> #+begin_src elisp
>> (load
>> (setq custom-file
>> (expand-file-name "custom.el" user-emacs-directory))
>> 'noerror)
>> #+end_src
>>
>> --
>> Philipp Haselwarter
>>
>>
> --
> Vineet Naik
How do I get my changes to take effect right at the time emacs loads ?
Here is the reply I had sent to Philipp by mistake instead of replying
to the mailing list.
I tried to use the second method, but the overriden changes don't take
effect automatically on starting emacs.
But if I open .emacs file and evaluate the expression, then the
changes are seen.
Here is the code I added
#+begin_src elisp
;; in .emacs file
(setq user-emacs-dir (expand-file-name "emacs/site/common"))
(load
(setq custom-file
(expand-file-name "theme-custom.el" user-emacs-dir))
'noerror)
#+end_src
#+begin_src elisp
;; in theme-custom.el
(set-face-background 'flymake-errline "DarkRed")
(set-face-background 'flymake-warnline "DarkBlue")
#+end_src
Am I missing anything ?
Sorry if this is a dumb question to ask but my I emacs lisp knowledge
is very little.
Thanks for helping out.
--
Vineet Naik