Re: [Fwd: Re: inserting spaces for a tab from sLisp]
Brought to you by:
set
From: Arnold W. <awi...@te...> - 2005-03-02 03:18:16
|
Salvador Eduardo Tropea wrote: > > I'm back from my vacations and now I'm slowly reading the old mails ... > Ok, I added "cmcSmartTab" and assigned it to Tab (important!!! people > using custom keybord bindings will need to add this). > Then I moved the code inside TCEditor::InsertCharInLine to a new > function TCEditor::SmartTab(). > So now if the editor gets a tab from the keyboard (not translated to a > command) will insert an ASCII 9, but the default is to translate tab > into cmcSmartTab. This command implements the complex behavior. > When I use the function cmsSmartTab in my macros file with the latest snapshot compiled under MSVC6, I get an error from the lisp interpreter: Type of error: syntax command expected Code: ...(cmcSmartTab<*>)^W ... END of SLP this part of the macros is part of the pmacro in macros.slp (cond (not (strcmp str "{")) (progn (InsertText "{}") (SendCommands cmcCharLeft cmcNewLine cmcLineEnd cmcLineUp cmcNewLine ) ;(InsertText "\t") (cmsSmartTab) ) The old code inserted a tab - where I really wanted all spaces, as set per smart indent - i.e. 3 in my case. The new command upsets the sLisp interpreter. Am I using it properly? Does it need and argument? The About box says: Version 0.5.5 Revision 1168 Platform Win32,X86, MSC Driver Win32 Arnold |