From 770c6db6fc0b73e973d9347cd13bc94e1f5dedae Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Tue, 4 Mar 2014 23:21:26 +0100 Subject: [PATCH] Make eyebrowse-switch-back-and-forth-p do something --- eyebrowse.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eyebrowse.el b/eyebrowse.el index 174266c..adfb488 100644 --- a/eyebrowse.el +++ b/eyebrowse.el @@ -188,15 +188,17 @@ This will save the current window config to `eyebrowse-switch-back-and-forth-p' is t and `eyebrowse-current-slot' equals SLOT, this will switch to the last window config." - (when (or (and eyebrowse-switch-back-and-forth-p - (= eyebrowse-current-slot slot)) - (/= eyebrowse-current-slot slot)) + (when (and eyebrowse-switch-back-and-forth-p + (= eyebrowse-current-slot slot)) + (setq slot eyebrowse-last-slot + eyebrowse-last-slot eyebrowse-current-slot)) + (when (/= eyebrowse-current-slot slot)) (eyebrowse-save-window-config eyebrowse-current-slot) (eyebrowse-load-window-config slot) (setq eyebrowse-last-slot eyebrowse-current-slot) (setq eyebrowse-current-slot slot) (eyebrowse-save-window-config eyebrowse-current-slot) - (eyebrowse-load-window-config eyebrowse-current-slot))) + (eyebrowse-load-window-config eyebrowse-current-slot)) (defun eyebrowse-update-mode-line () "Return a string representation of the window configurations."