feat(tools/emacs): Bindings for (un)collapsing notmuch subthreads

Modifies notmuch-show-open-or-close-subthread to take a parameter
instead of using prefix to toggle the argument, and binds that
function to C-, and C-. in notmuch-show-mode-map to enable convenient
collapsing/uncollapsing of subthreads from point.
This commit is contained in:
Vincent Ambo 2020-04-02 01:35:16 +01:00
parent 5aaeaa406a
commit 40d13cc87f
2 changed files with 15 additions and 7 deletions

View file

@ -41,4 +41,14 @@
;; Insert TODO comments
(global-set-key (kbd "C-c t") 'insert-todo-comment)
;; Add subthread collapsing to notmuch-show.
;;
;; C-, closes a thread, C-. opens a thread. This mirrors stepping
;; in/out of definitions.
(define-key notmuch-show-mode-map (kbd "C-,") 'notmuch-show-open-or-close-subthread)
(define-key notmuch-show-mode-map (kbd "C-.")
(lambda ()
(interactive)
(notmuch-show-open-or-close-subthread t))) ;; open
(provide 'bindings)