-trace add variable commit_type write {uplevel #0 {
- switch -glob $commit_type \
- initial {$ui_coml conf -text {Initial Commit Message:}} \
- amend {$ui_coml conf -text {Amended Commit Message:}} \
- merge {$ui_coml conf -text {Merge Commit Message:}} \
- * {$ui_coml conf -text {Commit Message:}}
-}}
+proc trace_commit_type {varname args} {
+ global ui_coml commit_type
+ switch -glob -- $commit_type {
+ initial {set txt {Initial Commit Message:}}
+ amend {set txt {Amended Commit Message:}}
+ amend-initial {set txt {Amended Initial Commit Message:}}
+ merge {set txt {Merge Commit Message:}}
+ * {set txt {Commit Message:}}
+ }
+ $ui_coml conf -text $txt
+}
+trace add variable commit_type write trace_commit_type