From 402f03d74926a0138a1aed9c445b9354ae100ddb Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 3 Sep 2022 23:38:19 +0100 Subject: jao-afio: explicit bindings and configurable auto-toggle --- lib/eos/jao-afio.el | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/eos/jao-afio.el') diff --git a/lib/eos/jao-afio.el b/lib/eos/jao-afio.el index 627630e..6369697 100644 --- a/lib/eos/jao-afio.el +++ b/lib/eos/jao-afio.el @@ -27,6 +27,7 @@ (defvar jao-open-doc-fun 'find-file) (defvar jao-afio-mail-function 'gnus) (defvar jao-afio-use-w3m nil) +(defvar jao-afio-auto-toggle nil) (defvar jao-afio-switch-hook nil) (defvar jao-afio--configs '(?c ?w ?g ?p ?s)) @@ -169,7 +170,8 @@ (defun jao-afio--goto-frame (next &optional reset) (jao-afio--check-frame) (let ((current (jao-afio--current-config))) - (if (and (eq next current) + (if (and jao-afio-auto-toggle + (eq next current) (not reset) (not (eq current jao-afio--previous-config))) (jao-afio--goto-frame jao-afio--previous-config) @@ -224,10 +226,6 @@ ;;; setup ;;;###autoload (defun jao-afio-setup (&optional use-frames) - (global-set-key "\C-cf" 'jao-afio-goto-main) - (global-set-key "\C-cg" 'jao-afio-goto-mail) - (global-set-key "\C-cw" 'jao-afio-goto-www) - (global-set-key "\C-cz" 'jao-afio-goto-docs) (setq jao-afio-use-frames use-frames) (jao-afio--init)) -- cgit v1.2.3