From 6bf4ea88991a2f13f8ab58a26a8ce3a91cdfff34 Mon Sep 17 00:00:00 2001 From: George Kettleborough Date: Thu, 7 Sep 2023 10:29:23 +0100 Subject: [PATCH] avy.el (avy-window-list): Use avy-frame-list-function to get frames --- avy.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/avy.el b/avy.el index bf0350b..30bca84 100644 --- a/avy.el +++ b/avy.el @@ -221,6 +221,11 @@ pressed during the dispatch, ACTION is set to replace the default (const :tag "This Frame" t) (const :tag "This Window" nil))) +(defvar avy-frame-list-function #'frame-list + "Function to get the list of current frames. +This is used when `avy-all-windows' is set to `all-frames'. +Sensible options include `frame-list' and `visible-frame-list'") + (defcustom avy-case-fold-search t "Non-nil if searches should ignore case." :type 'boolean) @@ -629,7 +634,7 @@ multiple DISPLAY-FN invocations." (defun avy-window-list () "Return a list of windows depending on `avy-all-windows'." (cond ((eq avy-all-windows 'all-frames) - (cl-mapcan #'window-list (frame-list))) + (cl-mapcan #'window-list (funcall avy-frame-list-function))) ((eq avy-all-windows t) (window-list))