aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorJoakim Verona2013-02-12 00:04:05 +0100
committerJoakim Verona2013-02-12 00:04:05 +0100
commite0444a0966fa001953bb97cfb60451c42220be8e (patch)
treed5d10a2f99fa0c7b24eee310069e2677409e6802 /src/window.c
parent77f4834db1299b571b1fb3dfb120e5e50eec7cb1 (diff)
parent6659b59ccb7909a07f71a0143fd9d85e60b8e414 (diff)
downloademacs-e0444a0966fa001953bb97cfb60451c42220be8e.tar.gz
emacs-e0444a0966fa001953bb97cfb60451c42220be8e.zip
auto upstream
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/window.c b/src/window.c
index 68dcf28f52f..587ed8365c6 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1545,7 +1545,7 @@ Return POS. */)
1545{ 1545{
1546 register struct window *w = decode_live_window (window); 1546 register struct window *w = decode_live_window (window);
1547 1547
1548 CHECK_NUMBER_COERCE_MARKER (pos); 1548 /* Type of POS is checked by Fgoto_char or set_marker_restricted ... */
1549 1549
1550 if (w == XWINDOW (selected_window)) 1550 if (w == XWINDOW (selected_window))
1551 { 1551 {
@@ -1555,6 +1555,8 @@ Return POS. */)
1555 { 1555 {
1556 struct buffer *old_buffer = current_buffer; 1556 struct buffer *old_buffer = current_buffer;
1557 1557
1558 /* ... but here we want to catch type error before buffer change. */
1559 CHECK_NUMBER_COERCE_MARKER (pos);
1558 set_buffer_internal (XBUFFER (w->buffer)); 1560 set_buffer_internal (XBUFFER (w->buffer));
1559 Fgoto_char (pos); 1561 Fgoto_char (pos);
1560 set_buffer_internal (old_buffer); 1562 set_buffer_internal (old_buffer);
@@ -1580,9 +1582,8 @@ overriding motion of point in order to display at this exact start. */)
1580{ 1582{
1581 register struct window *w = decode_live_window (window); 1583 register struct window *w = decode_live_window (window);
1582 1584
1583 CHECK_NUMBER_COERCE_MARKER (pos);
1584 set_marker_restricted (w->start, pos, w->buffer); 1585 set_marker_restricted (w->start, pos, w->buffer);
1585 /* this is not right, but much easier than doing what is right. */ 1586 /* This is not right, but much easier than doing what is right. */
1586 w->start_at_line_beg = 0; 1587 w->start_at_line_beg = 0;
1587 if (NILP (noforce)) 1588 if (NILP (noforce))
1588 w->force_start = 1; 1589 w->force_start = 1;
@@ -4619,8 +4620,8 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror)
4619 } 4620 }
4620 4621
4621 /* Set the window start, and set up the window for redisplay. */ 4622 /* Set the window start, and set up the window for redisplay. */
4622 set_marker_restricted (w->start, make_number (pos), 4623 set_marker_restricted_both (w->start, w->buffer, IT_CHARPOS (it),
4623 w->buffer); 4624 IT_BYTEPOS (it));
4624 bytepos = marker_byte_position (w->start); 4625 bytepos = marker_byte_position (w->start);
4625 w->start_at_line_beg = (pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n'); 4626 w->start_at_line_beg = (pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n');
4626 w->update_mode_line = 1; 4627 w->update_mode_line = 1;
@@ -5799,8 +5800,7 @@ the return value is nil. Otherwise the value is t. */)
5799 { 5800 {
5800 /* Set window markers at start of visible range. */ 5801 /* Set window markers at start of visible range. */
5801 if (XMARKER (w->start)->buffer == 0) 5802 if (XMARKER (w->start)->buffer == 0)
5802 set_marker_restricted (w->start, make_number (0), 5803 set_marker_restricted_both (w->start, w->buffer, 0, 0);
5803 w->buffer);
5804 if (XMARKER (w->pointm)->buffer == 0) 5804 if (XMARKER (w->pointm)->buffer == 0)
5805 set_marker_restricted_both 5805 set_marker_restricted_both
5806 (w->pointm, w->buffer, 5806 (w->pointm, w->buffer,
@@ -5818,10 +5818,8 @@ the return value is nil. Otherwise the value is t. */)
5818 wset_buffer (w, other_buffer_safely (Fcurrent_buffer ())); 5818 wset_buffer (w, other_buffer_safely (Fcurrent_buffer ()));
5819 /* This will set the markers to beginning of visible 5819 /* This will set the markers to beginning of visible
5820 range. */ 5820 range. */
5821 set_marker_restricted (w->start, 5821 set_marker_restricted_both (w->start, w->buffer, 0, 0);
5822 make_number (0), w->buffer); 5822 set_marker_restricted_both (w->pointm, w->buffer, 0, 0);
5823 set_marker_restricted (w->pointm,
5824 make_number (0), w->buffer);
5825 w->start_at_line_beg = 1; 5823 w->start_at_line_beg = 1;
5826 if (!NILP (w->dedicated)) 5824 if (!NILP (w->dedicated))
5827 /* Record this window as dead. */ 5825 /* Record this window as dead. */