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 6FBCD431FDB for ; Sun, 18 Aug 2013 05:15:42 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.201 X-Spam-Level: X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, 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 1P0OIvo7wrXj for ; Sun, 18 Aug 2013 05:15:36 -0700 (PDT) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 2BBA642117A for ; Sun, 18 Aug 2013 05:14:59 -0700 (PDT) Received: by mail-wg0-f54.google.com with SMTP id e12so2650264wgh.21 for ; Sun, 18 Aug 2013 05:14:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wlmkO6dXIVm/zMpyR378cmgyg6lzbyXnQ7bS+2BuzPc=; b=fchb9uZ+Bnfx2iSmRIKDH3mtFR6OMsnS+iK+IvvDMYfPWIABmZdYRRbJ22/yIDCtUt GP0Nk/woM10fhtdeau6RTL1xvUr303MkvTrCHpf4Rh61ESZzeFdSQBiz+lZOFUFBcIRy faSMZ+9lm37y6sbQiekT9QKJWR82sf09Dbw7CiNfwuzU0Yl7pig6+F81op9Ya2NofjbD HraZd3MmFY/6oZrLSk0/S1JsHOvJshvEPeGQ1wvUbQDfv5Swb0rTKwFcuS7YRZUPksNO sbw/0zauu4yVGhzg9GAQvdLnz410UpxGhKSFtBQvr8zJ1+kDF1cbIsw1eaE+rx6RRMlS o2FQ== X-Received: by 10.180.210.243 with SMTP id mx19mr4448604wic.35.1376828098067; Sun, 18 Aug 2013 05:14:58 -0700 (PDT) Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) by mx.google.com with ESMTPSA id hb2sm10683934wib.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 18 Aug 2013 05:14:57 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH v2 08/11] contrib: pick: close window function Date: Sun, 18 Aug 2013 13:14:36 +0100 Message-Id: <1376828079-21455-9-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1376828079-21455-1-git-send-email-markwalters1009@gmail.com> References: <1376828079-21455-1-git-send-email-markwalters1009@gmail.com> 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, 18 Aug 2013 12:15:42 -0000 --- contrib/notmuch-pick/notmuch-pick.el | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el index bd506ca..ba252d5 100644 --- a/contrib/notmuch-pick/notmuch-pick.el +++ b/contrib/notmuch-pick/notmuch-pick.el @@ -208,6 +208,18 @@ This function does not give an error if there is no button." (let ((button (or button (button-at (point))))) (when button (button-activate button)))) +(defun notmuch-pick-close-message-pane-and (func) + "Close message pane and execute FUNC. + +This function returns a function (so can be used as a keybinding) +which closes the message pane if open and then executes function +FUNC." + `(lambda () + ,(concat "(Close message pane and) " (documentation func t)) + (interactive) + (notmuch-pick-close-message-window) + (funcall #',func))) + (defvar notmuch-pick-mode-map (let ((map (make-sparse-keymap))) (define-key map [mouse-1] 'notmuch-pick-show-message) -- 1.7.9.1