unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Teemu Likonen <tlikonen@iki.fi>
To: notmuch@notmuchmail.org
Cc: Jonas Bernoulli <jonas@bernoul.li>
Subject: [PATCH] Emacs: Fix notmuch-message-summary-face definition
Date: Sun, 16 Aug 2020 14:10:43 +0300	[thread overview]
Message-ID: <20200816111043.15939-1-tlikonen@iki.fi> (raw)

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.

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

             reply	other threads:[~2020-08-16 11:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-16 11:10 Teemu Likonen [this message]
2020-08-16 13:51 ` [PATCH] Emacs: Fix notmuch-message-summary-face definition Jonas Bernoulli
2020-08-16 17:13   ` [PATCH v2] " Teemu Likonen
2020-08-22 12:51     ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200816111043.15939-1-tlikonen@iki.fi \
    --to=tlikonen@iki.fi \
    --cc=jonas@bernoul.li \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).