# HG changeset patch # User Richard M. Stallman # Date 850890659 0 # Node ID 2ecf4bb329a8e7c1afc33ff7fe98959af5d0468e # Parent 401e38b9650c685decfd290667a82f8e23eeed6f (set_point): Use virtual bounds, not real bounds, in the abort test for POSITION. Skip the intangibility test if POSITION is at either end of buffer. diff -r 401e38b9650c -r 2ecf4bb329a8 src/intervals.c --- a/src/intervals.c Wed Dec 18 02:46:34 1996 +0000 +++ b/src/intervals.c Wed Dec 18 06:30:59 1996 +0000 @@ -1613,7 +1613,7 @@ /* Check this now, before checking if the buffer has any intervals. That way, we can catch conditions which break this sanity check whether or not there are intervals in the buffer. */ - if (position > BUF_Z (buffer) || position < BUF_BEG (buffer)) + if (position > BUF_ZV (buffer) || position < BUF_BEGV (buffer)) abort (); have_overlays = (! NILP (buffer->overlays_before) @@ -1671,7 +1671,10 @@ move forward or backward until a change in that property. */ if (NILP (Vinhibit_point_motion_hooks) && ((! NULL_INTERVAL_P (to) && ! NULL_INTERVAL_P (toprev)) - || have_overlays)) + || have_overlays) + /* Intangibility never stops us from positioning at the beginning + or end of the buffer, so don't bother checking in that case. */ + && position != BEGV && position != ZV) { Lisp_Object intangible_propval; Lisp_Object pos;