aboutsummaryrefslogtreecommitdiffhomepage
path: root/contrib
diff options
context:
space:
mode:
authorGravatar Mark Walters <markwalters1009@gmail.com>2013-08-22 18:10:23 +0100
committerGravatar David Bremner <bremner@debian.org>2013-08-24 11:18:01 +0200
commitd3ef0f74cf27cedae595c3d6556792e117d605f8 (patch)
tree4a45c36b8bd9e984060a81826bb576ba9172f774 /contrib
parentd3924d57980db59f8f681ae0a5106fcbc27c1e35 (diff)
contrib: pick: close window function
Diffstat (limited to 'contrib')
-rw-r--r--contrib/notmuch-pick/notmuch-pick.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el
index 3b1f85c1..6d73269e 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)