[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
get-buffer-window should prefer windows on selected frame
From: |
Stefan Monnier |
Subject: |
get-buffer-window should prefer windows on selected frame |
Date: |
Mon, 05 Dec 2005 11:11:44 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
get-buffer-window currently favors returning the selected-window (if it
shows the requested buffer, of course) over other windows.
I think this should be extended so that if the selected-window doesn't show
the buffer, but some other window on the selected frame does show it, that
window should be picked in preference to other windows on other frames.
Any objection to the patch below?
Stefan
Index: src/window.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/window.c,v
retrieving revision 1.529
diff -u -r1.529 window.c
--- src/window.c 1 Dec 2005 16:25:15 -0000 1.529
+++ src/window.c 5 Dec 2005 16:07:28 -0000
@@ -1996,8 +1996,10 @@
if (NILP (best_window))
best_window = window;
else if (EQ (window, selected_window))
- /* For compatibility with 20.x, prefer to return
- selected-window. */
+ /* Prefer to return selected-window. */
+ RETURN_UNGCPRO (window);
+ else if (EQ (Fwindow_frame (window), selected_frame))
+ /* Prefer windows on the current frame. */
best_window = window;
}
break;
- get-buffer-window should prefer windows on selected frame,
Stefan Monnier <=