From 92a7884d9c2f6904e2c3cc9631c20c5ec3918bbd Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Mon, 18 May 2015 16:31:46 +0200 Subject: [PATCH] avy.el (avy-window-list): Fixup last commit * avy.el (avy-window-list): Update. Fixes #45 --- avy.el | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/avy.el b/avy.el index f8605fb..c80456b 100644 --- a/avy.el +++ b/avy.el @@ -250,13 +250,17 @@ multiple DISPLAY-FN invokations." ;;** Rest (defun avy-window-list () "Return a list of windows depending on `avy-all-windows'." - (cl-case avy-all-windows - (all-frames - (cl-mapcan #'window-list (frame-list))) - (this-frame - (window-list)) - (t - (list (selected-window))))) + (cond ((eq avy-all-windows 'all-frames) + (cl-mapcan #'window-list (frame-list))) + + ((eq avy-all-windows t) + (window-list)) + + ((null avy-all-windows) + (list (selected-window))) + + (t + (error "Unrecognized option: %S" avy-all-windows)))) (defmacro avy-dowindows (flip &rest body) "Depending on FLIP and `avy-all-windows' run BODY in each or selected window."