From: handa Date: Fri, 20 Apr 2007 12:23:23 +0000 (+0000) Subject: (config_command): Fix previous change again. X-Git-Tag: FLT-base~77 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dd098a655551afd765159165e4b29ec9f693cb2;p=m17n%2Fm17n-lib.git (config_command): Fix previous change again. (config_variable): Likewise. (minput_config_command): Fix for the case of setting back to default. (minput_config_variable): Likewise. (minput_save_config): Include nil as documentation of customized command/variable. --- diff --git a/src/input.c b/src/input.c index 9d562df..49dad2a 100644 --- a/src/input.c +++ b/src/input.c @@ -5634,26 +5634,24 @@ minput_save_config (void) if (MPLIST_TAIL_P (elt)) { if (p) - { - /* Make customization ignored. */ - p = MPLIST_NEXT (MPLIST_PLIST (p)); - mplist_set (p, Mnil, NULL); - } + mplist__pop_unref (p); } else { - elt = MPLIST_NEXT (elt); if (p) { p = MPLIST_NEXT (MPLIST_NEXT (MPLIST_PLIST (p))); mplist_set (p, Mnil, NULL); - mplist__conc (p, elt); } else { - p = MPLIST_PLIST (pl); + p = mplist (); mplist_add (custom->cmds, Mplist, p); + mplist_add (p, Msymbol, command); + p = mplist_add (p, Msymbol, Mnil); + p = MPLIST_NEXT (p); } + mplist__conc (p, elt); } } if (config->vars) @@ -5673,18 +5671,20 @@ minput_save_config (void) } else { - elt = MPLIST_NEXT (elt); if (p) { p = MPLIST_NEXT (MPLIST_NEXT (MPLIST_PLIST (p))); mplist_set (p, Mnil, NULL); - mplist__conc (p, elt); } else { - p = MPLIST_PLIST (pl); + p = mplist (); mplist_add (custom->vars, Mplist, p); + mplist_add (p, Msymbol, variable); + p = mplist_add (p, Msymbol, Mnil); + p = MPLIST_NEXT (p); } + mplist__conc (p, elt); } } }