Uranus Gnupiter Elk-Scheme Home Mars Tools Stuff

News

easyPRAY
easyATT

Scripts
maxiCAOS

Vim
XEmacs
CAOS-Mode Docs
Screenshots XEmacs CAOS-Mode

LibC16
C16 Tools
C16 Plug-in for the GIMP

libCreatures

gtkScriptorium

Goodies

Licenses

Support

Links to other sites

SourceForge Logo
Valid HTML4!
Valid CSS!

CAOS-Mode Documentation

After 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:
Options->Customize->Emacs->Programming->Languages->Caos
I hope, that I can reduce this overhead to the normal CAOS-Menu. %-)

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:
Why don't you use the caos-do-terminate-line function? To spare you work, it is already activated, but you can deactivate it in the above said customisation-menu. When toggled, this function takes care of the indentation of the current line, whenever you press Return to go to a new line.

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:

  • Everything is alright. The indentation should be column zero.
  • You found a bug! Please report it to me with the cos-file,
    in which the error occurred.
  • It is not a bug, although you expected an indentation-level
    of perhaps 4 or 6 characters.

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.
Advantage: You notice mistyped words rather fast.
Disadvantage: Your screen looks like a rainbow.
With implementing customisation, you will be able to change this to your personal preferences.
(Already available! Look in
Options->Customize->Emacs->Faces->Caos Highlighting
or
Options->Customize->Emacs->Programming->Languages-> Caos->Highlighting)

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.
Normally, comments are highlighted in a dark blue (per default) to emphasise, that they are non-program-code, but when another keyword, e.g. the 'va02' from above, is mentioned in the comment this keyword is coloured in its normal colon, but not the comment. This behaviour is very mysterious as it only occurs with my XEmacs under Linux, but not with the XEmacs of Tina under Windows. (Hmmm, seems to depend on the moment caos-mode ist started. Loaded automatically, when opening a cos-file, everything's right. Loaded manually from the caos-mode.el-file, the wrong color shows up. So normally it should work correctly...) So if you find an explanation for this strange behaviour, send me an email, 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.

Back to top

-

Problems? Questions? Suggestions? --> Mail me!