diff options
author | Carl Worth <cworth@cworth.org> | 2010-04-26 21:55:51 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-04-26 21:55:51 -0700 |
commit | 2a6a0e248174d93f431018ce8b809fc0fdebd847 (patch) | |
tree | b292f6318113a676cfab7e381716964142e0ae26 | |
parent | 51e5eaac172b37a7000bff0a7e5cf1229239aba3 (diff) |
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.
-rw-r--r-- | emacs/notmuch-hello.el | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 5d1f1f8..82a3a4b 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -45,7 +45,7 @@ (defvar notmuch-hello-indent 4 "How much to indent non-headers.") -(defcustom notmuch-saved-searches notmuch-folders +(defcustom notmuch-saved-searches nil "A list of saved searches to display." :type '(alist :key-type string :value-type string) :group 'notmuch) @@ -201,6 +201,15 @@ diagonal." (defun notmuch-hello (&optional no-display) (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 (set-buffer "*notmuch-hello*") (switch-to-buffer "*notmuch-hello*")) |