From: Kenichi Handa Date: Fri, 17 Jul 2009 01:28:58 +0000 (+0000) Subject: (shuffle): Fix the logic of setting up the cycle. X-Git-Tag: emacs-pretest-23.1.90~2140 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fa0550553b3c55df3bf85b157335f4bc44c2c4c8;p=emacs.git (shuffle): Fix the logic of setting up the cycle. --- diff --git a/src/ChangeLog b/src/ChangeLog index ba05615a0c3..11189fc2d48 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +<<<<<<< ChangeLog +2009-07-17 Kenichi Handa + + * casetab.c (shuffle): Fix the logic of setting up the cycle. + 2009-07-16 YAMAMOTO Mitsuharu * nsfns.m (Fns_set_alpha): Remove function. diff --git a/src/casetab.c b/src/casetab.c index 423251df317..95fca03584b 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -229,7 +229,6 @@ shuffle (table, c, elt) { if (NATNUMP (elt)) { - Lisp_Object tem = Faref (table, elt); int from, to; if (CONSP (c)) @@ -241,11 +240,11 @@ shuffle (table, c, elt) from = to = XINT (c); for (; from <= to; from++) - if (from != XINT (elt)) - { - Faset (table, elt, make_number (from)); - Faset (table, make_number (from), tem); - } + { + Lisp_Object tem = Faref (table, elt); + Faset (table, elt, make_number (from)); + Faset (table, make_number (from), tem); + } } }