mu4e-main: restore mail-menu support for split-window mode

This commit is contained in:
Dirk-Jan C. Binnema 2022-12-29 00:23:32 +02:00
parent 15fadee730
commit eb8160e8ed
1 changed files with 14 additions and 10 deletions

View File

@ -371,17 +371,21 @@ When REFRESH is non nil refresh infos from server."
(error 0))) (error 0)))
(defun mu4e--main-view (&optional refresh) (defun mu4e--main-view (&optional refresh)
"Create the mu4e main-view, and switch to it. "Create the mu4e main-view, and switch to it or show the menu.
When REFRESH is non nil refresh infos from server.
When REFRESH is non nil refresh infos from server." If `mu4e-split-view' equals 'single-window, show a mu4e menu
(let ((buf (get-buffer-create mu4e-main-buffer-name))) instead."
;; `mu4e--main-view' is called from `mu4e--start', so don't call it (if (eq mu4e-split-view 'single-window)
;; a second time here i.e. do not refresh unless specified (mu4e--main-menu)
;; explicitly with REFRESH arg. (let ((buf (get-buffer-create mu4e-main-buffer-name)))
(with-current-buffer buf ;; `mu4e--main-view' is called from `mu4e--start', so don't call it
(mu4e--main-view-real-1 refresh)) ;; a second time here i.e. do not refresh unless specified
(mu4e-display-buffer buf t) ;; explicitly with REFRESH arg.
(goto-char (point-min)))) (with-current-buffer buf
(mu4e--main-view-real-1 refresh))
(mu4e-display-buffer buf t)
(goto-char (point-min)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Interactive functions ;; Interactive functions