From 37e376ea3329c749a920ba408a350f9f41c949a7 Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Mon, 12 May 2014 13:29:25 +0100 Subject: [PATCH] [PATCH v3 5/9] emacs/show: Remove the 'no-buttons option of `notmuch-show-insert-bodypart' --- 3b/a5a24d8b520116259a9209cf28ee2c1d7285c1 | 106 ++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 3b/a5a24d8b520116259a9209cf28ee2c1d7285c1 diff --git a/3b/a5a24d8b520116259a9209cf28ee2c1d7285c1 b/3b/a5a24d8b520116259a9209cf28ee2c1d7285c1 new file mode 100644 index 000000000..982536ab7 --- /dev/null +++ b/3b/a5a24d8b520116259a9209cf28ee2c1d7285c1 @@ -0,0 +1,106 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 6F06C431FC7 + for ; Mon, 12 May 2014 05:29:53 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id Bwouvi6p8XYg for ; + Mon, 12 May 2014 05:29:48 -0700 (PDT) +Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com + [209.85.212.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 4C0EE431FD7 + for ; Mon, 12 May 2014 05:29:35 -0700 (PDT) +Received: by mail-wi0-f169.google.com with SMTP id hi2so5399668wib.4 + for ; Mon, 12 May 2014 05:29:34 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to + :references; + bh=j74C5hxW23VCV3iLul5RdI1LR6BNZMuIl6UJEQtcSZ8=; + b=COlfY3UF7ikwDQu6dbb2a70yTb5nd5w/ncB/8N3vp3wkpe4GjjwnXYRt03cMYae+pY + GfEHNNzRpjYGKH2VRBob4Da21UKk9CAvK8hqdZhvVItoHMzUKU3tvZE43184kNX24kW8 + NPAXFapQN103Btmw6U0UadkDGZBUOM0sWcIARjB63QJEazC1O2duYLq+tBw2nUjzPKQj + FmcH0bX2a0RkJ8KC5BQybTZ/apCUVElO/LR1l+U/LdSXpsTmKdNFbXyzX9k3qMX1zEUV + mKBZhXlO0Mti3NPTfB+xZK5CdtAxifqLBeT2DrO16wDuzCHvLx58Qj9cUiztHfqp3ypo + H6YQ== +X-Gm-Message-State: + ALoCoQmKlTFHh+mSRgctyy9h5uwU2RNtZS0NWmMpYIudM49Irul7PhX3emrLpAgktQ71ckhxJ23N +X-Received: by 10.194.71.66 with SMTP id s2mr3346491wju.23.1399897774111; + Mon, 12 May 2014 05:29:34 -0700 (PDT) +Received: from hotblack-desiato.hh.sledj.net + ([2a01:348:1a2:1:a288:b4ff:fe8a:77d8]) + by mx.google.com with ESMTPSA id c7sm17753850wjf.19.2014.05.12.05.29.32 + for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Mon, 12 May 2014 05:29:32 -0700 (PDT) +Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) + id 4223B10B32A; Mon, 12 May 2014 13:29:29 +0100 (BST) +From: David Edmondson +To: notmuch@notmuchmail.org +Subject: [PATCH v3 5/9] emacs/show: Remove the 'no-buttons option of + `notmuch-show-insert-bodypart' +Date: Mon, 12 May 2014 13:29:25 +0100 +Message-Id: <1399897769-26809-6-git-send-email-dme@dme.org> +X-Mailer: git-send-email 2.0.0.rc0 +In-Reply-To: <1399897769-26809-1-git-send-email-dme@dme.org> +References: <87sixdujkv.fsf@qmul.ac.uk> + <1399897769-26809-1-git-send-email-dme@dme.org> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 12 May 2014 12:29:53 -0000 + +No code uses the 'no-buttons argument to +`notmuch-show-insert-bodypart', so remove it. +--- + emacs/notmuch-show.el | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +index e511655..981b922 100644 +--- a/emacs/notmuch-show.el ++++ b/emacs/notmuch-show.el +@@ -915,9 +915,7 @@ message at DEPTH in the current thread." + + HIDE determines whether to show or hide the part and the button + as follows: If HIDE is nil, show the part and the button. If HIDE +-is t, hide the part initially and show the button. If HIDE is +-'no-buttons, show the part but do not add any buttons (this is +-useful for quoting in replies)." ++is t, hide the part initially and show the button." + + (let* ((content-type (downcase (plist-get part :content-type))) + (mime-type (notmuch-show-mime-type part)) +@@ -926,9 +924,8 @@ useful for quoting in replies)." + ;; Hide the part initially if HIDE is t. + (show-part (not (equal hide t))) + ;; We omit the part button for the first (or only) part if +- ;; this is text/plain, or HIDE is 'no-buttons. +- (button (when (and (not (equal hide 'no-buttons)) +- (funcall notmuch-show-insert-header-p-function part)) ++ ;; this is text/plain. ++ (button (when (funcall notmuch-show-insert-header-p-function part) + (notmuch-show-insert-part-header nth mime-type content-type (plist-get part :filename)))) + (content-beg (point))) + +-- +2.0.0.rc0 + -- 2.26.2