From: tomo Date: Thu, 9 Nov 2000 12:10:48 +0000 (+0000) Subject: (Fget_char_attribute): Add new optional argument `default-value'. X-Git-Tag: r21-2-37-utf-2000-0_17-1~45 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83d047efafbb8a5c0ff0f4814bd8cedbe32fb6a2;p=chise%2Fxemacs-chise.git- (Fget_char_attribute): Add new optional argument `default-value'. (put_char_ccs_code_point): Modify for `Fget_char_attribute'. (remove_char_ccs): Likewise. --- diff --git a/src/mule-charset.c b/src/mule-charset.c index 68b9ab7..aa5c427 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -1105,10 +1105,11 @@ Return the alist of attributes of CHARACTER. return alist; } -DEFUN ("get-char-attribute", Fget_char_attribute, 2, 2, 0, /* +DEFUN ("get-char-attribute", Fget_char_attribute, 2, 3, 0, /* Return the value of CHARACTER's ATTRIBUTE. +Return DEFAULT-VALUE if the value is not exist. */ - (character, attribute)) + (character, attribute, default_value)) { Lisp_Object ccs; @@ -1119,8 +1120,6 @@ Return the value of CHARACTER's ATTRIBUTE. if (CHAR_ID_TABLE_P (encoding_table)) return get_char_id_table (XCHAR (character), encoding_table); - else - return Qnil; } else { @@ -1134,7 +1133,7 @@ Return the value of CHARACTER's ATTRIBUTE. return ret; } } - return Qnil; + return default_value; } DEFUN ("put-char-attribute", Fput_char_attribute, 3, 3, 0, /* @@ -1429,7 +1428,7 @@ put_char_ccs_code_point (Lisp_Object character, if (VECTORP (v)) { - Lisp_Object cpos = Fget_char_attribute (character, ccs); + Lisp_Object cpos = Fget_char_attribute (character, ccs, Qnil); if (!NILP (cpos)) { decoding_table_remove_char (v, dim, byte_offset, XINT (cpos)); @@ -1460,7 +1459,7 @@ remove_char_ccs (Lisp_Object character, Lisp_Object ccs) if (VECTORP (decoding_table)) { - Lisp_Object cpos = Fget_char_attribute (character, ccs); + Lisp_Object cpos = Fget_char_attribute (character, ccs, Qnil); if (!NILP (cpos)) {