mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
contrib: pick: add button press helper
We will want to be able to activate buttons not in the current buffer (ie in the message pane) so it is helpful to have a way of activating a button without signalling error if there is no button.
This commit is contained in:
parent
1c591115d6
commit
415d5da7dd
1 changed files with 8 additions and 0 deletions
|
@ -200,6 +200,14 @@ open (if the message pane is closed it does nothing)."
|
|||
(with-selected-window notmuch-pick-message-window
|
||||
(call-interactively #',func)))))
|
||||
|
||||
(defun notmuch-pick-button-activate (&optional button)
|
||||
"Activate BUTTON or button at point
|
||||
|
||||
This function does not give an error if there is no button."
|
||||
(interactive)
|
||||
(let ((button (or button (button-at (point)))))
|
||||
(when button (button-activate button))))
|
||||
|
||||
(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