diff options
| author | Kenichi Handa | 2008-09-12 05:38:37 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-09-12 05:38:37 +0000 |
| commit | 29fb730696760dc6d4daf6c3373cede85c9033f2 (patch) | |
| tree | 9c86ec5173d58340776924b771ac26ea0473794f /src/composite.c | |
| parent | ed5ff21d09be6c15cefcc000fe266604a4c83544 (diff) | |
| download | emacs-29fb730696760dc6d4daf6c3373cede85c9033f2.tar.gz emacs-29fb730696760dc6d4daf6c3373cede85c9033f2.zip | |
(composition_reseat_it): If the current buffer is
not associated with a window, ignore the automatic composition.
(find_automatic_composition): Likewise.
Diffstat (limited to 'src/composite.c')
| -rw-r--r-- | src/composite.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/composite.c b/src/composite.c index 92e7a1e44cb..b017721de67 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -1093,7 +1093,7 @@ composition_reseat_it (cmp_it, charpos, bytepos, endpos, w, face, string) | |||
| 1093 | cmp_it->nchars = end - start; | 1093 | cmp_it->nchars = end - start; |
| 1094 | cmp_it->nglyphs = composition_table[cmp_it->id]->glyph_len; | 1094 | cmp_it->nglyphs = composition_table[cmp_it->id]->glyph_len; |
| 1095 | } | 1095 | } |
| 1096 | else | 1096 | else if (w) |
| 1097 | { | 1097 | { |
| 1098 | Lisp_Object val, elt; | 1098 | Lisp_Object val, elt; |
| 1099 | int i; | 1099 | int i; |
| @@ -1119,6 +1119,8 @@ composition_reseat_it (cmp_it, charpos, bytepos, endpos, w, face, string) | |||
| 1119 | break; | 1119 | break; |
| 1120 | cmp_it->nglyphs = i; | 1120 | cmp_it->nglyphs = i; |
| 1121 | } | 1121 | } |
| 1122 | else | ||
| 1123 | goto no_composition; | ||
| 1122 | cmp_it->from = 0; | 1124 | cmp_it->from = 0; |
| 1123 | return 1; | 1125 | return 1; |
| 1124 | 1126 | ||
| @@ -1255,8 +1257,14 @@ find_automatic_composition (pos, limit, start, end, gstring, string) | |||
| 1255 | Lisp_Object check_val, val, elt; | 1257 | Lisp_Object check_val, val, elt; |
| 1256 | int check_lookback; | 1258 | int check_lookback; |
| 1257 | int c; | 1259 | int c; |
| 1260 | Lisp_Object window; | ||
| 1258 | struct window *w; | 1261 | struct window *w; |
| 1259 | 1262 | ||
| 1263 | window = Fget_buffer_create (Fcurrent_buffer ()); | ||
| 1264 | if (NILP (window)) | ||
| 1265 | return 0; | ||
| 1266 | w = XWINDOW (window); | ||
| 1267 | |||
| 1260 | orig.pos = pos; | 1268 | orig.pos = pos; |
| 1261 | if (NILP (string)) | 1269 | if (NILP (string)) |
| 1262 | { | 1270 | { |
| @@ -1279,7 +1287,6 @@ find_automatic_composition (pos, limit, start, end, gstring, string) | |||
| 1279 | { | 1287 | { |
| 1280 | tail = min (tail, limit + 3); | 1288 | tail = min (tail, limit + 3); |
| 1281 | } | 1289 | } |
| 1282 | w = XWINDOW (selected_window); | ||
| 1283 | cur = orig; | 1290 | cur = orig; |
| 1284 | 1291 | ||
| 1285 | retry: | 1292 | retry: |