From 699ce2a59e6d5614e57bd85e0f037b16ac95b2c0 Mon Sep 17 00:00:00 2001 From: handa Date: Mon, 11 Jun 2007 08:47:15 +0000 Subject: [PATCH] (mlanguage_name_list): Fix previous change. --- src/language.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/language.c b/src/language.c index b32265d..0104a06 100644 --- a/src/language.c +++ b/src/language.c @@ -566,14 +566,22 @@ mlanguage_name_list (MSymbol language, MSymbol target, } if (MPLIST_TAIL_P (pl)) { - pl = MPLIST_NEXT (MPLIST_NEXT (MPLIST_PLIST (plist))); - if (! (plist = mplist__assq (pl, language))) - plist = mplist__assq (pl, language2); + MPLIST_DO (pl, plist) + { + MPlist *p = MPLIST_NEXT (MPLIST_NEXT (MPLIST_PLIST (pl))), *p0; + + if ((p0 = mplist__assq (p, language)) + || (p0 = mplist__assq (p, language2))) + { + plist = p0; + break; + } + } + if (MPLIST_TAIL_P (pl)) + return NULL; } } - if (! plist) - return NULL; plist = MPLIST_NEXT (MPLIST_PLIST (plist)); if (territory != Mnil) { -- 1.7.10.4