]> code.delx.au - gnu-emacs/blobdiff - src/window.c
(HAVE_RANDOM, HAVE_XSCREENNUMBEROFSCREEN, BROKEN_FIONREAD): Add definitions.
[gnu-emacs] / src / window.c
index 25ee043ababb8cb624e832c53edb540e507f32fe..a288774914bf163b866745a35aa948b086b411ea 100644 (file)
@@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-#include "config.h"
+#include <config.h>
 #include "lisp.h"
 #include "buffer.h"
 #include "frame.h"
@@ -1092,7 +1092,7 @@ enum window_loop
   DELETE_OTHER_WINDOWS,                /* Arg is window not to delete */
   DELETE_BUFFER_WINDOWS,       /* Arg is buffer */
   GET_LARGEST_WINDOW,
-  UNSHOW_BUFFER,               /* Arg is buffer */
+  UNSHOW_BUFFER                /* Arg is buffer */
 };
 
 static Lisp_Object
@@ -1212,7 +1212,8 @@ window_loop (type, obj, mini, frames)
                      new_buffer
                        = Fget_buffer_create (build_string ("*scratch*"));
                    Fset_window_buffer (w, new_buffer);
-                   Fset_buffer (XWINDOW (w)->buffer);
+                   if (EQ (w, selected_window))
+                     Fset_buffer (XWINDOW (w)->buffer);
                  }
                else
                  Fdelete_window (w);
@@ -1346,7 +1347,7 @@ value is reasonable when this function is called.")
 }
 
 DEFUN ("delete-windows-on", Fdelete_windows_on, Sdelete_windows_on,
-  1, 1, "bDelete windows on (buffer): ",
+  1, 2, "bDelete windows on (buffer): ",
   "Delete all windows showing BUFFER.\n\
 Optional second argument FRAME controls which frames are affected.\n\
 If nil or omitted, delete all windows showing BUFFER in any frame.\n\