about summary refs log tree commit diff
path: root/tools/emacs/config/bindings.el
diff options
context:
space:
mode:
Diffstat (limited to 'tools/emacs/config/bindings.el')
-rw-r--r--tools/emacs/config/bindings.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/emacs/config/bindings.el b/tools/emacs/config/bindings.el
index e77af338951f..f66a6ab551c1 100644
--- a/tools/emacs/config/bindings.el
+++ b/tools/emacs/config/bindings.el
@@ -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)