Mercurial > emacs
comparison src/intervals.c @ 18078:cd5f9bda791e
(move_if_not_intangible): Fix previous change.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 31 May 1997 08:34:13 +0000 |
parents | 1a2e6b512688 |
children | 5b0dfe8c78fb |
comparison
equal
deleted
inserted
replaced
18077:27a0ced43e7e | 18078:cd5f9bda791e |
---|---|
1866 XSETINT (pos, position); | 1866 XSETINT (pos, position); |
1867 | 1867 |
1868 if (! NILP (Vinhibit_point_motion_hooks)) | 1868 if (! NILP (Vinhibit_point_motion_hooks)) |
1869 /* If intangible is inhibited, always move point to POSITION. */ | 1869 /* If intangible is inhibited, always move point to POSITION. */ |
1870 ; | 1870 ; |
1871 else if (PT < position) | 1871 else if (PT < position && pos < ZV) |
1872 { | 1872 { |
1873 /* We want to move forward, so check the text before POSITION. */ | 1873 /* We want to move forward, so check the text before POSITION. */ |
1874 | 1874 |
1875 intangible_propval = Fget_char_property (pos, | 1875 intangible_propval = Fget_char_property (pos, |
1876 Qintangible, Qnil); | 1876 Qintangible, Qnil); |
1882 && EQ (Fget_char_property (make_number (XINT (pos) - 1), | 1882 && EQ (Fget_char_property (make_number (XINT (pos) - 1), |
1883 Qintangible, Qnil), | 1883 Qintangible, Qnil), |
1884 intangible_propval)) | 1884 intangible_propval)) |
1885 pos = Fprevious_char_property_change (pos, Qnil); | 1885 pos = Fprevious_char_property_change (pos, Qnil); |
1886 } | 1886 } |
1887 else | 1887 else if (pos > BEGV) |
1888 { | 1888 { |
1889 /* We want to move backward, so check the text after POSITION. */ | 1889 /* We want to move backward, so check the text after POSITION. */ |
1890 | 1890 |
1891 intangible_propval = Fget_char_property (make_number (XINT (pos) - 1), | 1891 intangible_propval = Fget_char_property (make_number (XINT (pos) - 1), |
1892 Qintangible, Qnil); | 1892 Qintangible, Qnil); |