summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-10-06 20:18:01 +0100
committerjao <jao@gnu.org>2022-10-06 20:18:01 +0100
commit4a09fa6e1275047d4e9e1e135c702b1d60646332 (patch)
tree2b9782d25b034e3db6fe418b7248ac7a6190ec81 /lib
parentcea86c1d147eeb1630477b76f37a635c94eedd04 (diff)
downloadelibs-4a09fa6e1275047d4e9e1e135c702b1d60646332.tar.gz
elibs-4a09fa6e1275047d4e9e1e135c702b1d60646332.tar.bz2
a bit less code is always good
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 ()