From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alex Kost Newsgroups: gmane.emacs.help Subject: Re: Overriding some face attributes without changing the default(s) one(s) Date: Sun, 08 Jun 2014 10:02:56 +0400 Message-ID: <87ppikgcq7.fsf@gmail.com> References: <871tv05z88.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1402207401 32665 80.91.229.3 (8 Jun 2014 06:03:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Jun 2014 06:03:21 +0000 (UTC) Cc: Michael Heerdegen , help-gnu-emacs@gnu.org To: Alexandre LAURENT Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 08 08:03:16 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WtWCI-0008Nj-W1 for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jun 2014 08:03:15 +0200 Original-Received: from localhost ([::1]:54184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtWCI-0005ge-Jn for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jun 2014 02:03:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtWC3-0005gK-Vl for help-gnu-emacs@gnu.org; Sun, 08 Jun 2014 02:03:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WtWBz-0007gr-8L for help-gnu-emacs@gnu.org; Sun, 08 Jun 2014 02:02:59 -0400 Original-Received: from mail-la0-x22b.google.com ([2a00:1450:4010:c03::22b]:50870) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtWBz-0007f0-1c for help-gnu-emacs@gnu.org; Sun, 08 Jun 2014 02:02:55 -0400 Original-Received: by mail-la0-f43.google.com with SMTP id mc6so2438616lab.30 for ; Sat, 07 Jun 2014 23:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=olA6dfl5iBExhf6E8ZDxSDMR415ApI+xetlyNdryJU4=; b=YI01f4lMPQpDkecQO1kurGYzCBCD++LsJmvOxdUCmf7aEQwqKmYLB7nA2ylZS3l7k5 CN1WcKP6REn5ln+X3oHPfQQyU5IJqaY7ADPF78sCaiG7z2D/EGSy5mA44NnDu7LCJqo1 BR4bfjW5eNw2hflqMgn343iVm1QMXmJVOivCNSmxngCv69Qm6ygcXo4zi4y8X3B+mK9L Ce5K2haGxTWfli4FQsN6tGZkhJaIWAH4RB6gW/iMl71PkLf6ttZ3fC1dNRkwqHD5AX7Z XBC0MY1pGqrNbysdm+V2ByU+ugnrPC0iY854TRMFw3Xz52Wdi+MkgE9Lum4yY4+zsY8I PYKw== X-Received: by 10.152.199.39 with SMTP id jh7mr11752656lac.18.1402207373937; Sat, 07 Jun 2014 23:02:53 -0700 (PDT) Original-Received: from leviafan (128-70-204-134.broadband.corbina.ru. [128.70.204.134]) by mx.google.com with ESMTPSA id qx6sm14043264lbb.23.2014.06.07.23.02.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jun 2014 23:02:53 -0700 (PDT) In-Reply-To: (Alexandre LAURENT's message of "Sun, 8 Jun 2014 01:09:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22b 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:98088 Archived-At: Alexandre LAURENT (2014-06-08 03:09 +0400) wrote: > On Sat, Jun 7, 2014 at 8:52 PM, Michael Heerdegen > wrote: >> Just configure the face to use the bold attribute, and leave all other >> attributes emtpy. >> > Well, weird because that's exactly what I did but maybe not the right way. > In my case, I configure this face in a theme like this: > > (custom-theme-set-faces > 'monokai-nox > ;; ... > '(whitespace-line ((t (:weight bold)))) > ;; ... > ) > If I open a C file, for each long line, the whole line still uses the > default whitespace-line face + bold (which prevents the syntax > highlighting) > >> What you want works well for me without doing anything special. The >> `whitespace-line' face is "merged" with the normal font locking, and I >> see the colors from syntax highlighting, but in bold for long lines. >> > Good to know, I'm going to test with an empty emacs config + the > configuration of the whitespace-line face. > >> I'm not completely sure if that works in older Emacs version. > I'm using emacs 24.3.1 so this should work I suppose. The problem is that in emacs 24.3.1 default face specifications are merged with the face specifications defined by a theme, so what you see is a "bold" defined by your theme and the bits from a default spec. In emacs 24.4 (and in the current trunk) your theme would work as expected: if a face is themed, then the default spec is ignored completely. If you want to make emacs 24.3.1 display only themed faces, you have to override all the bits of the default spec in your theme (which sounds horrible IMO), so for example the following should "free" your background: (custom-theme-set-faces 'monokai-nox ;; ... '(whitespace-line ((t (:background unspecified :weight bold)))) ;; ... ) If you are interested, I wrote something about that here: Also there were some related bugs, for example: I hope it was helpful. -- Alex Kost