From 9186cd11366af797f1b1c7889f7fd6f26978e969 Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Sun, 3 May 2015 16:57:21 +0200 Subject: [PATCH] Check for possibly existing first window config If desktop.el is used, eyebrowse-specific data is saved and restored since these are kept as frame parameters (although the window configs are impossible to serialize properly and desktop.el won't work properly at all), so unconditionally inserting a first config is not fine. Fixes #28. --- eyebrowse.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eyebrowse.el b/eyebrowse.el index e17e6fd..0b0cdbb 100644 --- a/eyebrowse.el +++ b/eyebrowse.el @@ -219,8 +219,9 @@ If FRAME is nil, use current frame. TYPE can be any of "Initialize Eyebrowse for the current frame." (eyebrowse--set 'last-slot 1 frame) (eyebrowse--set 'current-slot 1 frame) - (eyebrowse--insert-in-window-config-list - (eyebrowse--current-window-config 1) frame)) + (unless (eyebrowse--window-config-present-p 1 frame) + (eyebrowse--insert-in-window-config-list + (eyebrowse--current-window-config 1) frame))) (defun eyebrowse--update-window-config-element (new-element) "Replace the old element with NEW-ELEMENT in the window config list.