From: Richard M. Stallman Date: Mon, 16 Aug 2004 22:52:29 +0000 (+0000) Subject: (move_if_not_intangible): Force POSITION to be between BEGV and ZV. X-Git-Tag: ttn-vms-21-2-B4~5267 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=97d8f112efe9d0b1d5e6f56a6f6eaaec1900df9f;p=emacs.git (move_if_not_intangible): Force POSITION to be between BEGV and ZV. --- diff --git a/src/intervals.c b/src/intervals.c index 33ef9a34177..a822dafefcf 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