From d87ad026c41a91fb69c49e92d0ed874e6ae883f0 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Mon, 20 May 2013 11:14:07 +2000 Subject: [PATCH] [PATCH] emacs: Avoid deprecated function flet --- d2/48b10cd6cd74ea600d97fc73022abfb61eb0cf | 102 ++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 d2/48b10cd6cd74ea600d97fc73022abfb61eb0cf diff --git a/d2/48b10cd6cd74ea600d97fc73022abfb61eb0cf b/d2/48b10cd6cd74ea600d97fc73022abfb61eb0cf new file mode 100644 index 000000000..3482f4585 --- /dev/null +++ b/d2/48b10cd6cd74ea600d97fc73022abfb61eb0cf @@ -0,0 +1,102 @@ +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 136B9431FBD + for ; Sun, 19 May 2013 08:14:29 -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 PDrpppA9FV4l for ; + Sun, 19 May 2013 08:14:21 -0700 (PDT) +Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU + [18.9.25.14]) + by olra.theworths.org (Postfix) with ESMTP id 3E459431FBC + for ; Sun, 19 May 2013 08:14:21 -0700 (PDT) +X-AuditID: 1209190e-b7f4f6d000005142-4c-5198ec4b0af8 +Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) + by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP + id 7C.86.20802.B4CE8915; Sun, 19 May 2013 11:14:19 -0400 (EDT) +Received: from outgoing.mit.edu (OUTGOING-AUTH-1.MIT.EDU [18.9.28.11]) + by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id r4JFEHOq032646; + Sun, 19 May 2013 11:14:17 -0400 +Received: from drake.dyndns.org (dhcp-18-111-73-150.dyn.mit.edu + [18.111.73.150]) (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r4JFEEF1022313 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Sun, 19 May 2013 11:14:16 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) + id 1Ue5JO-0001Ll-FM; Sun, 19 May 2013 11:14:14 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH] emacs: Avoid deprecated function flet +Date: Sun, 19 May 2013 11:14:07 -0400 +Message-Id: <1368976447-5153-1-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 1.7.10.4 +In-Reply-To: <87vc6fjjdp.fsf@zancas.localnet> +References: <87vc6fjjdp.fsf@zancas.localnet> +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsUixCmqrOv9ZkagwecdXBY3WrsZLa7fnMns + wOTxbNUtZo8th94zBzBFcdmkpOZklqUW6dslcGVMOPmNteARZ8XUN3NZGxi/s3cxcnJICJhI + 7Gq/zAJhi0lcuLeerYuRi0NIYB+jRNOnwywQzkZGiQ0f34JVCQkcY5J48iscIjGXUeLD7vVM + IAk2AQ2JbfuXM4LYIgLSEjvvzmYFsZkFLCWufm0HqxEWMJOYteorWA2LgKrEy0nv2UBsXgF7 + idbJc1ghzlCU6H42ASzOKaArsWDKfHaIxToS3zrfM01g5F/AyLCKUTYlt0o3NzEzpzg1Wbc4 + OTEvL7VI11gvN7NELzWldBMjOJQk+XYwfj2odIhRgINRiYdX4930QCHWxLLiytxDjJIcTEqi + vE9fzQgU4kvKT6nMSCzOiC8qzUktPsQowcGsJMJbDpLjTUmsrEotyodJSXOwKInzXkm56S8k + kJ5YkpqdmlqQWgSTleHgUJLgLXgN1ChYlJqeWpGWmVOCkGbi4AQZzgM0fBnY8OKCxNzizHSI + /ClGRSlx3jyQZgGQREZpHlwvLNZfMYoDvSLM+wqkigeYJuC6XwENZgIazHptKsjgkkSElFQD + 46q3Fh8ur1439+wkxv5z4lubDuqV60um2R2b0/5lS/j5wAtS3AHGAlePbLh6QXNDtAF/YUi3 + 9ufnM3Xzv+lktdjq32Zo5Gz1d7y4WSej/edL6ewLd7d7teWZ6+kKJs0OrtEUathsrV2eK6j3 + vufJtBh/lfwlk44Z1uZM7/jklsGioDNLVl5EiaU4I9FQi7moOBEA1IKbG9ACAAA= +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: Sun, 19 May 2013 15:14:29 -0000 + +flet was deprecated in Emacs 24.3 and replaced with cl-flet. However, +cl-flet lexically binds the function symbol, while we depend on flet +dynamically binding the function symbol. Hence, this patch replaces +the deprecated flet use with letf, which lets us dynamically bind the +function symbol, while remaining compatible with both Emacs 23 and 24. + +Since we don't have an automated test for this, this was tested +manually in Emacs 24.3 and 23.4. +--- + emacs/notmuch-show.el | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +index 423dd58..7101236 100644 +--- a/emacs/notmuch-show.el ++++ b/emacs/notmuch-show.el +@@ -539,8 +539,9 @@ message at DEPTH in the current thread." + (nth nth) + (filename filename) + (content-type content-type)) +- (flet ((mm-save-part (&rest args) (notmuch-show-save-part +- message-id nth filename content-type))) ++ (letf (((symbol-function 'mm-save-part) ++ (lambda (&rest args) (notmuch-show-save-part ++ message-id nth filename content-type)))) + (mm-display-part handle)))))) + + (defun notmuch-show-interactively-view-part (message-id nth &optional filename content-type) +-- +1.7.10.4 + -- 2.26.2