aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-12-18 06:30:59 +0000
committerRichard M. Stallman1996-12-18 06:30:59 +0000
commitb827a9e32bc91d8528aa4081dc565d35a28b3156 (patch)
tree22c188b1ea58b938251e9e8c06e642fc3dda2461
parent85673d2b495bd330a7e86d3c0b97239cbb280308 (diff)
downloademacs-b827a9e32bc91d8528aa4081dc565d35a28b3156.tar.gz
emacs-b827a9e32bc91d8528aa4081dc565d35a28b3156.zip
(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.
-rw-r--r--src/intervals.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/intervals.c b/src/intervals.c
index 1e5a3782ef9..de5e3b30f5d 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1613,7 +1613,7 @@ set_point (position, buffer)
1613 /* Check this now, before checking if the buffer has any intervals. 1613 /* Check this now, before checking if the buffer has any intervals.
1614 That way, we can catch conditions which break this sanity check 1614 That way, we can catch conditions which break this sanity check
1615 whether or not there are intervals in the buffer. */ 1615 whether or not there are intervals in the buffer. */
1616 if (position > BUF_Z (buffer) || position < BUF_BEG (buffer)) 1616 if (position > BUF_ZV (buffer) || position < BUF_BEGV (buffer))
1617 abort (); 1617 abort ();
1618 1618
1619 have_overlays = (! NILP (buffer->overlays_before) 1619 have_overlays = (! NILP (buffer->overlays_before)
@@ -1671,7 +1671,10 @@ set_point (position, buffer)
1671 move forward or backward until a change in that property. */ 1671 move forward or backward until a change in that property. */
1672 if (NILP (Vinhibit_point_motion_hooks) 1672 if (NILP (Vinhibit_point_motion_hooks)
1673 && ((! NULL_INTERVAL_P (to) && ! NULL_INTERVAL_P (toprev)) 1673 && ((! NULL_INTERVAL_P (to) && ! NULL_INTERVAL_P (toprev))
1674 || have_overlays)) 1674 || have_overlays)
1675 /* Intangibility never stops us from positioning at the beginning
1676 or end of the buffer, so don't bother checking in that case. */
1677 && position != BEGV && position != ZV)
1675 { 1678 {
1676 Lisp_Object intangible_propval; 1679 Lisp_Object intangible_propval;
1677 Lisp_Object pos; 1680 Lisp_Object pos;