diff --git a/test/switch-test.el b/test/switch-test.el index 153de31..6f140dd 100644 --- a/test/switch-test.el +++ b/test/switch-test.el @@ -174,7 +174,7 @@ (set-window-buffer nil "xxx-p0-0") ;; (purpose-pop-buffer "xxx-p0-1") (pop-to-buffer "xxx-p0-1") - (purpose-check-displayed-buffers '("xxx-p0-0" "xxx-p0-1")) + (purpose-check-displayed-buffers '("xxx-p0-1")) ;; 2 (message "2...") (delete-other-windows) @@ -183,7 +183,7 @@ (set-window-buffer nil "xxx-p0-0") (purpose-pop-buffer "xxx-p0-1") ;; (pop-to-buffer "xxx-p0-1") - (purpose-check-displayed-buffers '("xxx-p0-0" "xxx-p0-1")) + (purpose-check-displayed-buffers '("xxx-p0-1" "xxx-p1-0")) ;; 3 (message "3...") (delete-other-windows) diff --git a/window-purpose-switch.el b/window-purpose-switch.el index f8a6afe..8dcf245 100644 --- a/window-purpose-switch.el +++ b/window-purpose-switch.el @@ -95,8 +95,8 @@ it yourself.") purpose-display-maybe-pop-up-window purpose-display-maybe-pop-up-frame)) (force-same-window . (purpose-display-maybe-same-window)) - (prefer-other-window . (purpose-display-reuse-window-buffer-other-window - purpose-display-reuse-window-purpose-other-window + (prefer-other-window . (purpose-display-reuse-window-buffer + purpose-display-reuse-window-purpose ;; only pops if `pop-up-frames' says so purpose-display-maybe-pop-up-frame ;; only pops when sensible (`split-window-sensibly') @@ -332,18 +332,6 @@ that a window on another frame is chosen, avoid raising that frame." (purpose-change-buffer buffer window 'reuse alist)) window))) -(defun purpose-display-reuse-window-buffer-other-window (buffer alist) - "Return a non-selected window that is already displaying BUFFER. -This is the same `purpose-display-reuse-window-buffer', except -the currently selected window is not eligible for reuse." - (purpose-display-reuse-window-buffer buffer (cons '(inhibit-same-window . t) alist))) - -(defun purpose-display-reuse-window-purpose-other-window (buffer alist) - "Return a non-selected window that is already used for the purpose PURPOSE. -This is the same `purpose-display-reuse-window-purpose', except -the currently selected window is not eligible for reuse." - (purpose-display-reuse-window-purpose buffer (cons '(inhibit-same-window . t) alist))) - (defun purpose-display-reuse-window-buffer-other-frame (buffer alist) "Return a window that is already displaying BUFFER. Return nil if no usable window is found.