From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: get-buffer-window should prefer windows on selected frame
Date: Mon, 05 Dec 2005 11:11:44 -0500 [thread overview]
Message-ID: <jwvr78rr0gr.fsf-monnier+emacs@gnu.org> (raw)
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;
next reply other threads:[~2005-12-05 16:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-05 16:11 Stefan Monnier [this message]
2005-12-05 17:01 ` get-buffer-window should prefer windows on selected frame Lennart Borgman
2005-12-12 5:24 ` Richard M. Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvr78rr0gr.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.