|
From: | Eric Hanchrow |
Subject: | Re: Replacing key binding for C-m with C-j for all CC Mode modes |
Date: | Mon, 16 Apr 2007 13:09:00 -0700 |
User-agent: | Gnus/5.11 (Gnus v5.11) Emacs/22.0.97 (gnu/linux) |
>>>>> "Eric" == Eric Lilja <mindcooler@gmail.com> writes: Eric> Is this the proper way to do that? (defun Eric> my-c-mode-common-hook () ; my customizations for all of Eric> c-mode and related modes (message "Running Eric> my-c-mode-common-hook") ; Replace C-m (C-m == <RET> == Eric> newline) with C-j (newline-and- indent). (define-key Eric> c-mode-base-map "\C-m" 'newline-and-indent) ) (add-hook Eric> 'c-mode-common-hook 'my-c-mode-common-hook) Eric> I tried with c-mode-map first but that didn't work out and Eric> display got corrupted... Here's what I do -- (add-hook 'c-mode-common-hook (lambda () (local-set-key [?\C-m] 'newline-and-indent) )) --
[Prev in Thread] | Current Thread | [Next in Thread] |