Jochen:

If PostPrep arbitrarily replaces tabs with 4 spaces, it will only work when the tab is the first character. Consider an editor with tabstops set to 4 spaces: ("+" represents the "tab-space")
code:
 
;+++++++Message, comment and two tabs in front
If $a <> 1++++++++++; comment after cmd, 3 tabs
++++DoSomething()+++; comment after cmd, 1 tab
EndIf

PostPrep would translate that to:
code:
 
;++++++++Message, comment and two tabs in front
If $a <> 1++++++++++++; comment after cmd, 3 tabs
++++DoSomething()++++; comment after cmd, 1 tab
EndIf

You can see that this changes the positions of several items, especially comments on the tail end of commands that use tabs to make the comments line up.

A better solution would be to scan the text line, and when a tab is encountered, find the current character position, and add add '$C_Position Mod $TabStop' number of spaces, and then all remaining sequential tabs would just be replaces with $TabStop # of spaces.

I'll wrangle some simple code and post it later.. gotta get the kids to school now.

Glenn

[ 10. March 2003, 14:11: Message edited by: Glenn Barnas ]
_________________________
Actually I am a Rocket Scientist! \:D