From: Eric Hanchrow <offby1@blarg.net>
To: help-gnu-emacs@gnu.org
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 [thread overview]
Message-ID: <87k5wc2iar.fsf@offby1.atm01.sea.blarg.net> (raw)
In-Reply-To: 1176749353.043776.226560@p77g2000hsh.googlegroups.com
>>>>> "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 parent reply other threads:[~2007-04-16 20:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-16 18:49 Replacing key binding for C-m with C-j for all CC Mode modes Eric Lilja
2007-04-16 20:09 ` Eric Hanchrow [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k5wc2iar.fsf@offby1.atm01.sea.blarg.net \
--to=offby1@blarg.net \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).