C or C++ indentation and effects; how can I turn off ?
The cmode(2m) is supposed to make editing 'C' easier, by forcing the user to follow a preset editing convection. The layout is pretty standard, following a 4 space indent, writing either K&R or standard 'Pascal' type layout, with braces aligning vertically.
The problem most new users have is the inability of the tab key to function, or more simply do not want to be 'forced' to write in a particular style (GNU writers will probably not like this either - conversely they will be using GNU emacs !!). However the constrained layout can be configured to create most styles and does help in a project situation, whereby most of the authored code roughly adheres to the same sort of layout conventions. For C++ users then edit "hkcpp.emf" rather than "hkc.emf".
To disable ALL automatic layout then edit "hkc.emf" and turn "cmode" off. It is probably quite useful to apply "indent", this will return the cursor to the same indentation column whenever a new line is inserted. i.e. in "fhook-c" of hkc.emf:-
0 buffer-mode "cmode" 1 buffer-mode "indent"
If you want proper tabs then you may also want to add:-
0 buffer-mode "tab"
This inserts the <tab> character into the text, rather than translating to spaces. Alternatively disable tab mode for all file type using user-setup(3) i.e.
Help -> User Setup -> General -> Tab
To retain the 'C' layout aid, but re-enable the tab key operation then disable the Tab To Indent option in user-setup(3) i.e.
Help -> User Setup -> General -> Tab To Indent
This enables the use of the TAB key in all column positions with the exception of column 0. A <tab> in Column 0 will still enable the automatic line re-formatting.
If you want real <Tabs> then disable the tab mode using user-setup(3) i.e.
Help -> User Setup -> General -> Tab
The 'C' layout indentation is controlled from the system variables:-
These settings may be defined in your <user>.emf to change the default layout. Refer to the on-line documentation for details.
(c) Copyright JASSPA 2001
Last Modified: 2001/07/14
Generated On: 2001/08/15