1 |
/* Keyboard and mouse input; editor command loop. |
/* Keyboard and mouse input; editor command loop. |
2 |
Copyright (C) 1985,86,87,88,89,93,94,95,96,97,99, 2000, 01, 02 |
Copyright (C) 1985,86,87,88,89,93,94,95,96,97,99,2000,01,02,03 |
3 |
Free Software Foundation, Inc. |
Free Software Foundation, Inc. |
4 |
|
|
5 |
This file is part of GNU Emacs. |
This file is part of GNU Emacs. |
1874 |
int beg, end; |
int beg, end; |
1875 |
Lisp_Object val, overlay, tmp; |
Lisp_Object val, overlay, tmp; |
1876 |
int check_composition = 1, check_display = 1, check_invisible = 1; |
int check_composition = 1, check_display = 1, check_invisible = 1; |
1877 |
|
int orig_pt = PT; |
1878 |
|
|
1879 |
|
/* FIXME: cycling is probably not necessary because these properties |
1880 |
|
can't be usefully combined anyway. */ |
1881 |
while (check_composition || check_display || check_invisible) |
while (check_composition || check_display || check_invisible) |
1882 |
{ |
{ |
1883 |
if (check_composition |
if (check_composition |
1944 |
/* Move away from the inside area. */ |
/* Move away from the inside area. */ |
1945 |
if (beg < PT && end > PT) |
if (beg < PT && end > PT) |
1946 |
{ |
{ |
1947 |
SET_PT (PT < last_pt ? beg : end); |
SET_PT ((orig_pt == PT && (last_pt < beg || last_pt > end)) |
1948 |
|
/* We haven't moved yet (so we don't need to fear |
1949 |
|
infinite-looping) and we were outside the range |
1950 |
|
before (so either end of the range still corresponds |
1951 |
|
to a move in the right direction): pretend we moved |
1952 |
|
less than we actually did, so that we still have |
1953 |
|
more freedom below in choosing which end of the range |
1954 |
|
to go to. */ |
1955 |
|
? (PT < last_pt ? end : beg) |
1956 |
|
/* We either have moved already or the last point |
1957 |
|
was already in the range: we don't get to choose |
1958 |
|
which end of the range we have to go to. */ |
1959 |
|
: (PT < last_pt ? beg : end)); |
1960 |
check_composition = check_display = 1; |
check_composition = check_display = 1; |
1961 |
} |
} |
1962 |
xassert (PT == beg || PT == end); |
xassert (PT == beg || PT == end); |