diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 30 | ||||
| -rw-r--r-- | src/composite.c | 4 | ||||
| -rw-r--r-- | src/editfns.c | 4 | ||||
| -rw-r--r-- | src/term.c | 2 | ||||
| -rw-r--r-- | src/w32term.c | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 15 | ||||
| -rw-r--r-- | src/xterm.c | 2 |
7 files changed, 53 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3dbddc9b215..15281f47438 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,33 @@ | |||
| 1 | 2011-09-15 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514). | ||
| 4 | Don't mishandle (length (format "%%")) and (format "%4000s%%" ""). | ||
| 5 | |||
| 6 | 2011-09-15 Andreas Schwab <schwab@linux-m68k.org> | ||
| 7 | |||
| 8 | * editfns.c (Fformat): Correctly handle text properties on "%%". | ||
| 9 | |||
| 10 | 2011-09-15 Eli Zaretskii <eliz@gnu.org> | ||
| 11 | |||
| 12 | * xterm.c (x_draw_composite_glyph_string_foreground): | ||
| 13 | * w32term.c (x_draw_composite_glyph_string_foreground): | ||
| 14 | * term.c (encode_terminal_code): | ||
| 15 | * composite.c (composition_update_it, get_composition_id): | ||
| 16 | * xdisp.c (get_next_display_element) | ||
| 17 | (fill_composite_glyph_string): Add comments about special meaning | ||
| 18 | of TAB characters in a composition. | ||
| 19 | |||
| 20 | 2011-09-15 Paul Eggert <eggert@cs.ucla.edu> | ||
| 21 | |||
| 22 | * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514). | ||
| 23 | This occurs when processing a multibyte format. | ||
| 24 | Problem reported by Wolfgang Jenker. | ||
| 25 | |||
| 26 | 2011-09-15 Johan Bockgård <bojohan@gnu.org> | ||
| 27 | |||
| 28 | * xdisp.c (try_cursor_movement): Only check for exact match if | ||
| 29 | cursor hpos found by set_cursor_from_row is valid. (Bug#9495) | ||
| 30 | |||
| 1 | 2011-09-14 Paul Eggert <eggert@cs.ucla.edu> | 31 | 2011-09-14 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 32 | ||
| 3 | Remove unused external symbols. | 33 | Remove unused external symbols. |
diff --git a/src/composite.c b/src/composite.c index 2a3fbe29552..c8e4dd082ae 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -345,6 +345,8 @@ get_composition_id (EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT nchars, | |||
| 345 | { | 345 | { |
| 346 | int this_width; | 346 | int this_width; |
| 347 | ch = XINT (key_contents[i]); | 347 | ch = XINT (key_contents[i]); |
| 348 | /* TAB in a composition means display glyphs with padding | ||
| 349 | space on the left or right. */ | ||
| 348 | this_width = (ch == '\t' ? 1 : CHAR_WIDTH (ch)); | 350 | this_width = (ch == '\t' ? 1 : CHAR_WIDTH (ch)); |
| 349 | if (cmp->width < this_width) | 351 | if (cmp->width < this_width) |
| 350 | cmp->width = this_width; | 352 | cmp->width = this_width; |
| @@ -1384,6 +1386,8 @@ composition_update_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_I | |||
| 1384 | else | 1386 | else |
| 1385 | { | 1387 | { |
| 1386 | for (i = 0; i < cmp->glyph_len; i++) | 1388 | for (i = 0; i < cmp->glyph_len; i++) |
| 1389 | /* TAB in a composition means display glyphs with padding | ||
| 1390 | space on the left or right. */ | ||
| 1387 | if ((c = COMPOSITION_GLYPH (cmp, i)) != '\t') | 1391 | if ((c = COMPOSITION_GLYPH (cmp, i)) != '\t') |
| 1388 | break; | 1392 | break; |
| 1389 | if (c == '\t') | 1393 | if (c == '\t') |
diff --git a/src/editfns.c b/src/editfns.c index 596765d899e..3dd58377ada 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -4137,8 +4137,8 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 4137 | format++; | 4137 | format++; |
| 4138 | while (! CHAR_HEAD_P (*format)); | 4138 | while (! CHAR_HEAD_P (*format)); |
| 4139 | 4139 | ||
| 4140 | convbytes = format - format0; | 4140 | convbytes = format - src; |
| 4141 | memset (&discarded[format0 + 1 - format_start], 2, convbytes - 1); | 4141 | memset (&discarded[src + 1 - format_start], 2, convbytes - 1); |
| 4142 | } | 4142 | } |
| 4143 | else | 4143 | else |
| 4144 | { | 4144 | { |
diff --git a/src/term.c b/src/term.c index 10416090b80..4a671d048c4 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -574,6 +574,8 @@ encode_terminal_code (struct glyph *src, int src_len, struct coding_system *codi | |||
| 574 | { | 574 | { |
| 575 | int c = COMPOSITION_GLYPH (cmp, i); | 575 | int c = COMPOSITION_GLYPH (cmp, i); |
| 576 | 576 | ||
| 577 | /* TAB in a composition means display glyphs with | ||
| 578 | padding space on the left or right. */ | ||
| 577 | if (c == '\t') | 579 | if (c == '\t') |
| 578 | continue; | 580 | continue; |
| 579 | if (char_charset (c, charset_list, NULL)) | 581 | if (char_charset (c, charset_list, NULL)) |
diff --git a/src/w32term.c b/src/w32term.c index 8d9d8f72029..39f1e245e18 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -1294,6 +1294,8 @@ x_draw_composite_glyph_string_foreground (struct glyph_string *s) | |||
| 1294 | old_font = SelectObject (s->hdc, FONT_HANDLE (font)); | 1294 | old_font = SelectObject (s->hdc, FONT_HANDLE (font)); |
| 1295 | 1295 | ||
| 1296 | for (i = 0, j = s->cmp_from; i < s->nchars; i++, j++) | 1296 | for (i = 0, j = s->cmp_from; i < s->nchars; i++, j++) |
| 1297 | /* TAB in a composition means display glyphs with padding | ||
| 1298 | space on the left or right. */ | ||
| 1297 | if (COMPOSITION_GLYPH (s->cmp, j) != '\t') | 1299 | if (COMPOSITION_GLYPH (s->cmp, j) != '\t') |
| 1298 | { | 1300 | { |
| 1299 | int xx = x + s->cmp->offsets[j * 2]; | 1301 | int xx = x + s->cmp->offsets[j * 2]; |
diff --git a/src/xdisp.c b/src/xdisp.c index 32007f52f4d..ddbbcbb1278 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -6479,6 +6479,8 @@ get_next_display_element (struct it *it) | |||
| 6479 | 6479 | ||
| 6480 | c = ' '; | 6480 | c = ' '; |
| 6481 | for (i = 0; i < cmp->glyph_len; i++) | 6481 | for (i = 0; i < cmp->glyph_len; i++) |
| 6482 | /* TAB in a composition means display glyphs with | ||
| 6483 | padding space on the left or right. */ | ||
| 6482 | if ((c = COMPOSITION_GLYPH (cmp, i)) != '\t') | 6484 | if ((c = COMPOSITION_GLYPH (cmp, i)) != '\t') |
| 6483 | break; | 6485 | break; |
| 6484 | } | 6486 | } |
| @@ -11970,9 +11972,9 @@ hscroll_window_tree (Lisp_Object window) | |||
| 11970 | } | 11972 | } |
| 11971 | hscroll = max (hscroll, XFASTINT (w->min_hscroll)); | 11973 | hscroll = max (hscroll, XFASTINT (w->min_hscroll)); |
| 11972 | 11974 | ||
| 11973 | /* Don't call Fset_window_hscroll if value hasn't | 11975 | /* Don't prevent redisplay optimizations if hscroll |
| 11974 | changed because it will prevent redisplay | 11976 | hasn't changed, as it will unnecessarily slow down |
| 11975 | optimizations. */ | 11977 | redisplay. */ |
| 11976 | if (XFASTINT (w->hscroll) != hscroll) | 11978 | if (XFASTINT (w->hscroll) != hscroll) |
| 11977 | { | 11979 | { |
| 11978 | XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1; | 11980 | XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1; |
| @@ -14688,7 +14690,10 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 14688 | is set, we are done. */ | 14690 | is set, we are done. */ |
| 14689 | at_zv_p = | 14691 | at_zv_p = |
| 14690 | MATRIX_ROW (w->current_matrix, w->cursor.vpos)->ends_at_zv_p; | 14692 | MATRIX_ROW (w->current_matrix, w->cursor.vpos)->ends_at_zv_p; |
| 14691 | if (!at_zv_p) | 14693 | if (rv && !at_zv_p |
| 14694 | && w->cursor.hpos >= 0 | ||
| 14695 | && w->cursor.hpos < MATRIX_ROW_USED (w->current_matrix, | ||
| 14696 | w->cursor.vpos)) | ||
| 14692 | { | 14697 | { |
| 14693 | struct glyph_row *candidate = | 14698 | struct glyph_row *candidate = |
| 14694 | MATRIX_ROW (w->current_matrix, w->cursor.vpos); | 14699 | MATRIX_ROW (w->current_matrix, w->cursor.vpos); |
| @@ -21835,6 +21840,8 @@ fill_composite_glyph_string (struct glyph_string *s, struct face *base_face, | |||
| 21835 | { | 21840 | { |
| 21836 | int c = COMPOSITION_GLYPH (s->cmp, i); | 21841 | int c = COMPOSITION_GLYPH (s->cmp, i); |
| 21837 | 21842 | ||
| 21843 | /* TAB in a composition means display glyphs with padding space | ||
| 21844 | on the left or right. */ | ||
| 21838 | if (c != '\t') | 21845 | if (c != '\t') |
| 21839 | { | 21846 | { |
| 21840 | int face_id = FACE_FOR_CHAR (s->f, base_face->ascii_face, c, | 21847 | int face_id = FACE_FOR_CHAR (s->f, base_face->ascii_face, c, |
diff --git a/src/xterm.c b/src/xterm.c index 0c096e8f729..1357afa0c15 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -1309,6 +1309,8 @@ x_draw_composite_glyph_string_foreground (struct glyph_string *s) | |||
| 1309 | int y = s->ybase; | 1309 | int y = s->ybase; |
| 1310 | 1310 | ||
| 1311 | for (i = 0, j = s->cmp_from; i < s->nchars; i++, j++) | 1311 | for (i = 0, j = s->cmp_from; i < s->nchars; i++, j++) |
| 1312 | /* TAB in a composition means display glyphs with padding | ||
| 1313 | space on the left or right. */ | ||
| 1312 | if (COMPOSITION_GLYPH (s->cmp, j) != '\t') | 1314 | if (COMPOSITION_GLYPH (s->cmp, j) != '\t') |
| 1313 | { | 1315 | { |
| 1314 | int xx = x + s->cmp->offsets[j * 2]; | 1316 | int xx = x + s->cmp->offsets[j * 2]; |