diff src/intervals.c @ 16716:2ecf4bb329a8

(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.
author Richard M. Stallman <rms@gnu.org>
date Wed, 18 Dec 1996 06:30:59 +0000
parents 7b139b59bda4
children 202689a911b7
line wrap: on
line diff
--- 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;