diff options
| author | Gerd Moellmann | 2000-07-03 09:11:03 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-07-03 09:11:03 +0000 |
| commit | a74b0a725ac1699b1cb0e2b11dc782ff68d9364f (patch) | |
| tree | 0b12d76503212ad88866292c6926efa5e30a7481 | |
| parent | 90601de977560fa533fc80a7f299857d33869a95 (diff) | |
| download | emacs-a74b0a725ac1699b1cb0e2b11dc782ff68d9364f.tar.gz emacs-a74b0a725ac1699b1cb0e2b11dc782ff68d9364f.zip | |
(sup-pos-to-window): Use some-window instead
of cycling through windows with next-window.
| -rw-r--r-- | lisp/term/sup-mouse.el | 14 |
1 files changed, 1 insertions, 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." | |||
| 191 | (defun sup-pos-to-window (x y) | 191 | (defun sup-pos-to-window (x y) |
| 192 | "Find window corresponding to frame coordinates. | 192 | "Find window corresponding to frame coordinates. |
| 193 | X and Y are 0-based character positions on the frame." | 193 | X and Y are 0-based character positions on the frame." |
| 194 | (let ((edges (window-edges)) | 194 | (some-window (lambda (w) (coordinates-in-window-p (cons x y) w)))) |
| 195 | (window nil)) | ||
| 196 | (while (and (not (eq window (selected-window))) | ||
| 197 | (or (< y (nth 1 edges)) | ||
| 198 | (>= y (nth 3 edges)) | ||
| 199 | (< x (nth 0 edges)) | ||
| 200 | (>= x (nth 2 edges)))) | ||
| 201 | (setq window (next-window window)) | ||
| 202 | (setq edges (window-edges window)) | ||
| 203 | ) | ||
| 204 | (or window (selected-window)) | ||
| 205 | ) | ||
| 206 | ) | ||
| 207 | 195 | ||
| 208 | ;;; sup-mouse.el ends here | 196 | ;;; sup-mouse.el ends here |