mu4e: speedbar: use the correct buffer

This commit is contained in:
djcb 2018-06-14 11:19:50 +03:00
parent d106e0e03b
commit 5ccd261771
1 changed files with 10 additions and 8 deletions

View File

@ -72,14 +72,16 @@
(defun mu4e~speedbar-render-maildir-list ()
"Insert the list of maildirs in the speedbar."
(interactive)
(mapcar (lambda (maildir-name)
(speedbar-insert-button
(concat " " maildir-name)
'mu4e-highlight-face
'highlight
'mu4e~speedbar-maildir
maildir-name))
(mu4e-get-maildirs)))
(when (buffer-live-p speedbar-buffer)
(with-current-buffer speedbar-buffer
(mapcar (lambda (maildir-name)
(speedbar-insert-button
(concat " " maildir-name)
'mu4e-highlight-face
'highlight
'mu4e~speedbar-maildir
maildir-name))
(mu4e-get-maildirs)))))
(defun mu4e~speedbar-maildir (&optional text token ident)
"Jump to maildir TOKEN. TEXT and INDENT are not used."