Mercurial > emacs
comparison src/xdisp.c @ 1017:d42877206c0a
* xdisp.c (display_mode_line): Use x_implicitly_set_name here.
* xdisp.c (redisplay, init_xdisp): Use FRAME_ROOT_WINDOW instead
of minibuf_window->prev.
* xdisp.c (decode_mode_spec): Move lots_of_dashes outside of the
function; Emacs can't use static initialized arrays inside functions.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Wed, 19 Aug 1992 06:43:03 +0000 |
parents | 52267046b144 |
children | 453c24f2bdaa |
comparison
equal
deleted
inserted
replaced
1016:817b0ce337d7 | 1017:d42877206c0a |
---|---|
594 XFASTINT (w->last_point) = BUF_PT (b); | 594 XFASTINT (w->last_point) = BUF_PT (b); |
595 XFASTINT (w->last_point_x) = FRAME_CURSOR_X (selected_frame); | 595 XFASTINT (w->last_point_x) = FRAME_CURSOR_X (selected_frame); |
596 XFASTINT (w->last_point_y) = FRAME_CURSOR_Y (selected_frame); | 596 XFASTINT (w->last_point_y) = FRAME_CURSOR_Y (selected_frame); |
597 | 597 |
598 if (all_windows) | 598 if (all_windows) |
599 mark_window_display_accurate (XWINDOW (minibuf_window)->prev, 1); | 599 mark_window_display_accurate (FRAME_ROOT_WINDOW (selected_frame), 1); |
600 else | 600 else |
601 { | 601 { |
602 w->update_mode_line = Qnil; | 602 w->update_mode_line = Qnil; |
603 XFASTINT (w->last_modified) = BUF_MODIFF (b); | 603 XFASTINT (w->last_modified) = BUF_MODIFF (b); |
604 w->window_end_valid = Qt; | 604 w->window_end_valid = Qt; |
1779 possible that this may mess adversely with some window managers. jla */ | 1779 possible that this may mess adversely with some window managers. jla */ |
1780 | 1780 |
1781 if (FRAME_X_P (f) | 1781 if (FRAME_X_P (f) |
1782 && ! FRAME_MINIBUF_ONLY_P (f) | 1782 && ! FRAME_MINIBUF_ONLY_P (f) |
1783 && w == XWINDOW (f->selected_window)) | 1783 && w == XWINDOW (f->selected_window)) |
1784 x_set_name (f, ((XINT (Flength (Vframe_list)) > 1) | 1784 x_implicitly_set_name (f, ((XINT (Flength (Vframe_list)) > 1) |
1785 ? XBUFFER (w->buffer)->name | 1785 ? XBUFFER (w->buffer)->name |
1786 : Qnil), | 1786 : Qnil), |
1787 Qnil); | 1787 Qnil); |
1788 #endif | 1788 #endif |
1789 } | 1789 } |
1790 | 1790 |
1791 /* Contribute ELT to the mode line for window W. | 1791 /* Contribute ELT to the mode line for window W. |
1792 How it translates into text depends on its data type. | 1792 How it translates into text depends on its data type. |
1997 } | 1997 } |
1998 | 1998 |
1999 /* Return a string for the output of a mode line %-spec for window W, | 1999 /* Return a string for the output of a mode line %-spec for window W, |
2000 generated by character C and width MAXWIDTH. */ | 2000 generated by character C and width MAXWIDTH. */ |
2001 | 2001 |
2002 static char lots_of_dashes[] = "--------------------------------------------------------------------------------------------------------------------------------------------"; | |
2003 | |
2002 static char * | 2004 static char * |
2003 decode_mode_spec (w, c, maxwidth) | 2005 decode_mode_spec (w, c, maxwidth) |
2004 struct window *w; | 2006 struct window *w; |
2005 register char c; | 2007 register char c; |
2006 register int maxwidth; | 2008 register int maxwidth; |
2123 return decode_mode_spec_buf; | 2125 return decode_mode_spec_buf; |
2124 } | 2126 } |
2125 | 2127 |
2126 case '-': | 2128 case '-': |
2127 { | 2129 { |
2128 static char lots_of_dashes[] = "--------------------------------------------------------------------------------------------------------------------------------------------"; | |
2129 register char *p; | 2130 register char *p; |
2130 register int i; | 2131 register int i; |
2131 | 2132 |
2132 if (maxwidth < sizeof (lots_of_dashes)) | 2133 if (maxwidth < sizeof (lots_of_dashes)) |
2133 return lots_of_dashes; | 2134 return lots_of_dashes; |
2147 return ""; | 2148 return ""; |
2148 } | 2149 } |
2149 | 2150 |
2150 /* Display STRING on one line of window W, starting at HPOS. | 2151 /* Display STRING on one line of window W, starting at HPOS. |
2151 Display at position VPOS. Caller should have done get_display_line. | 2152 Display at position VPOS. Caller should have done get_display_line. |
2153 If VPOS == -1, display it as the current frame's title. | |
2152 | 2154 |
2153 TRUNCATE is GLYPH to display at end if truncated. Zero for none. | 2155 TRUNCATE is GLYPH to display at end if truncated. Zero for none. |
2154 | 2156 |
2155 MINCOL is the first column ok to end at. (Pad with spaces to this col.) | 2157 MINCOL is the first column ok to end at. (Pad with spaces to this col.) |
2156 MAXCOL is the last column ok to end at. Truncate here. | 2158 MAXCOL is the last column ok to end at. Truncate here. |
2325 struct window *mini_w; | 2327 struct window *mini_w; |
2326 | 2328 |
2327 this_line_bufpos = 0; | 2329 this_line_bufpos = 0; |
2328 | 2330 |
2329 mini_w = XWINDOW (minibuf_window); | 2331 mini_w = XWINDOW (minibuf_window); |
2330 root_window = mini_w->prev; | 2332 root_window = FRAME_ROOT_WINDOW (XFRAME (WINDOW_FRAME (mini_w))); |
2331 | 2333 |
2332 echo_area_glyphs = 0; | 2334 echo_area_glyphs = 0; |
2333 previous_echo_glyphs = 0; | 2335 previous_echo_glyphs = 0; |
2334 | 2336 |
2335 if (!noninteractive) | 2337 if (!noninteractive) |