Mercurial > emacs
comparison src/indent.c @ 90261:7beb78bc1f8e
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-97
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 616-696)
- Add lisp/mh-e/.arch-inventory
- Update from CVS
- Merge from gnus--rel--5.10
- Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords.
- lisp/gnus/ChangeLog: Remove duplicate entry
* gnus--rel--5.10 (patch 147-181)
- Update from CVS
- Merge from emacs--cvs-trunk--0
- Update from CVS: lisp/mml.el (mml-preview): Doc fix.
- Update from CVS: texi/message.texi: Fix default values.
- Update from CVS: texi/gnus.texi (RSS): Addition.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 16 Jan 2006 08:37:27 +0000 |
parents | 2d92f5c9d6ae a405a1787bef |
children | c5406394f567 |
comparison
equal
deleted
inserted
replaced
90260:0ca0d9181b5e | 90261:7beb78bc1f8e |
---|---|
2072 } | 2072 } |
2073 else | 2073 else |
2074 { | 2074 { |
2075 int it_start; | 2075 int it_start; |
2076 int oselective; | 2076 int oselective; |
2077 int start_on_image_p; | 2077 int start_on_image_or_stretch_p; |
2078 | 2078 |
2079 SET_TEXT_POS (pt, PT, PT_BYTE); | 2079 SET_TEXT_POS (pt, PT, PT_BYTE); |
2080 start_display (&it, w, pt); | 2080 start_display (&it, w, pt); |
2081 | 2081 |
2082 /* Scan from the start of the line containing PT. If we don't | 2082 /* Scan from the start of the line containing PT. If we don't |
2084 really at some x > 0. The effect is, in continuation lines, that | 2084 really at some x > 0. The effect is, in continuation lines, that |
2085 we end up with the iterator placed at where it thinks X is 0, | 2085 we end up with the iterator placed at where it thinks X is 0, |
2086 while the end position is really at some X > 0, the same X that | 2086 while the end position is really at some X > 0, the same X that |
2087 PT had. */ | 2087 PT had. */ |
2088 it_start = IT_CHARPOS (it); | 2088 it_start = IT_CHARPOS (it); |
2089 start_on_image_p = (it.method == GET_FROM_IMAGE); | 2089 start_on_image_or_stretch_p = (it.method == GET_FROM_IMAGE |
2090 || it.method == GET_FROM_STRETCH); | |
2090 reseat_at_previous_visible_line_start (&it); | 2091 reseat_at_previous_visible_line_start (&it); |
2091 it.current_x = it.hpos = 0; | 2092 it.current_x = it.hpos = 0; |
2092 /* Temporarily disable selective display so we don't move too far */ | 2093 /* Temporarily disable selective display so we don't move too far */ |
2093 oselective = it.selective; | 2094 oselective = it.selective; |
2094 it.selective = 0; | 2095 it.selective = 0; |
2095 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); | 2096 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); |
2096 it.selective = oselective; | 2097 it.selective = oselective; |
2097 | 2098 |
2098 /* Move back if we got too far. This may happen if | 2099 /* Move back if we got too far. This may happen if |
2099 truncate-lines is on and PT is beyond right margin. | 2100 truncate-lines is on and PT is beyond right margin. |
2100 It may also happen if it_start is on an image -- | 2101 It may also happen if it_start is on an image or a stretch |
2101 in that case, don't go back. */ | 2102 glyph -- in that case, don't go back. */ |
2102 if (IT_CHARPOS (it) > it_start && XINT (lines) > 0 && !start_on_image_p) | 2103 if (IT_CHARPOS (it) > it_start && XINT (lines) > 0 |
2104 && !start_on_image_or_stretch_p) | |
2103 move_it_by_lines (&it, -1, 0); | 2105 move_it_by_lines (&it, -1, 0); |
2104 | 2106 |
2105 it.vpos = 0; | 2107 it.vpos = 0; |
2106 /* Do this even if LINES is 0, so that we move back | 2108 /* Do this even if LINES is 0, so that we move back |
2107 to the beginning of the current line as we ought. */ | 2109 to the beginning of the current line as we ought. */ |