From 11e6c5b0a34674346b5d2d4a4859ba1dfb887358 Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 25 Sep 2008 06:44:22 +0000 Subject: [PATCH] (load_macros): Don't parse the action list here. (load_im_info): Parse action lists of all macros. --- src/input.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/input.c b/src/input.c index d2381e2..95bd463 100644 --- a/src/input.c +++ b/src/input.c @@ -1177,7 +1177,7 @@ load_branch (MInputMethodInfo *im_info, MPlist *plist, MIMMap *map) } /* Load a macro from PLIST into IM_INFO->macros. - PLIST has this from: + PLIST has this form: PLIST ::= ( MACRO-NAME ACTION * ) IM_INFO->macros is a plist of macro names vs action list. */ @@ -1191,8 +1191,7 @@ load_macros (MInputMethodInfo *im_info, MPlist *plist) MERROR (MERROR_IM, -1); name = MPLIST_SYMBOL (plist); plist = MPLIST_NEXT (plist); - if (MPLIST_TAIL_P (plist) - || parse_action_list (plist, im_info->macros) < 0) + if (MFAILP (! MPLIST_TAIL_P (plist))) MERROR (MERROR_IM, -1); pl = mplist_get (im_info->macros, name); M17N_OBJECT_UNREF (pl); @@ -2380,6 +2379,12 @@ load_im_info (MPlist *plist, MInputMethodInfo *im_info) M17N_OBJECT_REF (im_info->description); } } + if (im_info->macros) + { + MPLIST_DO (pl, im_info->macros) + parse_action_list (MPLIST_PLIST (pl), im_info->macros); + } + im_info->tick = time (NULL); } -- 1.7.10.4