mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
contrib: pick: add in to-message-window function
This commit is contained in:
parent
5728d178f7
commit
1c591115d6
1 changed files with 13 additions and 0 deletions
|
@ -187,6 +187,19 @@ if the user has loaded a different buffer in that window.")
|
|||
(make-variable-buffer-local 'notmuch-pick-message-buffer)
|
||||
(put 'notmuch-pick-message-buffer 'permanent-local t)
|
||||
|
||||
(defun notmuch-pick-to-message-pane (func)
|
||||
"Execute FUNC in message pane.
|
||||
|
||||
This function returns a function (so can be used as a keybinding)
|
||||
which executes function FUNC in the message pane if it is
|
||||
open (if the message pane is closed it does nothing)."
|
||||
`(lambda ()
|
||||
,(concat "(In message pane) " (documentation func t))
|
||||
(interactive)
|
||||
(when (window-live-p notmuch-pick-message-window)
|
||||
(with-selected-window notmuch-pick-message-window
|
||||
(call-interactively #',func)))))
|
||||
|
||||
(defvar notmuch-pick-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map [mouse-1] 'notmuch-pick-show-message)
|
||||
|
|
Loading…
Reference in a new issue