Mercurial > emacs
comparison src/xdisp.c @ 14614:8fda783ead43
(redisplay_window): If window-scroll-functions change
the start position, redisplay from the new one.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 21 Feb 1996 21:09:52 +0000 |
parents | de955910bcef |
children | 9e8607589f03 |
comparison
equal
deleted
inserted
replaced
14613:386831bc4a4e | 14614:8fda783ead43 |
---|---|
1544 set_buffer_temp (old); | 1544 set_buffer_temp (old); |
1545 set_buffer_internal_1 (XBUFFER (w->buffer)); | 1545 set_buffer_internal_1 (XBUFFER (w->buffer)); |
1546 update_mode_line = 1; | 1546 update_mode_line = 1; |
1547 w->update_mode_line = Qt; | 1547 w->update_mode_line = Qt; |
1548 if (! NILP (Vwindow_scroll_functions)) | 1548 if (! NILP (Vwindow_scroll_functions)) |
1549 run_hook_with_args_2 (Qwindow_scroll_functions, window, | 1549 { |
1550 make_number (startp)); | 1550 run_hook_with_args_2 (Qwindow_scroll_functions, window, |
1551 make_number (startp)); | |
1552 startp = marker_position (w->start); | |
1553 } | |
1551 } | 1554 } |
1552 XSETFASTINT (w->last_modified, 0); | 1555 XSETFASTINT (w->last_modified, 0); |
1553 if (startp < BEGV) startp = BEGV; | 1556 if (startp < BEGV) startp = BEGV; |
1554 if (startp > ZV) startp = ZV; | 1557 if (startp > ZV) startp = ZV; |
1555 try_window (window, startp); | 1558 try_window (window, startp); |
1720 pos = *vmotion (startp, (PT < startp ? - scroll_step : scroll_step), w); | 1723 pos = *vmotion (startp, (PT < startp ? - scroll_step : scroll_step), w); |
1721 | 1724 |
1722 if (PT >= pos.bufpos) | 1725 if (PT >= pos.bufpos) |
1723 { | 1726 { |
1724 if (! NILP (Vwindow_scroll_functions)) | 1727 if (! NILP (Vwindow_scroll_functions)) |
1725 run_hook_with_args_2 (Qwindow_scroll_functions, window, | 1728 { |
1726 make_number (pos.bufpos)); | 1729 run_hook_with_args_2 (Qwindow_scroll_functions, window, |
1730 make_number (pos.bufpos)); | |
1731 pos.bufpos = marker_position (w->start); | |
1732 } | |
1727 try_window (window, pos.bufpos); | 1733 try_window (window, pos.bufpos); |
1728 if (cursor_vpos >= 0) | 1734 if (cursor_vpos >= 0) |
1729 { | 1735 { |
1730 if (!just_this_one || current_buffer->clip_changed | 1736 if (!just_this_one || current_buffer->clip_changed |
1731 || beg_unchanged < startp) | 1737 || beg_unchanged < startp) |
1748 pos = *vmotion (PT, - (height / 2), w); | 1754 pos = *vmotion (PT, - (height / 2), w); |
1749 /* Set startp here explicitly in case that helps avoid an infinite loop | 1755 /* Set startp here explicitly in case that helps avoid an infinite loop |
1750 in case the window-scroll-functions functions get errors. */ | 1756 in case the window-scroll-functions functions get errors. */ |
1751 Fset_marker (w->start, make_number (pos.bufpos), Qnil); | 1757 Fset_marker (w->start, make_number (pos.bufpos), Qnil); |
1752 if (! NILP (Vwindow_scroll_functions)) | 1758 if (! NILP (Vwindow_scroll_functions)) |
1753 run_hook_with_args_2 (Qwindow_scroll_functions, window, | 1759 { |
1754 make_number (pos.bufpos)); | 1760 run_hook_with_args_2 (Qwindow_scroll_functions, window, |
1761 make_number (pos.bufpos)); | |
1762 pos.bufpos = marker_position (w->start); | |
1763 } | |
1755 try_window (window, pos.bufpos); | 1764 try_window (window, pos.bufpos); |
1756 | 1765 |
1757 startp = marker_position (w->start); | 1766 startp = marker_position (w->start); |
1758 w->start_at_line_beg | 1767 w->start_at_line_beg |
1759 = (startp == BEGV || FETCH_CHAR (startp - 1) == '\n') ? Qt : Qnil; | 1768 = (startp == BEGV || FETCH_CHAR (startp - 1) == '\n') ? Qt : Qnil; |