	    append result "
        array set menupaths \"$menued_parms(oldmenubuttonspaths)\"
        $menued_parms(oldmenubuttons)
    \} else \{
        if \{\[winfo toplevel \$root\] == \".\"\} \{set base \"\"\} else \{set base \[winfo toplevel \$root\]\}
        array set menupaths \"$menued_parms(newmenubuttonspaths)\"
        $menued_parms(newmenubuttons)
   \}"
-------------------------------------------------------------------
    append result "
    proc ${procname}_accel {key args} {
	global tcl_platform
	set shift \[regexp {\[sS]hift} \$args]
	set control \[regexp {\[cC]ontrol} \$args]
	set meta \[regexp {\[mM]eta} \$args]
	set alt \[regexp {\[aA]lt} \$args]
	switch \$tcl_platform(platform) {
	    unix {
		array set mods {prefix \"<\" suffix \">\" \
				    shift0 \"\" shift1 \"Shift-\" \
				    control0 \"\" control1 \"^-\" \
				    meta0 \"\" meta1 \"Meta-\" \
				    alt0 \"\" alt1 \"Alt-\"}
	    }
	    macintosh {
		set key \[string toupper \$key]
		array set mods {prefix \"\" suffix \"\" \
				    shift0 \"\" shift1 \"\\377\" \
				    control0 \"\" control1 \"Command-\" \
				    meta0 \"\" meta1 \"\\240\" \
				    alt0 \"\" alt1 \"\376\"}
	    }
	    windows {
		array set mods {prefix \"\" suffix \"\" \
				    shift0 \"\" shift1 \"Shft+\" \
				    control0 \"\" control1 \"Ctrl+\" \
				    meta0 \"\" meta1 \"Meta+\" \
				    alt0 \"\" alt1 \"Alt+\"}
	    }
	    default {
		return \"\$key\"
	    }
	}
	return \"\$mods(prefix)\$mods(shift\$shift)\$mods(control\$control)\$mods(meta\$meta)\$mods(alt\$alt)\$key\$mods(suffix)\"
    }
"