aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch.el
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-11-30 16:44:05 -0800
committerGravatar Carl Worth <cworth@cworth.org>2009-11-30 16:46:26 -0800
commitc24360e59e90893f1edf2a95289c1091ccd98975 (patch)
tree1e20f1fe3bbc48282c6169b5fada35aab519b5db /notmuch.el
parent161b2738e1b99f56d0d44a446045e223deddea22 (diff)
notmuch.el: Don't document mouse actions in notmuch-help.
The concept behind direct manipulation with mouse clicks is that documentation shouldn't be necessary, (though my original motivation here was simply that "<mouse-1>" was exceeding my TAB width. This does cause a blank line to be added for the mouse binding. This isn't directly desired, but as long as it's there we put it at a natural place for a separator.
Diffstat (limited to 'notmuch.el')
-rw-r--r--notmuch.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/notmuch.el b/notmuch.el
index ddfcdc2a..40d78753 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -789,10 +789,15 @@ which this thread was originally shown."
(defun notmuch-substitute-one-command-key (binding)
"For a key binding, return a string showing a human-readable representation
-of the key as well as the first line of documentation from the bound function."
- (concat (format-kbd-macro (vector (car binding)))
- "\t"
- (notmuch-documentation-first-line (cdr binding))))
+of the key as well as the first line of documentation from the bound function.
+
+For a mouse binding, return nil."
+ (let ((key (car binding)))
+ (if (mouse-event-p key)
+ nil
+ (concat (format-kbd-macro (vector key))
+ "\t"
+ (notmuch-documentation-first-line (cdr binding))))))
(defun notmuch-substitute-command-keys (doc)
"Like `substitute-command-keys' but with documentation, not function names."
@@ -939,11 +944,11 @@ thread from that buffer can be show when done with this one)."
(define-key map "=" 'notmuch-search-refresh-view)
(define-key map "t" 'notmuch-search-filter-by-tag)
(define-key map "f" 'notmuch-search-filter)
+ (define-key map [mouse-1] 'notmuch-search-show-thread)
(define-key map "*" 'notmuch-search-operate-all)
(define-key map "a" 'notmuch-search-archive-thread)
(define-key map "-" 'notmuch-search-remove-tag)
(define-key map "+" 'notmuch-search-add-tag)
- (define-key map [mouse-1] 'notmuch-search-show-thread)
(define-key map (kbd "RET") 'notmuch-search-show-thread)
map)
"Keymap for \"notmuch search\" buffers.")