mu4e: make bookmarks a defstruct

Make the structures use for mu4e-bookmarks a defstruct, and update its
usage throughout the codebase. This makes it a bit easier to read and
extend.

Ensure that the old-style bookmarks are automatically converted.
This commit is contained in:
djcb
2016-07-31 11:20:59 +03:00
parent 0d9cac49d3
commit f7be5ef2ff
4 changed files with 88 additions and 26 deletions

View File

@ -137,11 +137,11 @@ clicked."
;; TODO: it's a bit uncool to hard-code the "b" shortcut...
(mapconcat
(lambda (bm)
(let* ((query (nth 0 bm)) (title (nth 1 bm)) (key (nth 2 bm)))
(mu4e~main-action-str
(concat "\t* [b" (make-string 1 key) "] " title)
(concat "b" (make-string 1 key)))))
mu4e-bookmarks "\n")
(mu4e~main-action-str
(concat "\t* [b" (make-string 1 (mu4e-bookmark-key bm)) "] "
(mu4e-bookmark-name bm))
(concat "b" (make-string 1 (mu4e-bookmark-key bm)))))
(mu4e-bookmarks) "\n")
"\n\n"
(propertize " Misc\n\n" 'face 'mu4e-title-face)