From 33bfcaab6ad6efc8c7befde209e3d7ac23225523 Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Mon, 8 Jun 2015 18:53:03 +0200 Subject: [PATCH] Remove initial window slot functionality Closes #32 --- eyebrowse.el | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/eyebrowse.el b/eyebrowse.el index f9450f3..afab565 100644 --- a/eyebrowse.el +++ b/eyebrowse.el @@ -256,18 +256,14 @@ This function keeps the sortedness intact." (set-window-configuration window-config) (goto-char point))))) -(defun eyebrowse--read-slot (&optional initial-slot) +(defun eyebrowse--read-slot () "Read in a window config SLOT to switch to. -A formatted list of window configs is presented as candidates. -If INITIAL-SLOT is set, use the respective window config as -preselected candidate." +A formatted list of window configs is presented as candidates." (let* ((candidates (--map (cons (eyebrowse-format-slot it) (car it)) (eyebrowse--get 'window-configs))) (candidate (completing-read - "Enter slot: " candidates nil t - (and initial-slot - (car (rassoc initial-slot candidates)))))) + "Enter slot: " candidates nil t))) (cdr (assoc candidate candidates)))) (defun eyebrowse-switch-to-window-config (slot) @@ -279,7 +275,7 @@ This will save the current window config to last window config." (interactive (list (if (numberp current-prefix-arg) current-prefix-arg - (eyebrowse--read-slot (eyebrowse--get 'last-slot))))) + (eyebrowse--read-slot)))) (when slot (let* ((current-slot (eyebrowse--get 'current-slot)) (window-configs (eyebrowse--get 'window-configs))