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