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: Correct way of overriding custom-set-faces after the color-theme is loaded Date: Fri, 3 Feb 2012 13:18:31 +0530 Message-ID: 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 1328255329 20490 80.91.229.3 (3 Feb 2012 07:48:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Feb 2012 07:48:49 +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 08:48:49 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 1RtDt2-0001zK-8s for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Feb 2012 08:48:48 +0100 Original-Received: from localhost ([::1]:44338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtDt1-0006fg-PE for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Feb 2012 02:48:47 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:47888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtDss-0006fL-J1 for help-gnu-emacs@gnu.org; Fri, 03 Feb 2012 02:48:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtDsn-0000lA-SE for help-gnu-emacs@gnu.org; Fri, 03 Feb 2012 02:48:38 -0500 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:52372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtDsn-0000l4-JI for help-gnu-emacs@gnu.org; Fri, 03 Feb 2012 02:48:33 -0500 Original-Received: by eaag11 with SMTP id g11so1312498eaa.0 for ; Thu, 02 Feb 2012 23:48:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=MVkELH58PNocF1gS4yO0K82WFOyqpxJCx4z8A6zBNfI=; b=A0xANEZ2ofKqXAMyRqtjvU2RW7n9HKh63Vc9HCifpl6n0FXqmnNfPnAMPw9NdO1z0w e4yS7KVjozx3ILD6a0o/buUXlEmUrhY6p07r4GlcL9lZpGbH6wA2qxYcHaCyXShLWfYi NCwEa7xATJeI7NF7OJ1uV05DB1lxWM4PeyO1s= Original-Received: by 10.213.2.132 with SMTP id 4mr2361829ebj.116.1328255311779; Thu, 02 Feb 2012 23:48:31 -0800 (PST) Original-Received: by 10.213.19.69 with HTTP; Thu, 2 Feb 2012 23:48:31 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.215.169 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:83600 Archived-At: 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 =A0'(flymake-errline ((t (:background "DarkRed")))) =A0'(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