[notmuch] [PATCH] compatibility with emacs22
authorJames Vasile <james@hackervisions.org>
Sun, 28 Feb 2010 01:34:45 +0000 (20:34 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:18 +0000 (09:36 -0800)
76/08a71e6584cf8f71d054415f967bd61fc586a6 [new file with mode: 0644]

diff --git a/76/08a71e6584cf8f71d054415f967bd61fc586a6 b/76/08a71e6584cf8f71d054415f967bd61fc586a6
new file mode 100644 (file)
index 0000000..5b062da
--- /dev/null
@@ -0,0 +1,87 @@
+Return-Path: <james@hackervisions.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id C6670431FBD\r
+       for <notmuch@notmuchmail.org>; Sat, 27 Feb 2010 17:35:03 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.005\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.005 tagged_above=-999 required=5 tests=[AWL=-0.096,\r
+       BAYES_50=0.001, RDNS_DYNAMIC=0.1] autolearn=no\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 3nlJywHlyIEK for <notmuch@notmuchmail.org>;\r
+       Sat, 27 Feb 2010 17:35:03 -0800 (PST)\r
+Received: from hackervisions.org (67-207-143-141.slicehost.net\r
+       [67.207.143.141])\r
+       by olra.theworths.org (Postfix) with ESMTP id 32408431FAE\r
+       for <notmuch@notmuchmail.org>; Sat, 27 Feb 2010 17:35:03 -0800 (PST)\r
+Received: from ool-18bd392a.dyn.optonline.net ([24.189.57.42] helo=localhost)\r
+       by hv with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69)\r
+       (envelope-from <james@hackervisions.org>)\r
+       id 1NlY3c-0000Ho-DR; Sat, 27 Feb 2010 20:34:56 -0500\r
+From: James Vasile <james@hackervisions.org>\r
+To: notmuch@notmuchmail.org\r
+In-Reply-To: <878wb2qelh.wl%james@hackervisions.org>\r
+References: <878wb2qelh.wl%james@hackervisions.org>\r
+Date: Sat, 27 Feb 2010 20:34:45 -0500\r
+Message-ID: <87635idtxm.fsf@hackervisions.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Subject: [notmuch] [PATCH] compatibility with emacs22\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 28 Feb 2010 01:35:04 -0000\r
+\r
+\r
+Emacs22 lacks apply-partially and mouse-event-p, so define them if emacs\r
+version is less than 23.  With this change, I was able to begin using\r
+notmuch in emacs22.\r
+\r
+apply-partially cribbed from http://notmuchmail.org/pipermail/notmuch/2009/000889.html\r
+\r
+This is an updated patch that fixes a bug in the last version.\r
+---\r
+ notmuch.el |   15 +++++++++++++++\r
+ 1 files changed, 15 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/notmuch.el b/notmuch.el\r
+index 5577dde..20e82f1 100644\r
+--- a/notmuch.el\r
++++ b/notmuch.el\r
+@@ -67,6 +67,21 @@\r
\r
+ (fset 'notmuch-show-stash-map notmuch-show-stash-map)\r
\r
++;; Old emacs lacks apply-partially\r
++(when (< emacs-major-version 23)\r
++  (defun apply-partially (fun &rest args)\r
++  "Return a function that is a partial application of FUN to ARGS.\r
++ARGS is a list of the first N arguments to pass to FUN.\r
++The result is a new function which does the same as FUN, except that\r
++the first N arguments are fixed at the values with which this function\r
++was called."\r
++  (lexical-let ((fun fun) (args1 args))\r
++    (lambda (&rest args2) (apply fun (append args1 args2)))))\r
++\r
++  (defun mouse-event-p (object)\r
++  "Return non-nil if OBJECT is a mouse click event."\r
++  (memq (event-basic-type object) '(mouse-1 mouse-2 mouse-3 mouse-movement))))\r
++\r
+ (defvar notmuch-show-mode-map\r
+   (let ((map (make-sparse-keymap)))\r
+     (define-key map "?" 'notmuch-help)\r
+-- \r
+1.6.3.3\r