>>>>> "Alex" == Alex Cachia <[EMAIL PROTECTED]> writes:
Alex> Every so often I find that when I type a ; I automatically get
Alex> a new line.
Alex> Any idea how to turn this off.
Alex> Thanks,
Alex> Alex
This would be CC-mode "electric new lines" features which
I think is very nifty, but realise that not everyone agrees. Included
below is the relevant bit from the info page.
Cheers
Phil
CC Mode provides keybindings which allow you to toggle the minor
modes on the fly while editing code. To toggle just the auto-newline
state, hit `C-c C-a' (`c-toggle-auto-state'). When you do this, you
should see the `a' indicator either appear or disappear on the
modeline. Similarly, to toggle just the hungry-delete state, use `C-c
C-d' (`c-toggle-hungry-state'), and to toggle both states, use `C-c
C-t' (`c-toggle-auto-hungry-state').
To set up the auto-newline and hungry-delete states to your preferred
values, you would need to add some lisp to your `.emacs' file that
called one of the `c-toggle-*-state' functions directly. When called
programmatically, each function takes a numeric value, where a positive
number enables the minor mode, a negative number disables the mode, and
zero toggles the current state of the mode.
So for example, if you wanted to enable both auto-newline and
hungry-delete for all your C file editing, you could add the following
to your `.emacs' file:
(add-hook 'c-mode-common-hook
'(lambda () (c-toggle-auto-hungry-state 1)))