From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id GCp0HF62HV/JDAAA0tVLHw (envelope-from ) for ; Sun, 26 Jul 2020 16:59:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MEkeGF62HV8zWwAAbx9fmQ (envelope-from ) for ; Sun, 26 Jul 2020 16:59:10 +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 663E994053B for ; Sun, 26 Jul 2020 16:59:09 +0000 (UTC) Received: from [144.217.243.247] (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id F270E27C02; Sun, 26 Jul 2020 12:58:40 -0400 (EDT) Received: from mail.hostpark.net (mail.hostpark.net [212.243.197.30]) by mail.notmuchmail.org (Postfix) with ESMTPS id 9A478200A5 for ; Sun, 26 Jul 2020 12:58:23 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 996A3160BA for ; Sun, 26 Jul 2020 18:58:19 +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 VULhcMBkc5HP for ; Sun, 26 Jul 2020 18:58: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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 650D6B7A6F for ; Sun, 26 Jul 2020 18:58:19 +0200 (CEST) From: Jonas Bernoulli To: notmuch@notmuchmail.org Subject: [PATCH 10/23] emacs: Use one or three lines for 'if' forms Date: Sun, 26 Jul 2020 18:58:05 +0200 Message-Id: <20200726165818.400-11-jonas@bernoul.li> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200726165818.400-1-jonas@bernoul.li> References: <20200726165818.400-1-jonas@bernoul.li> MIME-Version: 1.0 Message-ID-Hash: BGLLAI2SGI47LUY4F7NS3LZCAVZTM4GX X-Message-ID-Hash: BGLLAI2SGI47LUY4F7NS3LZCAVZTM4GX 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.03 X-TUID: +w1O+/T7k32w Putting the COND and THEN parts on the same line but ELSE on a separate line makes it harder to determine if there actually is an ELSE part. --- emacs/notmuch-lib.el | 6 ++++-- emacs/notmuch-tag.el | 3 ++- emacs/notmuch-tree.el | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 6110e45d..fc76fd67 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -611,7 +611,8 @@ (defun notmuch--get-bodypart-raw (msg part process-crypto binaryp cache) ,@(and process-crypto '("--decrypt=true")) ,(notmuch-id-to-query (plist-get msg :id)))) (coding-system-for-read - (if binaryp 'no-conversion + (if binaryp + 'no-conversion (let ((coding-system (mm-charset-to-coding-system (plist-get part :content-charset)))) @@ -680,7 +681,8 @@ (defun notmuch-mm-display-part-inline (msg part content-type process-crypto) ;; `gnus-decoded' charset. Otherwise, we'll fetch the binary ;; part content and let mm-* decode it. (let* ((have-content (plist-member part :content)) - (charset (if have-content 'gnus-decoded + (charset (if have-content + 'gnus-decoded (plist-get part :content-charset))) (handle (mm-make-handle (current-buffer) `(,content-type (charset . ,charset))))) diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el index 1067f185..e71de041 100644 --- a/emacs/notmuch-tag.el +++ b/emacs/notmuch-tag.el @@ -532,7 +532,8 @@ (defun notmuch-tag-jump (reverse) (and (symbolp name) (symbol-name name)))) (name-string (if name - (if reverse (concat "Reverse " name) + (if reverse + (concat "Reverse " name) name) (mapconcat #'identity tag-change " ")))) (push (list key name-string diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index 6a619ec2..b498db07 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -1009,7 +1009,8 @@ (defun notmuch-tree-worker (basic-query &optional query-context target open-targ (setq notmuch-tree-basic-query basic-query) (setq notmuch-tree-query-context (if (or (string= query-context "") (string= query-context "*")) - nil query-context)) + nil + query-context)) (setq notmuch-tree-target-msg target) (setq notmuch-tree-open-target open-target) ;; Set the default value for `notmuch-show-process-crypto' in this -- 2.26.0