From 6dd098a655551afd765159165e4b29ec9f693cb2 Mon Sep 17 00:00:00 2001 From: handa Date: Fri, 20 Apr 2007 12:23:23 +0000 Subject: [PATCH] (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. --- src/input.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) 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); } } } -- 1.7.10.4