comparison src/fontset.c @ 28676:0a677c35ad99

(Fset_fontset_font): Fix docstring. Local variable name change: ch -> character.
author Kenichi Handa <handa@m17n.org>
date Thu, 20 Apr 2000 23:52:05 +0000
parents 7a9707590ccd
children da7e00e4eaa6
comparison
equal deleted inserted replaced
28675:a4328cafed66 28676:0a677c35ad99
977 error ("Fontset `%s' does not exist", XSTRING (name)->data); 977 error ("Fontset `%s' does not exist", XSTRING (name)->data);
978 return FONTSET_FROM_ID (id); 978 return FONTSET_FROM_ID (id);
979 } 979 }
980 980
981 DEFUN ("set-fontset-font", Fset_fontset_font, Sset_fontset_font, 3, 4, 0, 981 DEFUN ("set-fontset-font", Fset_fontset_font, Sset_fontset_font, 3, 4, 0,
982 "Modify fontset NAME to use FONTNAME for character CHAR.\n\ 982 "Modify fontset NAME to use FONTNAME for CHARACTER.\n\
983 \n\ 983 \n\
984 CHAR may be a cons; (FROM . TO), where FROM and TO are\n\ 984 CHARACTER may be a cons; (FROM . TO), where FROM and TO are\n\
985 non-generic characters. In that case, use FONTNAME\n\ 985 non-generic characters. In that case, use FONTNAME\n\
986 for all characters in the range FROM and TO (inclusive).\n\ 986 for all characters in the range FROM and TO (inclusive).\n\
987 \n\ 987 \n\
988 If NAME is t, an entry in the default fontset is modified.\n\ 988 If NAME is t, an entry in the default fontset is modified.\n\
989 In that case, FONTNAME should be a registry and encoding name\n\ 989 In that case, FONTNAME should be a registry and encoding name\n\
990 of a font for CHAR.") 990 of a font for CHARACTER.")
991 (name, ch, fontname, frame) 991 (name, character, fontname, frame)
992 Lisp_Object name, ch, fontname, frame; 992 Lisp_Object name, character, fontname, frame;
993 { 993 {
994 Lisp_Object fontset, elt; 994 Lisp_Object fontset, elt;
995 Lisp_Object realized; 995 Lisp_Object realized;
996 int from, to; 996 int from, to;
997 int id; 997 int id;
998 998
999 fontset = check_fontset_name (name); 999 fontset = check_fontset_name (name);
1000 1000
1001 if (CONSP (ch)) 1001 if (CONSP (character))
1002 { 1002 {
1003 /* CH should be (FROM . TO) where FROM and TO are non-generic 1003 /* CH should be (FROM . TO) where FROM and TO are non-generic
1004 characters. */ 1004 characters. */
1005 CHECK_NUMBER (XCAR (ch), 1); 1005 CHECK_NUMBER (XCAR (character), 1);
1006 CHECK_NUMBER (XCDR (ch), 1); 1006 CHECK_NUMBER (XCDR (character), 1);
1007 from = XINT (XCAR (ch)); 1007 from = XINT (XCAR (character));
1008 to = XINT (XCDR (ch)); 1008 to = XINT (XCDR (character));
1009 if (!char_valid_p (from, 0) || !char_valid_p (to, 0)) 1009 if (!char_valid_p (from, 0) || !char_valid_p (to, 0))
1010 error ("Character range should be by non-generic characters."); 1010 error ("Character range should be by non-generic characters.");
1011 if (!NILP (name) 1011 if (!NILP (name)
1012 && (SINGLE_BYTE_CHAR_P (from) || SINGLE_BYTE_CHAR_P (to))) 1012 && (SINGLE_BYTE_CHAR_P (from) || SINGLE_BYTE_CHAR_P (to)))
1013 error ("Can't change font for a single byte character"); 1013 error ("Can't change font for a single byte character");
1014 } 1014 }
1015 else 1015 else
1016 { 1016 {
1017 CHECK_NUMBER (ch, 1); 1017 CHECK_NUMBER (character, 1);
1018 from = XINT (ch); 1018 from = XINT (character);
1019 to = from; 1019 to = from;
1020 } 1020 }
1021 if (!char_valid_p (from, 1)) 1021 if (!char_valid_p (from, 1))
1022 invalid_character (from); 1022 invalid_character (from);
1023 if (SINGLE_BYTE_CHAR_P (from)) 1023 if (SINGLE_BYTE_CHAR_P (from))