diff options
Diffstat (limited to 'src/composite.c')
-rw-r--r-- | src/composite.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/src/composite.c b/src/composite.c index 0b0602bf283..bc5644a4612 100644 --- a/src/composite.c +++ b/src/composite.c @@ -1115,7 +1115,7 @@ composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos, if (! NILP (val)) { Lisp_Object elt; - int ridx, back, len; + int ridx, back, blen; for (ridx = 0; CONSP (val); val = XCDR (val), ridx++) { @@ -1132,17 +1132,17 @@ composition_compute_stop_pos (struct composition_it *cmp_it, EMACS_INT charpos, bpos = (NILP (string) ? CHAR_TO_BYTE (cpos) : string_char_to_byte (string, cpos)); if (STRINGP (AREF (elt, 0))) - len = fast_looking_at (AREF (elt, 0), cpos, bpos, - start + 1, limit, string); + blen = fast_looking_at (AREF (elt, 0), cpos, bpos, + start + 1, limit, string); else - len = 1; - if (len > 0) + blen = 1; + if (blen > 0) { /* Make CPOS point to the last character of - match. Note that LEN is byte-length. */ - if (len > 1) + match. Note that BLEN is byte-length. */ + if (blen > 1) { - bpos += len; + bpos += blen; if (NILP (string)) cpos = BYTE_TO_CHAR (bpos) - 1; else @@ -1248,8 +1248,8 @@ composition_reseat_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_I else if (w) { Lisp_Object lgstring = Qnil; - Lisp_Object val, elt, re; - int len, i; + Lisp_Object val, elt; + int i; val = CHAR_TABLE_REF (Vcomposition_function_table, cmp_it->ch); for (i = 0; i < cmp_it->rule_idx; i++, val = XCDR (val)); @@ -1364,7 +1364,7 @@ composition_reseat_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_I int composition_update_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_INT bytepos, Lisp_Object string) { - int i, c; + int i, c IF_LINT (= 0); if (cmp_it->ch < 0) { @@ -1489,9 +1489,14 @@ find_automatic_composition (EMACS_INT pos, EMACS_INT limit, EMACS_INT *start, EM EMACS_INT head, tail, stop; /* Limit to check a composition after POS. */ EMACS_INT fore_check_limit; - struct position_record orig, cur, check, prev; + struct position_record orig, cur; + + /* FIXME: It's not obvious whether these two variables need initialization. + If they do, please supply initial values. + If not, please remove this comment. */ + struct position_record check IF_LINT (= {0}), prev IF_LINT (= {0}); + Lisp_Object check_val, val, elt; - int check_lookback; int c; Lisp_Object window; struct window *w; @@ -1657,7 +1662,7 @@ find_automatic_composition (EMACS_INT pos, EMACS_INT limit, EMACS_INT *start, EM EMACS_INT composition_adjust_point (EMACS_INT last_pt, EMACS_INT new_pt) { - EMACS_INT charpos, bytepos, startpos, beg, end, pos; + EMACS_INT beg, end; Lisp_Object val; int i; @@ -2032,4 +2037,3 @@ See also the documentation of `auto-composition-mode'. */); defsubr (&Sfind_composition_internal); defsubr (&Scomposition_get_gstring); } - |