From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uFaQGvY5OV8gIwAA0tVLHw (envelope-from ) for ; Sun, 16 Aug 2020 13:51:50 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kAuFFvY5OV8FTwAA1q6Kng (envelope-from ) for ; Sun, 16 Aug 2020 13:51:50 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 99971940654 for ; Sun, 16 Aug 2020 13:51:48 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id CB88A28DE9; Sun, 16 Aug 2020 09:51:39 -0400 (EDT) Received: from mail.hostpark.net (mail.hostpark.net [212.243.197.30]) by mail.notmuchmail.org (Postfix) with ESMTPS id 3D4861FA17 for ; Sun, 16 Aug 2020 09:51:37 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id B4330160C3; Sun, 16 Aug 2020 15:51:33 +0200 (CEST) X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id EK7YfEmU4QGj; Sun, 16 Aug 2020 15:51:19 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id C3CE9160C9; Sun, 16 Aug 2020 15:51:19 +0200 (CEST) From: Jonas Bernoulli To: Teemu Likonen , notmuch@notmuchmail.org Subject: Re: [PATCH] Emacs: Fix notmuch-message-summary-face definition In-Reply-To: <20200816111043.15939-1-tlikonen@iki.fi> References: <20200816111043.15939-1-tlikonen@iki.fi> Date: Sun, 16 Aug 2020 15:51:14 +0200 Message-ID: <87tux24s31.fsf@bernoul.li> MIME-Version: 1.0 Message-ID-Hash: 3NR5LS2NNDCXMK2PBLBXPYNXEAHG6WPK X-Message-ID-Hash: 3NR5LS2NNDCXMK2PBLBXPYNXEAHG6WPK X-MailFrom: jonas@bernoul.li X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 0.53 X-TUID: vgafs+5TQpTi Teemu Likonen writes: > Emacs face definition forms are either > > ((DISPLAY . PLIST) > (DISPLAY . PLIST)) > > or > > ((DISPLAY PLIST) ;For backward compatibility. > (DISPLAY PLIST)) > > Commit a2388bc56e55da5d5695816818274f8a84b0ed92 (2020-08-08) follows > neither of the correct formats. It defines: > > `((((class color) (background light)) > ,@(and (>= emacs-major-version 27) '(:extend t)) > (:background "#f0f0f0")) > (((class color) (background dark)) > ,@(and (>= emacs-major-version 27) '(:extend t)) > (:background "#303030"))) > > which produces: > > ((DISPLAY > :extend t (:background "#f0f0f0")) > (DISPLAY > :extend t (:background "#303030"))) > > And that is wrong format. You are right. Sorry about this. It happened because in every other package I patched so far the new format was used and I didn't notice that this wasn't the case here. > This change fixes the face definition form to produce: > > ((DISPLAY > (:background "#f0f0f0" :extend t)) > (DISPLAY > (:background "#303030" :extend t))) > > which follows the (DISPLAY PLIST) format (see above). > --- > emacs/notmuch.el | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/emacs/notmuch.el b/emacs/notmuch.el > index babddbb6..16227b5c 100644 > --- a/emacs/notmuch.el > +++ b/emacs/notmuch.el > @@ -274,11 +274,9 @@ there will be called at other points of notmuch execution." > > (defface notmuch-message-summary-face > `((((class color) (background light)) > - ,@(and (>= emacs-major-version 27) '(:extend t)) > - (:background "#f0f0f0")) > + (:background "#f0f0f0" ,@(if (>= emacs-major-version 27) '(:extend t)))) > (((class color) (background dark)) > - ,@(and (>= emacs-major-version 27) '(:extend t)) > - (:background "#303030"))) > + (:background "#303030" ,@(if (>= emacs-major-version 27) '(:extend t))))) > "Face for the single-line message summary in notmuch-show-mode." > :group 'notmuch-show > :group 'notmuch-faces) > -- > 2.20.1 I would recommend that you - switch to using the new format - keep the `:extend' setting on its own line - keep the `:extend' at the beginning of the list - use `and' instead of `if' because - it is better to use `when' instead of `if' when there is no ELSE part - it is better to use `and' instead of `when` when the form is about the returned value, not some side-effect Best regards, Jonas