Next: , Up: Emacs  


4.1 Smalltalk editing mode

The GNU Smalltalk editing mode is there to assist you in editing your Smalltalk code. It tries to be smart about indentation and provides a few cooked templates to save you keystrokes.

Since Smalltalk syntax is highly context sensitive, the Smalltalk editing mode will occasionally get confused when you are editing expressions instead of method definitions. In particular, using local variables, thus:

| foo |
    foo := 3.
    ^foo squared !

will confuse the Smalltalk editing mode, as this might also be a definition the binary operator |, with second argument called ‘foo’. If you find yourself confused when editing this type of expression, put a dummy method name before the start of the expression, and take it out when you’re done editing, thus:

x
| foo |
    foo := 3.
    ^foo squared !