From: Vineet Naik <naikvin@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Correct way of overriding custom-set-faces after the color-theme is loaded
Date: Fri, 3 Feb 2012 16:34:33 +0530 [thread overview]
Message-ID: <CADmbCiNGi4Mar_A+cT5gzqN3YetckCVJXrconZxDiDOq3A66FQ@mail.gmail.com> (raw)
In-Reply-To: <CADmbCiPJOAyEr+e4TKos6WBCx04A9pS7BU_Qbzu_kMo6veAn1A@mail.gmail.com>
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
next prev parent reply other threads:[~2012-02-03 11:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-03 7:48 Correct way of overriding custom-set-faces after the color-theme is loaded Vineet Naik
2012-02-03 8:58 ` Philipp Haselwarter
2012-02-03 10:11 ` Vineet Naik
2012-02-03 11:04 ` Vineet Naik [this message]
2012-02-03 11:13 ` Philipp Haselwarter
2012-02-03 15:36 ` Vineet Naik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADmbCiNGi4Mar_A+cT5gzqN3YetckCVJXrconZxDiDOq3A66FQ@mail.gmail.com \
--to=naikvin@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.