X-Git-Url: https://git.cworth.org/git?p=obsolete%2Fnotmuch-old;a=blobdiff_plain;f=contrib%2Fnotmuch-pick%2Fnotmuch-pick.el;h=f24f2b311af1d6f3c3fc1db1ad9f7da98d8e06e3;hp=9c1864b2c115f7b7750ea2f9fcfb16195489017e;hb=415d5da7dd06a17648549fa42ac3574ef0ccc661;hpb=1c591115d676b3e8238f9bf4c6c7204cccd51f67 diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el index 9c1864b2..f24f2b31 100644 --- a/contrib/notmuch-pick/notmuch-pick.el +++ b/contrib/notmuch-pick/notmuch-pick.el @@ -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)