aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/charset.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/charset.c b/src/charset.c
index e53fbf915fa..a651d2ffb74 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1994,15 +1994,19 @@ usage: (set-charset-priority &rest charsets) */)
1994 int nargs; 1994 int nargs;
1995 Lisp_Object *args; 1995 Lisp_Object *args;
1996{ 1996{
1997 Lisp_Object new_head = Qnil, old_list, arglist[2]; 1997 Lisp_Object new_head, old_list, arglist[2];
1998 int i, id; 1998 int i, id;
1999 1999
2000 old_list = Fcopy_sequence (Vcharset_ordered_list); 2000 old_list = Fcopy_sequence (Vcharset_ordered_list);
2001 new_head = Qnil;
2001 for (i = 0; i < nargs; i++) 2002 for (i = 0; i < nargs; i++)
2002 { 2003 {
2003 CHECK_CHARSET_GET_ID (args[i], id); 2004 CHECK_CHARSET_GET_ID (args[i], id);
2004 old_list = Fdelq (make_number (id), old_list); 2005 if (! NILP (Fmemq (make_number (id), old_list)))
2005 new_head = Fcons (make_number (id), new_head); 2006 {
2007 old_list = Fdelq (make_number (id), old_list);
2008 new_head = Fcons (make_number (id), new_head);
2009 }
2006 } 2010 }
2007 arglist[0] = Fnreverse (new_head); 2011 arglist[0] = Fnreverse (new_head);
2008 arglist[1] = old_list; 2012 arglist[1] = old_list;