/* Fontset handler.
-Copyright (C) 2001-2012 Free Software Foundation, Inc.
+Copyright (C) 2001-2013 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
font for each character. */
static Lisp_Object Vdefault_fontset;
-/* Check if any window system is used now. */
-void (*check_window_system_func) (void);
-
-
/* Prototype declarations for static functions. */
static Lisp_Object make_fontset (Lisp_Object, Lisp_Object, Lisp_Object);
/* Macros for FONT-DEF and RFONT-DEF of fontset. */
#define FONT_DEF_NEW(font_def, font_spec, encoding, repertory) \
do { \
- (font_def) = Fmake_vector (make_number (3), (font_spec)); \
+ (font_def) = make_uninit_vector (3); \
+ ASET ((font_def), 0, font_spec); \
ASET ((font_def), 1, encoding); \
ASET ((font_def), 2, repertory); \
} while (0)
Lisp_Object fontset;
int id;
- (*check_window_system_func) ();
+ check_window_system (NULL);
CHECK_STRING (pattern);
{
if (XFASTINT (target) < 0x80)
error ("Can't set a font for partial ASCII range");
- range_list = Fcons (Fcons (target, target), Qnil);
+ range_list = list1 (Fcons (target, target));
}
else if (CONSP (target))
{
error ("Can't set a font for partial ASCII range");
ascii_changed = 1;
}
- range_list = Fcons (target, Qnil);
+ range_list = list1 (target);
}
else if (SYMBOLP (target) && !NILP (target))
{
{
if (EQ (target, Qlatin))
ascii_changed = 1;
- val = Fcons (target, Qnil);
+ val = list1 (target);
map_char_table (accumulate_script_ranges, Qnil, Vchar_script_table,
val);
range_list = Fnreverse (XCDR (val));
SDATA (SYMBOL_NAME (target)));
}
else if (NILP (target))
- range_list = Fcons (Qnil, Qnil);
+ range_list = list1 (Qnil);
else
error ("Invalid target for setting a font");
{
Lisp_Object arg;
- arg = Fmake_vector (make_number (5), Qnil);
+ arg = make_uninit_vector (5);
ASET (arg, 0, fontset);
ASET (arg, 1, font_def);
ASET (arg, 2, add);
if (! NILP (font_object))
{
update_auto_fontset_alist (font_object, fontset);
- alist = Fcons (Fcons (Qfont, Fcons (name, font_object)), Qnil);
+ alist = list1 (Fcons (Qfont, Fcons (name, font_object)));
Fmodify_frame_parameters (fr, alist);
}
}
Lisp_Object val, elt;
int c, i, j, k;
- (*check_window_system_func) ();
-
+ check_window_system (NULL);
fontset = check_fontset_name (fontset, &frame);
/* Recode fontsets realized on FRAME from the base fontset FONTSET
slot = Fassq (RFONT_DEF_SPEC (elt), alist);
name = AREF (font_object, FONT_NAME_INDEX);
if (NILP (Fmember (name, XCDR (slot))))
- nconc2 (slot, Fcons (name, Qnil));
+ nconc2 (slot, list1 (name));
}
}
}
DEFVAR_LISP ("fontset-alias-alist", Vfontset_alias_alist,
doc: /* Alist of fontset names vs the aliases. */);
- Vfontset_alias_alist = Fcons (Fcons (FONTSET_NAME (Vdefault_fontset),
- build_pure_c_string ("fontset-default")),
- Qnil);
+ Vfontset_alias_alist
+ = list1 (Fcons (FONTSET_NAME (Vdefault_fontset),
+ build_pure_c_string ("fontset-default")));
DEFVAR_LISP ("vertical-centering-font-regexp",
Vvertical_centering_font_regexp,