(unless (derived-mode-p 'notmuch-tree-mode)
(user-error "notmuch-tree-outline-mode is only meaningful for notmuch trees!"))
(if notmuch-tree-outline-mode
(unless (derived-mode-p 'notmuch-tree-mode)
(user-error "notmuch-tree-outline-mode is only meaningful for notmuch trees!"))
(if notmuch-tree-outline-mode