From a74b0a725ac1699b1cb0e2b11dc782ff68d9364f Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 3 Jul 2000 09:11:03 +0000 Subject: [PATCH] (sup-pos-to-window): Use some-window instead of cycling through windows with next-window. --- lisp/term/sup-mouse.el | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lisp/term/sup-mouse.el b/lisp/term/sup-mouse.el index 0075b302526..13fb796e399 100644 --- a/lisp/term/sup-mouse.el +++ b/lisp/term/sup-mouse.el @@ -191,18 +191,6 @@ X and Y are 0-based character positions in the window." (defun sup-pos-to-window (x y) "Find window corresponding to frame coordinates. X and Y are 0-based character positions on the frame." - (let ((edges (window-edges)) - (window nil)) - (while (and (not (eq window (selected-window))) - (or (< y (nth 1 edges)) - (>= y (nth 3 edges)) - (< x (nth 0 edges)) - (>= x (nth 2 edges)))) - (setq window (next-window window)) - (setq edges (window-edges window)) - ) - (or window (selected-window)) - ) - ) + (some-window (lambda (w) (coordinates-in-window-p (cons x y) w)))) ;;; sup-mouse.el ends here -- 2.39.2