From 025654a94f90e92d38361cefd5b797a85a17bb03 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Mon, 27 Jan 2014 22:32:12 +0200 Subject: [PATCH] [PATCH 1/1] emacs: ad-activate 'mm-shr after ad-disable-advice 'mm-shr --- 92/c4a2e7c9902001ebf05c674d149b5bb617b652 | 69 +++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 92/c4a2e7c9902001ebf05c674d149b5bb617b652 diff --git a/92/c4a2e7c9902001ebf05c674d149b5bb617b652 b/92/c4a2e7c9902001ebf05c674d149b5bb617b652 new file mode 100644 index 000000000..0b9ab4e05 --- /dev/null +++ b/92/c4a2e7c9902001ebf05c674d149b5bb617b652 @@ -0,0 +1,69 @@ +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 6897D431FBD + for ; Mon, 27 Jan 2014 12:32:25 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 KU08jBiswTJh for ; + Mon, 27 Jan 2014 12:32:19 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 1E6D4431FBC + for ; Mon, 27 Jan 2014 12:32:19 -0800 (PST) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 98ADF10008B; Mon, 27 Jan 2014 22:32:14 +0200 (EET) +From: Tomi Ollila +To: notmuch@notmuchmail.org +Subject: [PATCH 1/1] emacs: ad-activate 'mm-shr after ad-disable-advice + 'mm-shr +Date: Mon, 27 Jan 2014 22:32:12 +0200 +Message-Id: <1390854732-7501-1-git-send-email-tomi.ollila@iki.fi> +X-Mailer: git-send-email 1.8.0 +Cc: tomi.ollila@iki.fi +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, 27 Jan 2014 20:32:25 -0000 + +Imitated from "Enabling advice" in Emacs lisp manual... + +ad-disable-advice by itself only changes the enable flag for a +piece of advice. To make the change take effect in the +advised definition, the advice needs to be activated again. +--- + emacs/notmuch-lib.el | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el +index e6e9f97..fa35fa9 100644 +--- a/emacs/notmuch-lib.el ++++ b/emacs/notmuch-lib.el +@@ -531,7 +531,8 @@ the given type." + (if (>= emacs-major-version 24) + (defadvice mm-shr (before load-gnus-arts activate) + (require 'gnus-art nil t) +- (ad-disable-advice 'mm-shr 'before 'load-gnus-arts))) ++ (ad-disable-advice 'mm-shr 'before 'load-gnus-arts) ++ (ad-activate 'mm-shr))) + + (defun notmuch-mm-display-part-inline (msg part nth content-type process-crypto) + "Use the mm-decode/mm-view functions to display a part in the +-- +1.8.0 + -- 2.26.2