diff options
Diffstat (limited to 'src/fontset.c')
| -rw-r--r-- | src/fontset.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/src/fontset.c b/src/fontset.c index 1f877eb606a..07f42331170 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -281,10 +281,10 @@ set_fontset_fallback (Lisp_Object fontset, Lisp_Object fallback) | |||
| 281 | ASET ((rfont_def), 3, make_fixnum (score)) | 281 | ASET ((rfont_def), 3, make_fixnum (score)) |
| 282 | #define RFONT_DEF_NEW(rfont_def, font_def) \ | 282 | #define RFONT_DEF_NEW(rfont_def, font_def) \ |
| 283 | do { \ | 283 | do { \ |
| 284 | (rfont_def) = Fmake_vector (make_fixnum (4), Qnil); \ | 284 | (rfont_def) = make_nil_vector (4); \ |
| 285 | ASET ((rfont_def), 1, (font_def)); \ | 285 | ASET (rfont_def, 1, font_def); \ |
| 286 | RFONT_DEF_SET_SCORE ((rfont_def), 0); \ | 286 | RFONT_DEF_SET_SCORE (rfont_def, 0); \ |
| 287 | } while (0) | 287 | } while (false) |
| 288 | 288 | ||
| 289 | 289 | ||
| 290 | /* Return the element of FONTSET for the character C. If FONTSET is a | 290 | /* Return the element of FONTSET for the character C. If FONTSET is a |
| @@ -327,11 +327,8 @@ fontset_ref (Lisp_Object fontset, int c) | |||
| 327 | #define FONTSET_ADD(fontset, range, elt, add) \ | 327 | #define FONTSET_ADD(fontset, range, elt, add) \ |
| 328 | (NILP (add) \ | 328 | (NILP (add) \ |
| 329 | ? (NILP (range) \ | 329 | ? (NILP (range) \ |
| 330 | ? (set_fontset_fallback \ | 330 | ? set_fontset_fallback (fontset, make_vector (1, elt)) \ |
| 331 | (fontset, Fmake_vector (make_fixnum (1), (elt)))) \ | 331 | : (void) Fset_char_table_range (fontset, range, make_vector (1, elt))) \ |
| 332 | : ((void) \ | ||
| 333 | Fset_char_table_range (fontset, range, \ | ||
| 334 | Fmake_vector (make_fixnum (1), elt)))) \ | ||
| 335 | : fontset_add ((fontset), (range), (elt), (add))) | 332 | : fontset_add ((fontset), (range), (elt), (add))) |
| 336 | 333 | ||
| 337 | static void | 334 | static void |
| @@ -340,7 +337,7 @@ fontset_add (Lisp_Object fontset, Lisp_Object range, Lisp_Object elt, Lisp_Objec | |||
| 340 | Lisp_Object args[2]; | 337 | Lisp_Object args[2]; |
| 341 | int idx = (EQ (add, Qappend) ? 0 : 1); | 338 | int idx = (EQ (add, Qappend) ? 0 : 1); |
| 342 | 339 | ||
| 343 | args[1 - idx] = Fmake_vector (make_fixnum (1), elt); | 340 | args[1 - idx] = make_vector (1, elt); |
| 344 | 341 | ||
| 345 | if (CONSP (range)) | 342 | if (CONSP (range)) |
| 346 | { | 343 | { |
| @@ -701,7 +698,6 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, | |||
| 701 | { | 698 | { |
| 702 | /* We found a font. Open it and insert a new element for | 699 | /* We found a font. Open it and insert a new element for |
| 703 | that font in VEC. */ | 700 | that font in VEC. */ |
| 704 | Lisp_Object new_vec; | ||
| 705 | int j; | 701 | int j; |
| 706 | 702 | ||
| 707 | font_object = font_open_for_lface (f, font_entity, face->lface, | 703 | font_object = font_open_for_lface (f, font_entity, face->lface, |
| @@ -711,7 +707,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, | |||
| 711 | RFONT_DEF_NEW (rfont_def, font_def); | 707 | RFONT_DEF_NEW (rfont_def, font_def); |
| 712 | RFONT_DEF_SET_OBJECT (rfont_def, font_object); | 708 | RFONT_DEF_SET_OBJECT (rfont_def, font_object); |
| 713 | RFONT_DEF_SET_SCORE (rfont_def, RFONT_DEF_SCORE (rfont_def)); | 709 | RFONT_DEF_SET_SCORE (rfont_def, RFONT_DEF_SCORE (rfont_def)); |
| 714 | new_vec = Fmake_vector (make_fixnum (ASIZE (vec) + 1), Qnil); | 710 | Lisp_Object new_vec = make_nil_vector (ASIZE (vec) + 1); |
| 715 | found_index++; | 711 | found_index++; |
| 716 | for (j = 0; j < found_index; j++) | 712 | for (j = 0; j < found_index; j++) |
| 717 | ASET (new_vec, j, AREF (vec, j)); | 713 | ASET (new_vec, j, AREF (vec, j)); |
| @@ -2062,9 +2058,7 @@ Lisp_Object dump_fontset (Lisp_Object) EXTERNALLY_VISIBLE; | |||
| 2062 | Lisp_Object | 2058 | Lisp_Object |
| 2063 | dump_fontset (Lisp_Object fontset) | 2059 | dump_fontset (Lisp_Object fontset) |
| 2064 | { | 2060 | { |
| 2065 | Lisp_Object vec; | 2061 | Lisp_Object vec = make_nil_vector (3); |
| 2066 | |||
| 2067 | vec = Fmake_vector (make_fixnum (3), Qnil); | ||
| 2068 | ASET (vec, 0, FONTSET_ID (fontset)); | 2062 | ASET (vec, 0, FONTSET_ID (fontset)); |
| 2069 | 2063 | ||
| 2070 | if (BASE_FONTSET_P (fontset)) | 2064 | if (BASE_FONTSET_P (fontset)) |
| @@ -2122,7 +2116,7 @@ syms_of_fontset (void) | |||
| 2122 | Vcached_fontset_data = Qnil; | 2116 | Vcached_fontset_data = Qnil; |
| 2123 | staticpro (&Vcached_fontset_data); | 2117 | staticpro (&Vcached_fontset_data); |
| 2124 | 2118 | ||
| 2125 | Vfontset_table = Fmake_vector (make_fixnum (32), Qnil); | 2119 | Vfontset_table = make_nil_vector (32); |
| 2126 | staticpro (&Vfontset_table); | 2120 | staticpro (&Vfontset_table); |
| 2127 | 2121 | ||
| 2128 | Vdefault_fontset = Fmake_char_table (Qfontset, Qnil); | 2122 | Vdefault_fontset = Fmake_char_table (Qfontset, Qnil); |