comparison src/window.c @ 6517:8f5f79c3091a

(unshow_buffer, window_loop, Fdisplay_buffer): Use assignment, not initialization.
author Karl Heuer <kwzh@gnu.org>
date Fri, 25 Mar 1994 00:41:05 +0000
parents e1b0356ae3c9
children 851ee89bae86
comparison
equal deleted inserted replaced
6516:8278049ee7a7 6517:8f5f79c3091a
613 when it is about to cease to display that buffer. */ 613 when it is about to cease to display that buffer. */
614 static 614 static
615 unshow_buffer (w) 615 unshow_buffer (w)
616 register struct window *w; 616 register struct window *w;
617 { 617 {
618 Lisp_Object buf = w->buffer; 618 Lisp_Object buf;
619 619
620 buf = w->buffer;
620 if (XBUFFER (buf) != XMARKER (w->pointm)->buffer) 621 if (XBUFFER (buf) != XMARKER (w->pointm)->buffer)
621 abort (); 622 abort ();
622 623
623 #if 0 624 #if 0
624 if (w == XWINDOW (selected_window) 625 if (w == XWINDOW (selected_window)
1217 { 1218 {
1218 /* If we're deleting the buffer displayed in the only window 1219 /* If we're deleting the buffer displayed in the only window
1219 on the frame, find a new buffer to display there. */ 1220 on the frame, find a new buffer to display there. */
1220 if (NILP (XWINDOW (w)->parent)) 1221 if (NILP (XWINDOW (w)->parent))
1221 { 1222 {
1222 Lisp_Object new_buffer = Fother_buffer (obj, Qnil); 1223 Lisp_Object new_buffer;
1224 new_buffer = Fother_buffer (obj, Qnil);
1223 if (NILP (new_buffer)) 1225 if (NILP (new_buffer))
1224 new_buffer 1226 new_buffer
1225 = Fget_buffer_create (build_string ("*scratch*")); 1227 = Fget_buffer_create (build_string ("*scratch*"));
1226 Fset_window_buffer (w, new_buffer); 1228 Fset_window_buffer (w, new_buffer);
1227 if (EQ (w, selected_window)) 1229 if (EQ (w, selected_window))
1250 1252
1251 case UNSHOW_BUFFER: 1253 case UNSHOW_BUFFER:
1252 if (EQ (XWINDOW (w)->buffer, obj)) 1254 if (EQ (XWINDOW (w)->buffer, obj))
1253 { 1255 {
1254 /* Find another buffer to show in this window. */ 1256 /* Find another buffer to show in this window. */
1255 Lisp_Object another_buffer = Fother_buffer (obj, Qnil); 1257 Lisp_Object another_buffer;
1258 another_buffer = Fother_buffer (obj, Qnil);
1256 if (NILP (another_buffer)) 1259 if (NILP (another_buffer))
1257 another_buffer 1260 another_buffer
1258 = Fget_buffer_create (build_string ("*scratch*")); 1261 = Fget_buffer_create (build_string ("*scratch*"));
1259 Fset_window_buffer (w, another_buffer); 1262 Fset_window_buffer (w, another_buffer);
1260 if (EQ (w, selected_window)) 1263 if (EQ (w, selected_window))
1733 #ifdef MULTI_FRAME 1736 #ifdef MULTI_FRAME
1734 || FRAME_MINIBUF_ONLY_P (selected_frame) 1737 || FRAME_MINIBUF_ONLY_P (selected_frame)
1735 #endif 1738 #endif
1736 ) 1739 )
1737 { 1740 {
1738 Lisp_Object frames = Qnil; 1741 Lisp_Object frames;
1739 1742
1743 frames = Qnil;
1740 #ifdef MULTI_FRAME 1744 #ifdef MULTI_FRAME
1741 if (FRAME_MINIBUF_ONLY_P (selected_frame)) 1745 if (FRAME_MINIBUF_ONLY_P (selected_frame))
1742 XSET (frames, Lisp_Frame, last_nonminibuf_frame); 1746 XSET (frames, Lisp_Frame, last_nonminibuf_frame);
1743 #endif 1747 #endif
1744 /* Don't try to create a window if would get an error */ 1748 /* Don't try to create a window if would get an error */