diff --git a/mu4e/mu4e-main.el b/mu4e/mu4e-main.el index 225eb600..051f2c15 100644 --- a/mu4e/mu4e-main.el +++ b/mu4e/mu4e-main.el @@ -371,17 +371,21 @@ When REFRESH is non nil refresh infos from server." (error 0))) (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." - (let ((buf (get-buffer-create mu4e-main-buffer-name))) - ;; `mu4e--main-view' is called from `mu4e--start', so don't call it - ;; a second time here i.e. do not refresh unless specified - ;; explicitly with REFRESH arg. - (with-current-buffer buf - (mu4e--main-view-real-1 refresh)) - (mu4e-display-buffer buf t) - (goto-char (point-min)))) +If `mu4e-split-view' equals 'single-window, show a mu4e menu +instead." + (if (eq mu4e-split-view 'single-window) + (mu4e--main-menu) + (let ((buf (get-buffer-create mu4e-main-buffer-name))) + ;; `mu4e--main-view' is called from `mu4e--start', so don't call it + ;; a second time here i.e. do not refresh unless specified + ;; explicitly with REFRESH arg. + (with-current-buffer buf + (mu4e--main-view-real-1 refresh)) + (mu4e-display-buffer buf t) + (goto-char (point-min))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Interactive functions