CAOS-Mode DocumentationAfter the hopefully uncritical installation, you can now enjoy the unbelievable comfort, when editing CAOS-Code. ;-) Indentation:Per default the indentation is set to '2', i.e. after
every opening keyword (loop, doif, reps, ...) the indentation
level is increased by 2 characters, after every closing keyword
(untl, repe, endi, ...) it is reduced by 2 characters. This
'offset' can already be changed over the
Customizationmenu, which can be found under:
To indent a line to the correct column, simply press tab somewhere in the line. You can even indent a whole region with the indent-region function available over the CAOS-Menu. Currently there is no key bound to that function, but with making customisation available this will change. But be warned: on large regions (several hundred lines), this function is very, very, very slow. Terminate line:But every problem has a solution:
Block-checking:Sometimes it may occur that a line is indented to column 0, i.e. directly to the beginning of the line. Then there are three possibilities:
The third case should be a warning. It means, that you tried to close a block (e.g. untl), which wasn't open before (with loop). This means, that the indent-line-function is a kind of syntax-checking. Unfortunately you cannot define a whole word as paren, so the build-in paren-highlighting of XEmacs is useless. But this feature should take care of the paren-problem. Let there be colour: syntax-highlighting.In the moment the syntax-highlighting is done very
excessively.
Sometimes there occur some undesired effects with
syntax-highlighting: When two words of the same 'section'
follow one another, the second word isn't highlighted, e.g.
setv va01 va02, the 'va02' isn't coloured. I
don't know the source of this problem. So if you find a
solution or workaround mail it to me, please.
Apropos comments:Have you ever commented out some lines of code to find a bug? Even regions of code? Now this is possible with a little more comfort: Mark the wanted region and press C-c C-d (where 'C-c' means: Hold CTRL while pressing the c-key) et voilą! To uncomment the region simply mark it and press C-c C-f. These key bindings will soon be customisable. This functions are also accessable over the CAOS-menu. Naturally, every comment remains a comment while being commented out and commented back in. PRAYse Creature Labs:The newest feature included in CAOS-mode is a function, which generates a PRAY-template out of a source cos-file. At the moment there are some restrictions in the use of this feature. But first: What does it? Well, it searches the cos-file 'xyz.cos' for included files, like 'snde xyz1', and writes them into 'xyz.txt'. When starting the function it asks you some questions like animation string or bioenergy value to complete the PRAY-Template. When you leave a field blank, i.e. press enter without inserting some text, this option will be ignored when the template is generated. In case of the animation-file-field, the animation-file-tag will be inserted into the template, but it will be left blank. A propos filenames: currently ending '.c16' will be appended to all sprite-filenames the. If you want to use '.s16'-files, you'll have to wait for customisation or you have to change it in the source-code of CAOS-mode. A 'mixed'-mode for dynamically detect '.c16'- or '.s16'-files is very difficult to implement, cause there is no information in the cos-file. Sound-files will be extended to 'xyz1.wav', catalogue-files to 'xyz.catalogue'. This will be changeable with customisation. When running the function the first time, it opens a third buffer called 'template data', where it saves your options (eg. the catalogue-file name). When you have to change something, you can do it there. So you don't have answer the same questions everytime you run the function again. (Note: Due to technical reasons, you have to run caos-generate-pray-file (accessable over C-c C-t or through the menu), when you make the PRAY-file for the first time. For all additional generations you have to use caos-generate-pray-file-second-or-later (accessable over C-c C-r or through the menu). Don't close the 'template-data' buffer between those generation runs. And don't bother about this being complicated: you can't make it wrong. Either you have to give all options again or just nothing happens.) That counts some points the caos-generate-pray-template function still isn't able to do. I could it solely test with two CAOS-scripts. But here it worked perfectly! :-) But don't expect wonders! It's only a computer, not a god, like you! ;-) Well, I think, that's it for now. More features aren't implemented, yet. When you have something, you want to see in the next release, then email me, please! If it is possible, I'll take it in.
Problems? Questions? Suggestions? |