help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++/Java/C modes


From: kgold
Subject: Re: C++/Java/C modes
Date: 20 Nov 2003 16:55:46 GMT

David Rasmussen <david.rasmussen@gmx.net> writes:
> Two questions:
> 
> 1) How do change it so that when I press enter on a line, the cursor is 
> already at the natural indentation point with spaces inserted before. 
> Example:

(add-hook 'c-mode-common-hook
          (function (lambda ()
                (define-key c-mode-base-map [RET] 'newline-and-indent)
)))

> 2) How can I change the auto indentation style so that instead of
> [snip]
> 
> Help? Maybe I should just give in and go with the flow and use the short 
> style.

Don't give in!  The whole point of emacs is that it does what you
want.

For indentation, see the manual under "cc-mode" "built-in styles".

Start with one of the built in styles.  Then, if it's not exactly
right, the manual tells you how to tweak it.


-- 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]