diff options
author | Carl Worth <cworth@cworth.org> | 2009-11-23 19:03:59 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-11-23 19:03:59 -0800 |
commit | f6158039324e44159d449b459829dc7ad4e52acc (patch) | |
tree | 0bd9c27c2eecc0463b1f0b29068de247377f179e | |
parent | 1e4f5108b50ee7d50fabf5b4e613cedcc21bdad0 (diff) |
notmuch.el: Add TAB and M-TAB buttons to move between buttons.
Thanks to Alexander Botero-Lowry for pointing out the interesting
functions to use here. This functionality was really easy to add.
-rw-r--r-- | notmuch.el | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -82,6 +82,8 @@ (define-key map " " 'notmuch-show-advance-marking-read-and-archiving) (define-key map "|" 'notmuch-show-pipe-message) (define-key map "?" 'describe-mode) + (define-key map (kbd "TAB") 'notmuch-show-next-button) + (define-key map (kbd "M-TAB") 'notmuch-show-previous-button) map) "Keymap for \"notmuch show\" buffers.") (fset 'notmuch-show-mode-map notmuch-show-mode-map) @@ -479,6 +481,16 @@ which this thread was originally shown." (if last (notmuch-show-archive-thread)))))) +(defun notmuch-show-next-button () + "Advance point to the next button in the buffer." + (interactive) + (goto-char (button-start (next-button (point))))) + +(defun notmuch-show-previous-button () + "Move point back to the previous button in the buffer." + (interactive) + (goto-char (button-start (previous-button (point))))) + (defun notmuch-toggle-invisible-action (cite-button) (let ((invis-spec (button-get button 'invisibility-spec))) (if (invisible-p invis-spec) |