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: Sat, 07 Jun 2014 10:55:08 +0400 Message-ID: <87y4x9gqer.fsf@gmail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1402124140 21157 80.91.229.3 (7 Jun 2014 06:55:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Jun 2014 06:55:40 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Alexandre LAURENT Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 07 08:55:35 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 1WtAXL-0006E8-RN for geh-help-gnu-emacs@m.gmane.org; Sat, 07 Jun 2014 08:55:31 +0200 Original-Received: from localhost ([::1]:50765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtAXK-0008Qh-Ua for geh-help-gnu-emacs@m.gmane.org; Sat, 07 Jun 2014 02:55:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtAX4-0008Hr-4u for help-gnu-emacs@gnu.org; Sat, 07 Jun 2014 02:55:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WtAWy-00086X-No for help-gnu-emacs@gnu.org; Sat, 07 Jun 2014 02:55:14 -0400 Original-Received: from mail-la0-x22c.google.com ([2a00:1450:4010:c03::22c]:52450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtAWy-00084u-Fv for help-gnu-emacs@gnu.org; Sat, 07 Jun 2014 02:55:08 -0400 Original-Received: by mail-la0-f44.google.com with SMTP id hr17so2065790lab.17 for ; Fri, 06 Jun 2014 23:55:06 -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=NSNBXQwnfR2uZHx2VBUbw7pxRqNQ71k/2NAp1xa9w2A=; b=hfg/4qLcLlGxNmUSMFT2TF2PSnJWssG7t0wWd48eGEZzauk5AlmOv8AeypilFY1gIt 8DBonzBZiEObf69RZaLfDiSX4HUjTFGLi6V8xTbm8qCV1JSvQjr0aDIAnScuN36on7aT HpJ9nPa2GEofC0Au4YV/Jk0jEHGIzaa0cfflYP3+pjFCccTBWmzM33rajY0PnuD1N3lf 09xcvoyf1TAfPR2B2xC7gwgTZNodqRW6lRcY1H2qC6n/bVMkFVTedgllycL6OxCDcJFM G6RMcc3Vp4otuFHZS216fT7DfN2dhLtuBwz7kjCo5lUoAvi6TMIodkNJTQKsZZCpFoI3 HQDg== X-Received: by 10.152.18.133 with SMTP id w5mr181447lad.60.1402124106327; Fri, 06 Jun 2014 23:55:06 -0700 (PDT) Original-Received: from leviafan (128-70-204-134.broadband.corbina.ru. [128.70.204.134]) by mx.google.com with ESMTPSA id of9sm11159281lbb.4.2014.06.06.23.55.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jun 2014 23:55:05 -0700 (PDT) In-Reply-To: (Alexandre LAURENT's message of "Fri, 6 Jun 2014 13:32:41 +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::22c 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:98067 Archived-At: Alexandre LAURENT (2014-06-06 15:32 +0400) wrote: > Hi, > > I am trying to customize the whitespace-mode face for "long" lines. > By default, a specific face is defined for long lines but it is kind > of ugly in my case. > I would actually like these lines to look the same color as usual with > weight = bold, i.e. keeping the syntax highlighting (keywords, > strings, function names, etc.), but overriding weight or underline > attributes. > > From http://www.gnu.org/software/emacs/manual/html_node/elisp/Face-Attributes.html, > it seems that setting some attributes to undefined "tells Emacs to > refer to a parent face", but not sure what the parent is in this case > anyway. > > Moreover, if I don't set foreground / background at all, these are > just resets to the default face (I suppose). > > Since there are multiple different faces for syntax highlighting, and > only one for long lines, I'm not sure that this is even possible. But > if it is, any ideas? > > Thanks, I'm not sure I understand the question, but you can customize any face like this: M-x customize-face whitespace-line or a whole group: M-x customize-group whitespace If you need to do it with elisp, try the following: (set-face-attribute 'whitespace-line nil :background 'unspecified :weight 'bold)