aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1999-08-05 19:40:03 +0000
committerRichard M. Stallman1999-08-05 19:40:03 +0000
commitaee631c210d6067a9f44014335a2580fe00485c5 (patch)
treeeaa5777510bb3118d11a27a3eae9add582c0938b /src
parent2594e0fdb5d92efc775ee9ecc14fc8a0201855c7 (diff)
downloademacs-aee631c210d6067a9f44014335a2580fe00485c5.tar.gz
emacs-aee631c210d6067a9f44014335a2580fe00485c5.zip
(display-buffer): Don't get confused
by "same-window" buffers in a dedicated frame.
Diffstat (limited to 'src')
-rw-r--r--src/window.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/window.c b/src/window.c
index f29bbd82823..fc238d967c1 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2326,8 +2326,9 @@ If FRAME is nil, search only the selected frame\n\
2326 (buffer, not_this_window, frame) 2326 (buffer, not_this_window, frame)
2327 register Lisp_Object buffer, not_this_window, frame; 2327 register Lisp_Object buffer, not_this_window, frame;
2328{ 2328{
2329 register Lisp_Object window, tem; 2329 register Lisp_Object window, tem, swp;
2330 2330
2331 swp = Qnil;
2331 buffer = Fget_buffer (buffer); 2332 buffer = Fget_buffer (buffer);
2332 CHECK_BUFFER (buffer, 0); 2333 CHECK_BUFFER (buffer, 0);
2333 2334
@@ -2342,8 +2343,8 @@ If FRAME is nil, search only the selected frame\n\
2342 in the selected window. */ 2343 in the selected window. */
2343 if (NILP (not_this_window)) 2344 if (NILP (not_this_window))
2344 { 2345 {
2345 tem = Fsame_window_p (XBUFFER (buffer)->name); 2346 swp = Fsame_window_p (XBUFFER (buffer)->name);
2346 if (!NILP (tem)) 2347 if (!NILP (swp) && !no_switch_window (selected_window))
2347 { 2348 {
2348 Fswitch_to_buffer (buffer, Qnil); 2349 Fswitch_to_buffer (buffer, Qnil);
2349 return display_buffer_1 (selected_window); 2350 return display_buffer_1 (selected_window);
@@ -2367,7 +2368,7 @@ If FRAME is nil, search only the selected frame\n\
2367 } 2368 }
2368 2369
2369 /* Certain buffer names get special handling. */ 2370 /* Certain buffer names get special handling. */
2370 if (!NILP (Vspecial_display_function)) 2371 if (!NILP (Vspecial_display_function) && NILP (swp))
2371 { 2372 {
2372 tem = Fspecial_display_p (XBUFFER (buffer)->name); 2373 tem = Fspecial_display_p (XBUFFER (buffer)->name);
2373 if (EQ (tem, Qt)) 2374 if (EQ (tem, Qt))