diff options
-rw-r--r-- | init.el | 2 | ||||
-rw-r--r-- | lisp/km-avy.el | 12 |
2 files changed, 14 insertions, 0 deletions
@@ -577,6 +577,8 @@ (after 'magit-log (define-key magit-log-mode-map "j" #'km/magit-avy-goto-subword-1) (define-key magit-cherry-mode-map "j" #'km/magit-avy-goto-subword-1)) + (after 'notmuch + (define-key notmuch-common-keymap "j" #'km/notmuch-avy-goto-subword-1)) (define-key occur-mode-map "j" #'km/occur-avy-goto-subword-1)) diff --git a/lisp/km-avy.el b/lisp/km-avy.el index cc733e3..e0be1d7 100644 --- a/lisp/km-avy.el +++ b/lisp/km-avy.el @@ -74,5 +74,17 @@ (km/avy-after-goto (call-interactively #'elfeed-search-show-entry))) +(declare-function notmuch-search-show-thread "notmuch" (&optional elide-toggle)) +(declare-function notmuch-tree-show-message "notmuch-tree" (ARG)) +;;;###autoload +(defun km/notmuch-avy-goto-subword-1 () + (interactive) + (km/avy-after-goto + (cl-case major-mode + (notmuch-search-mode + (notmuch-search-show-thread)) + (notmuch-tree-mode + (call-interactively #'notmuch-tree-show-message))))) + (provide 'km-avy) ;;; km-avy.el ends here |