head 1.3; access; symbols; locks mys:1.3; strict; comment @# @; 1.3 date 2000.08.15.22.34.13; author mys; state Exp; branches; next 1.2; 1.2 date 2000.04.11.21.41.24; author mys; state Exp; branches; next 1.1; 1.1 date 2000.04.11.19.09.28; author mys; state Exp; branches; next ; desc @@ 1.3 log @*** empty log message *** @ text @# Copyright (C) 2000 - Martin Strauss - under terms of GPL ############################################################## # umlaut routine # proc umlaut LIST { global FocusEditorFlag global FocusEditor if $FocusEditorFlag then { focus $FocusEditor.te.edit1 foreach {FIND REPLACE} $LIST { set FIND_L [string length "$FIND"] if {$FIND != ""} then { set modifiedflag 0 undo_switch $FocusEditor.te.edit1 Save set startindex [$FocusEditor.te.edit1 index insert] set nowindex 1.0 while {$nowindex != ""} { $FocusEditor.te.edit1 mark set insert $nowindex set NOW [$FocusEditor.te.edit1 get insert "insert + $FIND_L chars"] if ![string compare $NOW $FIND] then { # Ersetzt $FocusEditor.te.edit1 delete insert "insert + $FIND_L chars" $FocusEditor.te.edit1 insert insert $REPLACE set modifiedflag 1 } # Sucht set nowindex [$FocusEditor.te.edit1 search -- $FIND insert end] } $FocusEditor.te.edit1 mark set insert $startindex if $modifiedflag { event generate $FocusEditor.te.edit1 <> } event generate $FocusEditor.te.edit1 <> -when tail } } } } @ 1.2 log @*** empty log message *** @ text @d22 1 @ 1.1 log @Initial revision @ text @d1 36 a36 40 # Copyright (C) 1999 - Martin Strauss - under terms of GPL ############################################################## # umlaut routine # proc umlaut LIST { global T global FocusEditorFlag global FocusEditor if $FocusEditorFlag then { focus $FocusEditor.te.edit1 foreach {FIND REPLACE} $LIST { set FIND_L [string length "$FIND"] if {$FIND != ""} then { set modifiedflag 0 undo_switch $FocusEditor.te.edit1 Save set startindex [$FocusEditor.te.edit1 index insert] set nowindex 1.0 while {$nowindex != ""} { $FocusEditor.te.edit1 mark set insert $nowindex set NOW [$FocusEditor.te.edit1 get insert "insert + $FIND_L chars"] if ![string compare $NOW $FIND] then { # Ersetzt undo_switch $FocusEditor.te.edit1 "{insert \"insert + $FIND_L chars\"} Delete UndoBegin" $FocusEditor.te.edit1 insert insert $REPLACE undo_switch $FocusEditor.te.edit1 UndoEnd set modifiedflag 1 } # Sucht set nowindex [$FocusEditor.te.edit1 search -- $FIND insert end] } $FocusEditor.te.edit1 mark set insert $startindex if $modifiedflag { undo_switch $FocusEditor.te.edit1 Save event generate $FocusEditor.te.edit1 <> } event generate $FocusEditor.te.edit1 <> -when tail } } } } @