aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-crypto.el
diff options
context:
space:
mode:
authorGravatar Mark Walters <markwalters1009@gmail.com>2013-01-07 21:07:20 +0000
committerGravatar David Bremner <bremner@debian.org>2013-02-18 20:13:19 -0400
commit3901bbca2eb3f24dd8ffa628a2c057ec1a28a1d0 (patch)
treecafe03af33674c303a782ca387177452549d432f /emacs/notmuch-crypto.el
parentc34effad9a65c2f2c6d4d25c508c201bad7a07f6 (diff)
emacs: show: make buttons select window
Emacs has two button type objects: widgets (as used for saved searches in notmuch-hello) and buttons as used by parts/citations and id links in notmuch-show. These two behave subtly differently when clicked with the mouse: widgets select the window clicked before running the action, buttons do not. This patch makes all of these behave the same: clicking always selects the clicked window. It does this by defining a notmuch-button-type supertype that the other notmuch buttons can inherit from. This supertype binds the mouse-action to select the window and then activate the button.
Diffstat (limited to 'emacs/notmuch-crypto.el')
-rw-r--r--emacs/notmuch-crypto.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el
index 83e5d37a..52338249 100644
--- a/emacs/notmuch-crypto.el
+++ b/emacs/notmuch-crypto.el
@@ -19,6 +19,8 @@
;;
;; Authors: Jameson Rollins <jrollins@finestructure.net>
+(require 'notmuch-lib)
+
(defcustom notmuch-crypto-process-mime nil
"Should cryptographic MIME parts be processed?
@@ -76,7 +78,8 @@ mode."
(define-button-type 'notmuch-crypto-status-button-type
'action (lambda (button) (message (button-get button 'help-echo)))
'follow-link t
- 'help-echo "Set notmuch-crypto-process-mime to process cryptographic mime parts.")
+ 'help-echo "Set notmuch-crypto-process-mime to process cryptographic mime parts."
+ :supertype 'notmuch-button-type)
(defun notmuch-crypto-insert-sigstatus-button (sigstatus from)
(let* ((status (plist-get sigstatus :status))