From 97d8f112efe9d0b1d5e6f56a6f6eaaec1900df9f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 16 Aug 2004 22:52:29 +0000 Subject: [PATCH] (move_if_not_intangible): Force POSITION to be between BEGV and ZV. --- src/intervals.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/intervals.c b/src/intervals.c index 33ef9a3417..a822dafefc 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -2275,6 +2275,10 @@ move_if_not_intangible (position) pos = Fnext_char_property_change (pos, Qnil); } + else if (position < BEGV) + position = BEGV; + else if (position > ZV) + position = ZV; /* If the whole stretch between PT and POSITION isn't intangible, try moving to POSITION (which means we actually move farther -- 2.20.1