mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-23 01:44:52 +01:00
notmuch-hello: Make this work with a notmuch-folders variable set in ~/.emacs
I'm planning to rip out the notmuch-folder-mode completely. So as a token kindness to existing users of notmuch-folders, I'm at least making notmuch-hello support the notmuch-folders variable name as an alternate for the new name of notmuch-saved-searches.
This commit is contained in:
parent
51e5eaac17
commit
2a6a0e2481
1 changed files with 10 additions and 1 deletions
|
@ -45,7 +45,7 @@
|
||||||
(defvar notmuch-hello-indent 4
|
(defvar notmuch-hello-indent 4
|
||||||
"How much to indent non-headers.")
|
"How much to indent non-headers.")
|
||||||
|
|
||||||
(defcustom notmuch-saved-searches notmuch-folders
|
(defcustom notmuch-saved-searches nil
|
||||||
"A list of saved searches to display."
|
"A list of saved searches to display."
|
||||||
:type '(alist :key-type string :value-type string)
|
:type '(alist :key-type string :value-type string)
|
||||||
:group 'notmuch)
|
:group 'notmuch)
|
||||||
|
@ -201,6 +201,15 @@ diagonal."
|
||||||
(defun notmuch-hello (&optional no-display)
|
(defun notmuch-hello (&optional no-display)
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
||||||
|
;; Provide support for the deprecated name of this variable
|
||||||
|
(if (not notmuch-saved-searches)
|
||||||
|
(setq notmuch-saved-searches notmuch-folders))
|
||||||
|
|
||||||
|
;; And set a default if neither has been set by the user
|
||||||
|
(if (not notmuch-saved-searches)
|
||||||
|
(setq notmuch-saved-searches '(("inbox" . "tag:inbox")
|
||||||
|
("unread" . "tag:unread"))))
|
||||||
|
|
||||||
(if no-display
|
(if no-display
|
||||||
(set-buffer "*notmuch-hello*")
|
(set-buffer "*notmuch-hello*")
|
||||||
(switch-to-buffer "*notmuch-hello*"))
|
(switch-to-buffer "*notmuch-hello*"))
|
||||||
|
|
Loading…
Reference in a new issue