Re: [Fwd: Re: inserting spaces for a tab from sLisp]
Brought to you by:
set
From: Thiago F.G. A. <tf...@te...> - 2005-02-14 04:36:06
|
On Sat, 12 Feb 2005, Arnold Wiegert wrote: > Thiago F.G. Albuquerque wrote: >> On Thu, 10 Feb 2005, Arnold Wiegert wrote: >> >>> Hello again, >>> >>> I've just tried to work some more on my lisp macros - macros.slp - as a >>> replacement for pseudo macros and I'm trying to use the InsertText >>> function to insert spaces using a "\t" string. >> >> >> (InsertText "\t") inserts a real tab. >> >>> It works, but I was hoping it would take a hint from the editor setup >>> which calls for using spaces in place of tabs to keep things lined up. >>> >>> Is there (another) way to do this and get spaces - the number of spaces >>> set in the Tool&Ops->Options->GlobalEdition->TabSize field? >> >> >> AFAIK, no. >> >> One possible solution to this would be to create a new sLisp command, e.g. >> (GetTabSize). But currenlty, there is no such thing. >> > Since it appears that lisp functions such as cmcNewLine use smart > indenting, I expected/hoped that the other 'features' such as tab/space > replacement etc. should also be taken into account. I agree with you. 'cmcNewLine' is the command assigned to <enter>, but there is no similar command for <tab> -- and this is the source of the problem you're facing. The creation of this command is a better solution than the one I proposed in the other message ((GetTabSize)). A remark: 'cmcNewLine' is not a sLisp function: it's an editor command. Even before there was a scripting language in SETEDIT, the user could record and playback "macros": each command has a name, and as the commands are executed, they are saved in some sort of buffer, so they can be undone, recorded, and played back. Ok. Then came sLisp. Although sLisp functions are also called "macros", this is a bad name choice, because this is a completely different mechanism. [], Thiago -- () ascii ribbon campaign - against html mail /\ - against microsoft attachments |