summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/eos/jao-afio.el21
1 files changed, 5 insertions, 16 deletions
diff --git a/lib/eos/jao-afio.el b/lib/eos/jao-afio.el
index d022ef1..dcaa833 100644
--- a/lib/eos/jao-afio.el
+++ b/lib/eos/jao-afio.el
@@ -140,31 +140,20 @@
(set-window-dedicated-p nil t)
(other-window 1))
-;;;###autoload
-(defun jao-afio-open-notmuch ()
- (interactive)
+(defun jao-afio--open-mail (fun)
+ (unless (get-buffer "*Calendar*") (calendar))
(delete-other-windows)
(split-window-horizontally -80)
- (notmuch)
+ (funcall fun)
(set-window-dedicated-p nil t)
(jao-afio--mail-sidebar))
-(defun jao-afio-open-mail-function ()
- (interactive)
- (jao-trisect)
- (other-window 2)
- (delete-window)
- (other-window 1)
- (funcall jao-afio-mail-function)
- (jao-afio--mail-sidebar))
-
;;;###autoload
(defun jao-afio-open-mail ()
(interactive)
- (unless (get-buffer "*Calendar*") (calendar))
(cond ((eq 'gnus jao-afio-mail-function) (jao-afio-open-gnus))
- ((eq 'notmuch jao-afio-mail-function) (jao-afio-open-notmuch))
- (jao-afio-open-mail-function (jao-afio-open-mail-function))))
+ ((eq 'notmuch jao-afio-mail-function) (jao-afio--open-mail 'notmuch))
+ (t (jao-afio-trisect))))
;;;###autoload
(defun jao-afio-reset ()