aboutsummaryrefslogtreecommitdiffstats
path: root/src/composite.c
diff options
context:
space:
mode:
authorJoakim Verona2012-07-27 02:22:03 +0200
committerJoakim Verona2012-07-27 02:22:03 +0200
commit5fb63197843dcae66f2fe0ddd6f4a9d560e9db2f (patch)
tree5c55f1096a656a9759f0b53a0b5d1a2289bd366f /src/composite.c
parent0c5c85cf2b350c965bb1ffa5b2d77c2adebc406b (diff)
parent562157c814037dcba58a20cd6908a95992c22283 (diff)
downloademacs-5fb63197843dcae66f2fe0ddd6f4a9d560e9db2f.tar.gz
emacs-5fb63197843dcae66f2fe0ddd6f4a9d560e9db2f.zip
upstream
Diffstat (limited to 'src/composite.c')
-rw-r--r--src/composite.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/composite.c b/src/composite.c
index 6070e4070f0..bfc8093a87f 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -158,9 +158,6 @@ static Lisp_Object Qauto_composition_function;
158 auto-compositions. */ 158 auto-compositions. */
159#define MAX_AUTO_COMPOSITION_LOOKBACK 3 159#define MAX_AUTO_COMPOSITION_LOOKBACK 3
160 160
161static Lisp_Object Fcomposition_get_gstring (Lisp_Object, Lisp_Object,
162 Lisp_Object, Lisp_Object);
163
164/* Temporary variable used in macros COMPOSITION_XXX. */ 161/* Temporary variable used in macros COMPOSITION_XXX. */
165Lisp_Object composition_temp; 162Lisp_Object composition_temp;
166 163
@@ -240,13 +237,13 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
240 for (i = 0; i < nchars; i++) 237 for (i = 0; i < nchars; i++)
241 { 238 {
242 FETCH_STRING_CHAR_ADVANCE (ch, string, charpos, bytepos); 239 FETCH_STRING_CHAR_ADVANCE (ch, string, charpos, bytepos);
243 XVECTOR (key)->contents[i] = make_number (ch); 240 ASET (key, i, make_number (ch));
244 } 241 }
245 else 242 else
246 for (i = 0; i < nchars; i++) 243 for (i = 0; i < nchars; i++)
247 { 244 {
248 FETCH_CHAR_ADVANCE (ch, charpos, bytepos); 245 FETCH_CHAR_ADVANCE (ch, charpos, bytepos);
249 XVECTOR (key)->contents[i] = make_number (ch); 246 ASET (key, i, make_number (ch));
250 } 247 }
251 } 248 }
252 else 249 else
@@ -329,7 +326,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
329 memory_full (SIZE_MAX); 326 memory_full (SIZE_MAX);
330 327
331 /* Register the composition in composition_table. */ 328 /* Register the composition in composition_table. */
332 cmp = (struct composition *) xmalloc (sizeof (struct composition)); 329 cmp = xmalloc (sizeof *cmp);
333 330
334 cmp->method = method; 331 cmp->method = method;
335 cmp->hash_index = hash_index; 332 cmp->hash_index = hash_index;
@@ -954,11 +951,8 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t
954 951
955 /* Save point as marker before calling out to lisp. */ 952 /* Save point as marker before calling out to lisp. */
956 if (NILP (string)) 953 if (NILP (string))
957 { 954 record_unwind_protect (restore_point_unwind,
958 Lisp_Object m = Fmake_marker (); 955 build_marker (current_buffer, pt, pt_byte));
959 set_marker_both (m, Qnil, pt, pt_byte);
960 record_unwind_protect (restore_point_unwind, m);
961 }
962 956
963 args[0] = Vauto_composition_function; 957 args[0] = Vauto_composition_function;
964 args[1] = AREF (rule, 2); 958 args[1] = AREF (rule, 2);