summaryrefslogtreecommitdiffhomepage
path: root/lib/eos/jao-afio.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2025-11-23 01:52:03 +0000
committerjao <jao@gnu.org>2025-11-23 19:04:10 +0000
commit35008bf8e144f87f66d7b46e263b96aaaf49de17 (patch)
tree4b89cd2b00a4912e2a7b8264e6634e3dbd43f8fc /lib/eos/jao-afio.el
parent66fe6f8c425f3091a4e385eaa6eb1b3811255405 (diff)
downloadelibs-35008bf8e144f87f66d7b46e263b96aaaf49de17.tar.gz
elibs-35008bf8e144f87f66d7b46e263b96aaaf49de17.tar.bz2
afio: optional persistent window configurations
Diffstat (limited to 'lib/eos/jao-afio.el')
-rw-r--r--lib/eos/jao-afio.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/eos/jao-afio.el b/lib/eos/jao-afio.el
index 68c8166..c4445bd 100644
--- a/lib/eos/jao-afio.el
+++ b/lib/eos/jao-afio.el
@@ -24,6 +24,7 @@
(defvar jao-afio-use-frames (not window-system))
(defvar jao-afio-frame-parameters nil)
+(defvar jao-afio-persist-configurations nil)
(defvar jao-open-doc-fun 'find-file)
(defvar jao-afio-mail-function 'gnus)
@@ -47,7 +48,8 @@
(message "Configuration of %s saved" (jao-afio-frame-name c))))
(defun jao-afio-restore-configuration (c)
- (when-let ((c (alist-get c (multisession-value jao-afio-configurations))))
+ (when-let* ((_ jao-afio-persist-configurations)
+ (c (alist-get c (multisession-value jao-afio-configurations))))
(window-state-put c)
t))
@@ -191,12 +193,12 @@
(let ((c (jao-afio--current-config)))
(unless (jao-afio-restore-configuration c)
(delete-other-windows)
- (cl-case (jao-afio--current-config)
+ (cl-case c
(?w (jao-afio-open-www))
(?g (jao-afio-open-mail))
(?p (jao-afio-open-doc))
(t (jao-afio-trisect)))
- (jao-afio-save-configuration))))
+ (when jao-afio-persist-configurations (jao-afio-save-configuration)))))
;;; go to frame
(defsubst jao-afio--find-frame (c)