[Top][All Lists]

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

c and java indentation

From: Lowell Kirsh
Subject: c and java indentation
Date: Mon, 09 Feb 2004 17:14:10 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031029

I would like that in C and Java modes, pressing enter will go to the next line and indent to the right column. How can I do this?

I have tried putting the following in my .emacs:

(add-hook 'java-mode-hook
          (lambda ()
            (global-set-key [ return ] 'newline-and-indent)))

which does the right thing, BUT, when I am entering text in the minibuffer, when I press enter, it goes to the next line, rather than executing what's in the minibuffer. Why does it do that?


reply via email to

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