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 EABB6429E43 for ; Thu, 22 Aug 2013 10:11:30 -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 ah9NQC+WYSBB for ; Thu, 22 Aug 2013 10:11:26 -0700 (PDT) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D6F0C429E30 for ; Thu, 22 Aug 2013 10:10:50 -0700 (PDT) Received: by mail-wi0-f171.google.com with SMTP id hr7so968997wib.10 for ; Thu, 22 Aug 2013 10:10:49 -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=rMhCfMCqO+I/GTohdspnGyXsimS+NqWfzLqOpqvqfo0=; b=r5m+819SJ3C7WMrqAMJ7jj9ty6qW8Y16HOE/9sDR8qmA7ubrsQqSYmOAORo6vcyp4q GebWYEU80u7C09EAsd6+WaZL03v8bYUvxarUyrYUZHrkWFJ+Eg2oyalH+E2cw4i55u+2 WQFPhyn9/izceSJHZIZdOGlTLFS9PXQtqc3s1vJO/odXHbu88VbcZZX5ywzoKJoUjWQT h2x6AR6NDcvR7CSc7Rmx4M79iMb4fH71z8mvgZEu5ar9/9KPdduP9AZO6fu+D6mIuryl ibZjFLki98JBg+6qMATA004n88g8Rq16MKLeuEc9bjAF6mO4A/Z4pas6or1aIi4R2bv3 H29w== X-Received: by 10.180.185.97 with SMTP id fb1mr10768473wic.61.1377191449752; Thu, 22 Aug 2013 10:10:49 -0700 (PDT) Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) by mx.google.com with ESMTPSA id z2sm18203356wiv.11.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 22 Aug 2013 10:10:49 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH v3 08/11] contrib: pick: close window function Date: Thu, 22 Aug 2013 18:10:23 +0100 Message-Id: <1377191427-6821-9-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1377191427-6821-1-git-send-email-markwalters1009@gmail.com> References: <1377191427-6821-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: Thu, 22 Aug 2013 17:11:31 -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 3b1f85c..6d73269 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) + (call-interactively #',func))) + (defvar notmuch-pick-mode-map (let ((map (make-sparse-keymap))) (define-key map [mouse-1] 'notmuch-pick-show-message) -- 1.7.9.1