# HG changeset patch # User Kenichi Handa # Date 1054871854 0 # Node ID 31ac7465ef510606fd3590e7bbb472915e4301da # Parent 63f863a2a2e21aa96a691f4a9094756f5ec27785 (Fset_charset_priority): Pay attention to dumplicated arguments. diff -r 63f863a2a2e2 -r 31ac7465ef51 src/charset.c --- a/src/charset.c Fri Jun 06 03:57:15 2003 +0000 +++ b/src/charset.c Fri Jun 06 03:57:34 2003 +0000 @@ -1994,15 +1994,19 @@ int nargs; Lisp_Object *args; { - Lisp_Object new_head = Qnil, old_list, arglist[2]; + Lisp_Object new_head, old_list, arglist[2]; int i, id; old_list = Fcopy_sequence (Vcharset_ordered_list); + new_head = Qnil; for (i = 0; i < nargs; i++) { CHECK_CHARSET_GET_ID (args[i], id); - old_list = Fdelq (make_number (id), old_list); - new_head = Fcons (make_number (id), new_head); + if (! NILP (Fmemq (make_number (id), old_list))) + { + old_list = Fdelq (make_number (id), old_list); + new_head = Fcons (make_number (id), new_head); + } } arglist[0] = Fnreverse (new_head); arglist[1] = old_list;