]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: minimal change to load notmuch-tree by default
authorMark Walters <markwalters1009@gmail.com>
Fri, 1 Nov 2013 09:23:41 +0000 (09:23 +0000)
committerDavid Bremner <david@tethera.net>
Thu, 7 Nov 2013 11:47:25 +0000 (07:47 -0400)
We want to load notmuch-tree when notmuch is loaded, so include it as
a require in notmuch.el. To avoid circular dependency we need to move
one keybinding from notmuch-tree.el to notmuch.el: it makes sense for
it to be defined there anyway.

Since tree is now loaded by default there is no need to print a
message when it is loaded.

emacs/notmuch-tree.el
emacs/notmuch.el

index d3330a0657d2b0c7a772a87586136402d0ca8018..ebfb5e7b8c2a449be91453a20079a211d472441f 100644 (file)
@@ -29,7 +29,6 @@
 (require 'notmuch-show)
 (require 'notmuch-tag)
 (require 'notmuch-parser)
-(require 'notmuch) ;; XXX ATM, as notmuch-search-mode-map is defined here
 
 (eval-when-compile (require 'cl))
 (declare-function notmuch-search "notmuch" (&optional query oldest-first target-thread target-line))
@@ -939,8 +938,6 @@ The arguments are:
 
 ;; Set up key bindings from the rest of notmuch.
 (define-key notmuch-common-keymap "z" 'notmuch-tree)
-(define-key notmuch-search-mode-map "Z" 'notmuch-tree-from-search-current-query)
 (define-key notmuch-show-mode-map "Z" 'notmuch-tree-from-show-current-query)
-(message "Initialised notmuch-tree")
 
 (provide 'notmuch-tree)
index 19210cbe8dd65e5b9cd2ad9d9b3a0e40f2bb0dce..418c78124b01fdabcc29d1b6e97033d5419c1c88 100644 (file)
@@ -54,6 +54,7 @@
 (require 'notmuch-lib)
 (require 'notmuch-tag)
 (require 'notmuch-show)
+(require 'notmuch-tree)
 (require 'notmuch-mua)
 (require 'notmuch-hello)
 (require 'notmuch-maildir-fcc)
@@ -156,6 +157,7 @@ To enter a line break in customize, press \\[quoted-insert] C-j."
     (define-key map "-" 'notmuch-search-remove-tag)
     (define-key map "+" 'notmuch-search-add-tag)
     (define-key map (kbd "RET") 'notmuch-search-show-thread)
+    (define-key map "Z" 'notmuch-tree-from-search-current-query)
     map)
   "Keymap for \"notmuch search\" buffers.")
 (fset 'notmuch-search-mode-map notmuch-search-mode-map)