X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-tree.el;h=d864e6dd88194c85ca2229e864754094b3c12ce3;hb=693ca8d8a80438ce1e361e7e6d22288f52a11c55;hp=384cb76bcf3c086f6f727112334e0ad4bea1eb84;hpb=f9d2ccf67b0534637c128fd088957604d0435e7c;p=notmuch
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 384cb76b..d864e6dd 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -1,4 +1,4 @@
-;; notmuch-tree.el --- displaying notmuch forests.
+;;; notmuch-tree.el --- displaying notmuch forests.
;;
;; Copyright © Carl Worth
;; Copyright © David Edmondson
@@ -17,11 +17,13 @@
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
-;; along with Notmuch. If not, see .
+;; along with Notmuch. If not, see .
;;
;; Authors: David Edmondson
;; Mark Walters
+;;; Code:
+
(require 'mail-parse)
(require 'notmuch-lib)
@@ -801,7 +803,7 @@ This function inserts a collection of several complete threads as
passed to it by notmuch-tree-process-filter."
(mapc 'notmuch-tree-insert-forest-thread forest))
-(defun notmuch-tree-mode ()
+(define-derived-mode notmuch-tree-mode fundamental-mode "notmuch-tree"
"Major mode displaying messages (as opposed to threads) of of a notmuch search.
This buffer contains the results of a \"notmuch tree\" of your
@@ -815,12 +817,7 @@ Complete list of currently available key bindings:
\\{notmuch-tree-mode-map}"
- (interactive)
- (kill-all-local-variables)
(setq notmuch-buffer-refresh-function #'notmuch-tree-refresh-view)
- (use-local-map notmuch-tree-mode-map)
- (setq major-mode 'notmuch-tree-mode
- mode-name "notmuch-tree")
(hl-line-mode 1)
(setq buffer-read-only t
truncate-lines t))
@@ -945,3 +942,5 @@ The arguments are:
;;
(provide 'notmuch-tree)
+
+;;; notmuch-tree.el ends here