changeset 25182:ef79ee0ceedd

(display-buffer): Don't get confused by "same-window" buffers in a dedicated frame.
author Richard M. Stallman <rms@gnu.org>
date Thu, 05 Aug 1999 19:40:03 +0000
parents 847441efad8d
children 16937a774275
files src/window.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Thu Aug 05 19:38:34 1999 +0000
+++ b/src/window.c	Thu Aug 05 19:40:03 1999 +0000
@@ -2326,8 +2326,9 @@
   (buffer, not_this_window, frame)
      register Lisp_Object buffer, not_this_window, frame;
 {
-  register Lisp_Object window, tem;
-
+  register Lisp_Object window, tem, swp;
+
+  swp = Qnil;
   buffer = Fget_buffer (buffer);
   CHECK_BUFFER (buffer, 0);
 
@@ -2342,8 +2343,8 @@
      in the selected window.  */
   if (NILP (not_this_window))
     {
-      tem = Fsame_window_p (XBUFFER (buffer)->name);
-      if (!NILP (tem))
+      swp = Fsame_window_p (XBUFFER (buffer)->name);
+      if (!NILP (swp) && !no_switch_window (selected_window))
 	{
 	  Fswitch_to_buffer (buffer, Qnil);
 	  return display_buffer_1 (selected_window);
@@ -2367,7 +2368,7 @@
     }
 
   /* Certain buffer names get special handling.  */
-  if (!NILP (Vspecial_display_function))
+  if (!NILP (Vspecial_display_function) && NILP (swp))
     {
       tem = Fspecial_display_p (XBUFFER (buffer)->name);
       if (EQ (tem, Qt))