diff options
| author | Karoly Lorentey | 2004-10-31 02:05:24 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-10-31 02:05:24 +0000 |
| commit | e0bc17abe6979d607e8de4684dddb96e53c60065 (patch) | |
| tree | b7cb7bc5df9f12138937fd958cdf4b9c2d19ee3a /src/indent.c | |
| parent | f158167a84475d5fc41931531406821e6413afd7 (diff) | |
| parent | 707994d2626cf0f01c3ece4028d73835068d64dc (diff) | |
| download | emacs-e0bc17abe6979d607e8de4684dddb96e53c60065.tar.gz emacs-e0bc17abe6979d607e8de4684dddb96e53c60065.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-639
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-640
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-641
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-642
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-643
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-644
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-645
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-646
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-647
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-648
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-649
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-650
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-651
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-652
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-59
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-60
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-61
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-62
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-63
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-263
Diffstat (limited to 'src/indent.c')
| -rw-r--r-- | src/indent.c | 53 |
1 files changed, 25 insertions, 28 deletions
diff --git a/src/indent.c b/src/indent.c index ffde428c12f..99fca1c2ff7 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -1885,7 +1885,7 @@ vmotion (from, vtarget, w) | |||
| 1885 | struct position pos; | 1885 | struct position pos; |
| 1886 | /* vpos is cumulative vertical position, changed as from is changed */ | 1886 | /* vpos is cumulative vertical position, changed as from is changed */ |
| 1887 | register int vpos = 0; | 1887 | register int vpos = 0; |
| 1888 | Lisp_Object prevline; | 1888 | int prevline; |
| 1889 | register int first; | 1889 | register int first; |
| 1890 | int from_byte; | 1890 | int from_byte; |
| 1891 | int lmargin = hscroll > 0 ? 1 - hscroll : 0; | 1891 | int lmargin = hscroll > 0 ? 1 - hscroll : 0; |
| @@ -1919,23 +1919,21 @@ vmotion (from, vtarget, w) | |||
| 1919 | { | 1919 | { |
| 1920 | Lisp_Object propval; | 1920 | Lisp_Object propval; |
| 1921 | 1921 | ||
| 1922 | XSETFASTINT (prevline, find_next_newline_no_quit (from - 1, -1)); | 1922 | prevline = find_next_newline_no_quit (from - 1, -1); |
| 1923 | while (XFASTINT (prevline) > BEGV | 1923 | while (prevline > BEGV |
| 1924 | && ((selective > 0 | 1924 | && ((selective > 0 |
| 1925 | && indented_beyond_p (XFASTINT (prevline), | 1925 | && indented_beyond_p (prevline, |
| 1926 | CHAR_TO_BYTE (XFASTINT (prevline)), | 1926 | CHAR_TO_BYTE (prevline), |
| 1927 | (double) selective)) /* iftc */ | 1927 | (double) selective)) /* iftc */ |
| 1928 | /* watch out for newlines with `invisible' property */ | 1928 | /* Watch out for newlines with `invisible' property. |
| 1929 | || (propval = Fget_char_property (prevline, | 1929 | When moving upward, check the newline before. */ |
| 1930 | || (propval = Fget_char_property (make_number (prevline - 1), | ||
| 1930 | Qinvisible, | 1931 | Qinvisible, |
| 1931 | text_prop_object), | 1932 | text_prop_object), |
| 1932 | TEXT_PROP_MEANS_INVISIBLE (propval)))) | 1933 | TEXT_PROP_MEANS_INVISIBLE (propval)))) |
| 1933 | XSETFASTINT (prevline, | 1934 | prevline = find_next_newline_no_quit (prevline - 1, -1); |
| 1934 | find_next_newline_no_quit (XFASTINT (prevline) - 1, | 1935 | pos = *compute_motion (prevline, 0, |
| 1935 | -1)); | 1936 | lmargin + (prevline == BEG ? start_hpos : 0), |
| 1936 | pos = *compute_motion (XFASTINT (prevline), 0, | ||
| 1937 | lmargin + (XFASTINT (prevline) == BEG | ||
| 1938 | ? start_hpos : 0), | ||
| 1939 | 0, | 1937 | 0, |
| 1940 | from, | 1938 | from, |
| 1941 | /* Don't care for VPOS... */ | 1939 | /* Don't care for VPOS... */ |
| @@ -1946,12 +1944,11 @@ vmotion (from, vtarget, w) | |||
| 1946 | /* This compensates for start_hpos | 1944 | /* This compensates for start_hpos |
| 1947 | so that a tab as first character | 1945 | so that a tab as first character |
| 1948 | still occupies 8 columns. */ | 1946 | still occupies 8 columns. */ |
| 1949 | (XFASTINT (prevline) == BEG | 1947 | (prevline == BEG ? -start_hpos : 0), |
| 1950 | ? -start_hpos : 0), | ||
| 1951 | w); | 1948 | w); |
| 1952 | vpos -= pos.vpos; | 1949 | vpos -= pos.vpos; |
| 1953 | first = 0; | 1950 | first = 0; |
| 1954 | from = XFASTINT (prevline); | 1951 | from = prevline; |
| 1955 | } | 1952 | } |
| 1956 | 1953 | ||
| 1957 | /* If we made exactly the desired vertical distance, | 1954 | /* If we made exactly the desired vertical distance, |
| @@ -1979,21 +1976,21 @@ vmotion (from, vtarget, w) | |||
| 1979 | { | 1976 | { |
| 1980 | Lisp_Object propval; | 1977 | Lisp_Object propval; |
| 1981 | 1978 | ||
| 1982 | XSETFASTINT (prevline, find_next_newline_no_quit (from, -1)); | 1979 | prevline = find_next_newline_no_quit (from, -1); |
| 1983 | while (XFASTINT (prevline) > BEGV | 1980 | while (prevline > BEGV |
| 1984 | && ((selective > 0 | 1981 | && ((selective > 0 |
| 1985 | && indented_beyond_p (XFASTINT (prevline), | 1982 | && indented_beyond_p (prevline, |
| 1986 | CHAR_TO_BYTE (XFASTINT (prevline)), | 1983 | CHAR_TO_BYTE (prevline), |
| 1987 | (double) selective)) /* iftc */ | 1984 | (double) selective)) /* iftc */ |
| 1988 | /* watch out for newlines with `invisible' property */ | 1985 | /* Watch out for newlines with `invisible' property. |
| 1989 | || (propval = Fget_char_property (prevline, Qinvisible, | 1986 | When moving downward, check the newline after. */ |
| 1987 | || (propval = Fget_char_property (make_number (prevline), | ||
| 1988 | Qinvisible, | ||
| 1990 | text_prop_object), | 1989 | text_prop_object), |
| 1991 | TEXT_PROP_MEANS_INVISIBLE (propval)))) | 1990 | TEXT_PROP_MEANS_INVISIBLE (propval)))) |
| 1992 | XSETFASTINT (prevline, | 1991 | prevline = find_next_newline_no_quit (prevline - 1, -1); |
| 1993 | find_next_newline_no_quit (XFASTINT (prevline) - 1, | 1992 | pos = *compute_motion (prevline, 0, |
| 1994 | -1)); | 1993 | lmargin + (prevline == BEG |
| 1995 | pos = *compute_motion (XFASTINT (prevline), 0, | ||
| 1996 | lmargin + (XFASTINT (prevline) == BEG | ||
| 1997 | ? start_hpos : 0), | 1994 | ? start_hpos : 0), |
| 1998 | 0, | 1995 | 0, |
| 1999 | from, | 1996 | from, |
| @@ -2002,7 +1999,7 @@ vmotion (from, vtarget, w) | |||
| 2002 | /* ... nor HPOS. */ | 1999 | /* ... nor HPOS. */ |
| 2003 | 1 << (BITS_PER_SHORT - 1), | 2000 | 1 << (BITS_PER_SHORT - 1), |
| 2004 | -1, hscroll, | 2001 | -1, hscroll, |
| 2005 | (XFASTINT (prevline) == BEG ? -start_hpos : 0), | 2002 | (prevline == BEG ? -start_hpos : 0), |
| 2006 | w); | 2003 | w); |
| 2007 | did_motion = 1; | 2004 | did_motion = 1; |
| 2008 | } | 2005 | } |