aboutsummaryrefslogtreecommitdiffstats
path: root/src/composite.c
diff options
context:
space:
mode:
authorEli Zaretskii2014-10-14 21:10:37 +0300
committerEli Zaretskii2014-10-14 21:10:37 +0300
commite3060a0c4d2f418ac786775109d71e5843ccf42e (patch)
tree347b37fc39d0db9cd23b3e9f79ee81b4bbc40f08 /src/composite.c
parent1a3eca0656bdb764200e10a4f264138e94b1f3ce (diff)
parent980d78b3587560c13a46aef352ed8d5ed744acf6 (diff)
downloademacs-e3060a0c4d2f418ac786775109d71e5843ccf42e.tar.gz
emacs-e3060a0c4d2f418ac786775109d71e5843ccf42e.zip
Merge from trunk and resolve conflicts.
Diffstat (limited to 'src/composite.c')
-rw-r--r--src/composite.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/composite.c b/src/composite.c
index 66a20759ec6..8982c904096 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -928,7 +928,7 @@ static bool
928char_composable_p (int c) 928char_composable_p (int c)
929{ 929{
930 Lisp_Object val; 930 Lisp_Object val;
931 return (c > ' ' 931 return (c > ' '
932 && (c == 0x200C || c == 0x200D 932 && (c == 0x200C || c == 0x200D
933 || (val = CHAR_TABLE_REF (Vunicode_category_table, c), 933 || (val = CHAR_TABLE_REF (Vunicode_category_table, c),
934 (INTEGERP (val) && (XINT (val) <= UNICODE_CATEGORY_So))))); 934 (INTEGERP (val) && (XINT (val) <= UNICODE_CATEGORY_So)))));
@@ -1016,24 +1016,19 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos,
1016 val = CHAR_TABLE_REF (Vcomposition_function_table, c); 1016 val = CHAR_TABLE_REF (Vcomposition_function_table, c);
1017 if (! NILP (val)) 1017 if (! NILP (val))
1018 { 1018 {
1019 Lisp_Object elt; 1019 for (int ridx = 0; CONSP (val); val = XCDR (val), ridx++)
1020 int ridx;
1021
1022 for (ridx = 0; CONSP (val); val = XCDR (val), ridx++)
1023 { 1020 {
1024 elt = XCAR (val); 1021 Lisp_Object elt = XCAR (val);
1025 if (VECTORP (elt) && ASIZE (elt) == 3 1022 if (VECTORP (elt) && ASIZE (elt) == 3
1026 && NATNUMP (AREF (elt, 1)) 1023 && NATNUMP (AREF (elt, 1))
1027 && charpos - 1 - XFASTINT (AREF (elt, 1)) >= start) 1024 && charpos - 1 - XFASTINT (AREF (elt, 1)) >= start)
1028 break; 1025 {
1029 } 1026 cmp_it->rule_idx = ridx;
1030 if (CONSP (val)) 1027 cmp_it->lookback = XFASTINT (AREF (elt, 1));
1031 { 1028 cmp_it->stop_pos = charpos - 1 - cmp_it->lookback;
1032 cmp_it->rule_idx = ridx; 1029 cmp_it->ch = c;
1033 cmp_it->lookback = XFASTINT (AREF (elt, 1)); 1030 return;
1034 cmp_it->stop_pos = charpos - 1 - cmp_it->lookback; 1031 }
1035 cmp_it->ch = c;
1036 return;
1037 } 1032 }
1038 } 1033 }
1039 } 1034 }
@@ -1724,7 +1719,7 @@ should be ignored. */)
1724 if (! FONT_OBJECT_P (font_object)) 1719 if (! FONT_OBJECT_P (font_object))
1725 { 1720 {
1726 struct coding_system *coding; 1721 struct coding_system *coding;
1727 struct terminal *terminal = get_terminal (font_object, 1); 1722 struct terminal *terminal = decode_live_terminal (font_object);
1728 1723
1729 coding = ((TERMINAL_TERMINAL_CODING (terminal)->common_flags 1724 coding = ((TERMINAL_TERMINAL_CODING (terminal)->common_flags
1730 & CODING_REQUIRE_ENCODING_MASK) 1725 & CODING_REQUIRE_ENCODING_MASK)