aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2018-02-09 16:07:51 -0600
committerGitHub <noreply@github.com>2018-02-09 16:07:51 -0600
commitf2bf0ba847c4e17efd4045397a94c9e225dca2cb (patch)
tree3c712d3f8492db34025dba8c7a4d4b0d4955e048
parente8d4c93e2f4be12a061de11952f10f266e81b3ae (diff)
parent92b4223f8cfc7bddbe976a94af0901ef438a4ff2 (diff)
Merge pull request #337 from basil-conto/blc/get-win
Use get-window-with-predicate
-rw-r--r--sx-question-mode.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/sx-question-mode.el b/sx-question-mode.el
index 74889e3..0b4d9ee 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.