Evaluated proc safebody name { if {[isproc $name] == 1} { set p [info body $name]; string map {\t {} ;; ;} [regsub -all \n [eachline [regsub -all { +} [regsub {^; +} [regsub -all {([^\{])\n} $p {\1; }] {}] { }] trim] {}] } }