summaryrefslogtreecommitdiff
path: root/src/casetab.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2009-07-17 01:28:58 +0000
committerKenichi Handa <handa@m17n.org>2009-07-17 01:28:58 +0000
commitfa0550553b3c55df3bf85b157335f4bc44c2c4c8 (patch)
tree0e0ca893d7cf3738eec6709de415972be24d9190 /src/casetab.c
parente59e668bca7c1fedbe11081d8c6843b085a325c4 (diff)
downloademacs-fa0550553b3c55df3bf85b157335f4bc44c2c4c8.tar.gz
(shuffle): Fix the logic of setting up the cycle.
Diffstat (limited to 'src/casetab.c')
-rw-r--r--src/casetab.c11
1 files changed, 5 insertions, 6 deletions
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);
+ }
}
}