From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vineet Naik Newsgroups: gmane.emacs.help Subject: Re: Correct way of overriding custom-set-faces after the color-theme is loaded Date: Fri, 3 Feb 2012 16:34:33 +0530 Message-ID: References: <878vkkqone.fsf@nzebook.haselwarter.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1328267097 5612 80.91.229.3 (3 Feb 2012 11:04:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Feb 2012 11:04:57 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 03 12:04:56 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RtGwj-0008UT-Oq for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Feb 2012 12:04:50 +0100 Original-Received: from localhost ([::1]:40521 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtGwf-000871-St for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Feb 2012 06:04:45 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:39114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtGwW-00086c-OF for help-gnu-emacs@gnu.org; Fri, 03 Feb 2012 06:04:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtGwV-0006AV-Bj for help-gnu-emacs@gnu.org; Fri, 03 Feb 2012 06:04:36 -0500 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:49814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtGwV-0006AD-2b for help-gnu-emacs@gnu.org; Fri, 03 Feb 2012 06:04:35 -0500 Original-Received: by wgbdt13 with SMTP id dt13so2869282wgb.30 for ; Fri, 03 Feb 2012 03:04:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=neUEU4UKQeM+qIGBCG1oDqA1EOkxwKsoOkhDqqt3r5k=; b=IvE6No5z/Ch76lAiTgxEpyDjGcrjCOeLe3mC2OJpYDvbgZjP8x5/6daCMWKz4Zi3zu TFS+fM0zq/102kbUS+7ZWHaROBQpfb2lkp+V8QxyjHVg06hC54/eWjdYcu3uqkxZf+xv OVV1PiH8jHYMI2WrDy9orRbmLqHqEaISmC1jQ= Original-Received: by 10.180.103.132 with SMTP id fw4mr13753241wib.3.1328267073069; Fri, 03 Feb 2012 03:04:33 -0800 (PST) Original-Received: by 10.223.103.73 with HTTP; Fri, 3 Feb 2012 03:04:33 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.49 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83615 Archived-At: On Fri, Feb 3, 2012 at 3:41 PM, Vineet Naik 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/t= hreads.html > > is there a different emacs.help list ? > > Thanks > > On Fri, Feb 3, 2012 at 2:28 PM, Philipp Haselwarter > wrote: >> two solutions come to my mind: >> >> 1) set the face attributes outside of customize, that way they won't be >> =A0 affected by customize. >> #+begin_src elisp >> =A0(set-face-background 'flymake-errline "DarkRed") >> #+end_src >> >> 2) put custom stuff into a separate file and load that at some point of >> =A0 your .emacs >> #+begin_src elisp >> =A0(load >> =A0(setq custom-file >> =A0 =A0 =A0 =A0(expand-file-name "custom.el" user-emacs-directory)) >> =A0'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. --=20 Vineet Naik