aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorGerd Moellmann1999-11-28 12:48:29 +0000
committerGerd Moellmann1999-11-28 12:48:29 +0000
commit2d6d9df0f45890e10d0563406a99d678a8f42583 (patch)
tree25b873fcf91d4c1d30347c0b8bbc08bcad568ff6 /src/window.c
parentf9632fc8a461723d74f43b7443536e188e96ca46 (diff)
downloademacs-2d6d9df0f45890e10d0563406a99d678a8f42583.tar.gz
emacs-2d6d9df0f45890e10d0563406a99d678a8f42583.zip
(Fwindow_end): Don't call temp_set_pt_both with
out of range position.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c
index ecce77d6df1..dc01b2faedf 100644
--- a/src/window.c
+++ b/src/window.c
@@ -720,8 +720,21 @@ if it isn't already recorded.")
720 && XFASTINT (w->last_modified) >= MODIFF)) 720 && XFASTINT (w->last_modified) >= MODIFF))
721 { 721 {
722 int opoint = PT, opoint_byte = PT_BYTE; 722 int opoint = PT, opoint_byte = PT_BYTE;
723 TEMP_SET_PT_BOTH (XMARKER (w->start)->charpos, 723
724 XMARKER (w->start)->bytepos); 724 /* In case W->start is out of the range, use something
725 reasonable. This situation occured when loading a file with
726 `-l' containing a call to `rmail' with subsequent other
727 commands. At the end, W->start happened to be BEG, while
728 rmail had already narrowed the buffer. This leads to an
729 abort in temp_set_pt_both. */
730 if (XMARKER (w->start)->charpos < BEGV)
731 TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE);
732 else if (XMARKER (w->start)->charpos > ZV)
733 TEMP_SET_PT_BOTH (ZV, ZV_BYTE);
734 else
735 TEMP_SET_PT_BOTH (XMARKER (w->start)->charpos,
736 XMARKER (w->start)->bytepos);
737
725 Fvertical_motion (make_number (window_internal_height (w)), Qnil); 738 Fvertical_motion (make_number (window_internal_height (w)), Qnil);
726 XSETINT (value, PT); 739 XSETINT (value, PT);
727 TEMP_SET_PT_BOTH (opoint, opoint_byte); 740 TEMP_SET_PT_BOTH (opoint, opoint_byte);