From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Boris Buliga Newsgroups: gmane.emacs.help Subject: Re: Overriding inherited face attributes Date: Wed, 28 Nov 2018 10:42:26 +0200 Message-ID: References: <87pnuqfboc.fsf@gmx.net> <83d0qpfxn9.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1543395176 27904 195.159.176.226 (28 Nov 2018 08:52:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2018 08:52:56 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 28 09:52:52 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRvaW-000797-ER for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Nov 2018 09:52:52 +0100 Original-Received: from localhost ([::1]:46586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRvcd-0003rY-2T for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Nov 2018 03:55:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRvbg-0003iE-2Q for help-gnu-emacs@gnu.org; Wed, 28 Nov 2018 03:54:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRvQc-0006Is-Kf for help-gnu-emacs@gnu.org; Wed, 28 Nov 2018 03:42:39 -0500 Original-Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]:45776) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gRvQc-0006IZ-EN for help-gnu-emacs@gnu.org; Wed, 28 Nov 2018 03:42:38 -0500 Original-Received: by mail-ot1-x333.google.com with SMTP id 32so22766377ota.12 for ; Wed, 28 Nov 2018 00:42:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=d12frosted-io.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Zp5FjO1R493xCRz1hmLK19nL+aQO6EYkbDu3kctJ0Ao=; b=xAhP2PJZMMaWB6Iwm+PJfP7ML77YFrXuR29dGBT9HoZRIZIDovNAEP9DG6mXbLmEXm pu95qyOxy139OD0iOUdcOPCGjllG81pwaqggsDmem1X1t6xW7K5JCDK2ocpjDsq7DdCt qeSRgDiaJfkuA8zpDOEzy1SHVeId4PdaqwgI8sxFNH1opOgTO+kfZb9CejXebNRX6aTr fs0CbB7u+ojnWubCy/HqIUFTCxAHWrGiWyoErqxnmvXm0ohNO5VDmprpowF8U6mqWu/s 5wVk1gOC/pEtfDAHKnFN3jeQC2ja3SD8ZifGxDHWY1KVwqHQmWB3Q18H5Ka32SNh755m jpaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Zp5FjO1R493xCRz1hmLK19nL+aQO6EYkbDu3kctJ0Ao=; b=WvjfhrsG7A6vDmojbHooo9dfTAuU+vzAoJWIIa3u3UdTwytj/ACc3NlTkpjf/LmiwC FHbC886bbJi+LYM3CC/EJ6jpVpecwivXHyerJIML6IwyRemuvrOf5tcS8qAg2TtyD8bd 6eT+A0waXwbTc/ea8fdEYbtGy+GPWIHwYl6orUYnJf+PaPEEyH+52qAlBOsIdXTTlxJa f/KIyF5XH8ozUAQQEBliX/cn9aJP0V3IE9kII6fXRLG07cfs9nwyzIH0L63Z8nrcsC8d 2XwhHWP5Ru7quAfYUJPjbkE8VSf6ytyGa/qrXXefGV0lKAmZH0t8joNZc9D/Ufh8Qu0n C4mw== X-Gm-Message-State: AA+aEWaw5EXzr45cjbkCBlF7NhGpvBu/cbS8iMPSiUIBoSxoWU5K+2YN X/czGcwpPoxurWIZukdKHSMuiolLQsxyMN4COamfOw== X-Google-Smtp-Source: AFSGD/WXoXXgqMp+wn8uDdKlVSRBC9qiSsogt27j2+O6MdhlGSxvkcledTcIF1ae8TLfDjf+p4+3d+GZmLqGYVEK0Sc= X-Received: by 2002:a9d:830:: with SMTP id 45mr1203137oty.105.1543394557470; Wed, 28 Nov 2018 00:42:37 -0800 (PST) In-Reply-To: <83d0qpfxn9.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::333 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:118786 Archived-At: Eli, > Isn't the second example simply wrong syntax-wise? Why did you use an > extra level of parentheses? No, it's totally valid. Built Emacs from the master a month ago. I did it to replicate the exact result of add-face-text-property example. On Wed, 28 Nov 2018 at 09:51, Eli Zaretskii wrote: > > From: Boris Buliga > > Date: Wed, 28 Nov 2018 09:39:29 +0200 > > Cc: help-gnu-emacs@gnu.org > > > > > (propertize "hello" 'face '(:foreground "red" :inherit (:foreground > > "orange"))) > > #("hello" 0 5 (face (:foreground "red" :inherit (:foreground > "orange")))) > > ;; results in an orange text > > > > > (propertize "hello" 'face '((:foreground "red") (:inherit > (:foreground > > "orange")))) > > #("hello" 0 5 (face ((:foreground "red") (:inherit ...)))) > > ;; results in a red text > > > > To me, it's still confusing. Why in the first example I have an orange > text > > and > > in the second one - red? > > Isn't the second example simply wrong syntax-wise? Why did you use an > extra level of parentheses? > > > 2. And there is a part saying something I don't quite understand about > > inheritance. > > > > > Attributes from inherited faces are merged into the face like an > > underlying > > > face would be, with higher priority than underlying faces. > > > > This one looks good to me. If I understand this correctly - inherited > face > > attributes behave as usual face attributes. > > They behave the same as attributes of the underlying face, but they > override the underlying face where both specify the same attributes. > > -- Cheers, Boris