From 92b4223f8cfc7bddbe976a94af0901ef438a4ff2 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 21 Jan 2018 17:41:43 +0000 Subject: Use get-window-with-predicate --- sx-question-mode.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sx-question-mode.el') diff --git a/sx-question-mode.el b/sx-question-mode.el index 4263f6e..b73afef 100644 --- a/sx-question-mode.el +++ b/sx-question-mode.el @@ -53,11 +53,11 @@ Common values for this variable are `pop-to-buffer' and `switch-to-buffer'." (defun sx-question-mode--get-window () "Return a window displaying a question, or nil." - (car-safe - (cl-member-if - (lambda (x) (with-selected-window x - (derived-mode-p 'sx-question-mode))) - (window-list nil 'never nil)))) + (get-window-with-predicate + (lambda (win) + (with-selected-window win + (derived-mode-p 'sx-question-mode))) + 'never)) (defun sx-question-mode--display (data &optional window) "Display question given by DATA on WINDOW. -- cgit v1.2.3