[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mode specific re-binding of the enter key
From: |
Tassilo Horn |
Subject: |
Re: Mode specific re-binding of the enter key |
Date: |
Thu, 21 Jun 2007 17:37:42 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) |
"Blake McBride" <blake@mcbride.name> writes:
> Normally the return key ("RET") is bound to "newline". I globally
> re-bound RET to newline-and-indent because I prefered this behavior in
> C-Mode. The problem is that I don't like "newline-and-indent" in
> other modes such as text mode. I'd like to go back to the default
> behavior of RET to be "newline" and that only in C-Mode files it would
> be bound to "newline-and-indent".
(add-hook 'c-mode-hook
(lambda ()
(local-set-key (kbd "RET") 'newline-and-indent)))
Bye,
Tassilo
--
If programmers deserve to be rewarded for creating innovative programs,
by the same token they deserve to be punished if they restrict the use
of these programs. (Richard M. Stallman)