Mercurial > emacs
comparison src/window.c @ 26635:af8d605cbcf1
(Fwindow_end): Don't call temp_set_pt_both with
out of range position.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Sun, 28 Nov 1999 12:48:29 +0000 |
parents | d39ec0a27081 |
children | c15c2756ec0f |
comparison
equal
deleted
inserted
replaced
26634:b1d50e45b825 | 26635:af8d605cbcf1 |
---|---|
718 if (! NILP (update) | 718 if (! NILP (update) |
719 && ! (! NILP (w->window_end_valid) | 719 && ! (! NILP (w->window_end_valid) |
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); |
728 } | 741 } |
729 else | 742 else |