all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* c and java indentation
@ 2004-02-10  1:14 Lowell Kirsh
  2004-02-10  1:20 ` Stefan Monnier
  2004-02-10 19:43 ` Alan Mackenzie
  0 siblings, 2 replies; 4+ messages in thread
From: Lowell Kirsh @ 2004-02-10  1:14 UTC (permalink / raw)


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?

Lowell

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-02-10 19:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-10  1:14 c and java indentation Lowell Kirsh
2004-02-10  1:20 ` Stefan Monnier
2004-02-10  1:30   ` Lowell Kirsh
2004-02-10 19:43 ` Alan Mackenzie

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.