@@ -623,11 +623,11 @@ } else { return 0 } } } - if {![catch [list set type [image type ${cmd}]]]} { + if {![catch {set type [image type $cmd]}]} { switch -- ${type} { photo { set result [PhotoObj ${text} ${start} ${end} ${line} ${pos}] return 1 } @@ -1458,11 +1458,11 @@ # make `alias' a fully qualified name. # this can raise an error, if alias is # no valid command. # - if {[catch [list set alias [namespace origin $alias]]]} { + if {[catch {set alias [namespace origin $alias]}]} { return "" } # strip leading ::'s. # @@ -3040,11 +3040,11 @@ # } proc complete(regsub) {text start end line pos mod} { set prev [PreviousWord ${start} ${line}] if {[llength ${prev}] && "--" != $prev && \ - ("-" == [string index ${prev} 0] || 1 == ${pos)}} { + ("-" == [string index ${prev} 0] || 1 == ${pos})} { set cmds [RemoveUsedOptions ${line} { -all -nocase --} {--}] if {[llength ${cmds}]} { return [string trim [CompleteFromList ${text} ${cmds}]] } @@ -3447,11 +3447,11 @@ } proc complete(switch) {text start end line pos mod} { set prev [PreviousWord ${start} ${line}] if {[llength ${prev}] && "--" != ${prev} && \ - ("-" == [string index ${prev} 0] || 1 == ${pos)}} { + ("-" == [string index ${prev} 0] || 1 == ${pos})} { set cmds [RemoveUsedOptions ${line} { -exact -glob -regexp --} {--}] if {[llength ${cmds}]} { return [string trim [CompleteFromList ${text} ${cmds}]] }