From: Karl Heuer Date: Fri, 24 Mar 1995 00:35:46 +0000 (+0000) Subject: (redisplay): Make sure pause is set before used. X-Git-Tag: emacs-19.34~4750 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4d641a1562a8691a3c52da680d997063d2fbf655;p=emacs.git (redisplay): Make sure pause is set before used. Delete unused vars. (redisplay_window): Make sure update_mode_line is set before used. If startp might not have been set, use w->start directly. (try_window_id): In the easy case, find cursor pos before returning. --- diff --git a/src/xdisp.c b/src/xdisp.c index 04955ad1fa9..7c6c2d8b54d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -745,7 +745,6 @@ redisplay () int all_windows; register int tlbufpos, tlendpos; struct position pos; - extern int input_pending; if (noninteractive) return; @@ -864,7 +863,6 @@ redisplay () int left = XFASTINT (w->left); int *charstart_next_line = FRAME_CURRENT_GLYPHS (XFRAME (WINDOW_FRAME (w)))->charstarts[this_line_vpos + 1]; - int i; int adjust; if (Z - tlendpos == ZV) @@ -1013,6 +1011,8 @@ update: { if (FRAME_VISIBLE_P (selected_frame)) pause = update_frame (selected_frame, 0, 0); + else + pause = 0; /* We may have called echo_area_display at the top of this function. If the echo area is on another frame, that may @@ -1268,6 +1268,7 @@ redisplay_window (window, just_this_one) abort (); height = window_internal_height (w); + update_mode_line = (!NILP (w->update_mode_line) || update_mode_lines); if (MINI_WINDOW_P (w)) { @@ -1294,8 +1295,6 @@ redisplay_window (window, just_this_one) } } - update_mode_line = (!NILP (w->update_mode_line) || update_mode_lines); - /* Otherwise set up data on this window; select its buffer and point value */ if (update_mode_line) @@ -1617,7 +1616,7 @@ done: || (w == XWINDOW (minibuf_window) && ! echo_area_glyphs)) { whole = ZV - BEGV; - start = startp - BEGV; + start = marker_position (w->start) - BEGV; /* I don't think this is guaranteed to be right. For the moment, we'll pretend it is. */ end = (Z - XINT (w->window_end_pos)) - BEGV; @@ -1771,7 +1770,7 @@ try_window_id (window) width, hscroll, pos_tab_offset (w, start), w); XSETFASTINT (w->window_end_vpos, height); XSETFASTINT (w->window_end_pos, Z - bp.bufpos); - return 1; + goto findpoint; } return 0; } @@ -2078,6 +2077,7 @@ try_window_id (window) /* If point was not in a line that was displayed, find it */ if (cursor_vpos < 0) { + findpoint: val = *compute_motion (start, 0, lmargin, PT, 10000, 10000, width, hscroll, pos_tab_offset (w, start), w); /* Admit failure if point is off frame now */