From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Eric Lilja" Newsgroups: gmane.emacs.help Subject: Replacing key binding for C-m with C-j for all CC Mode modes Date: 16 Apr 2007 11:49:13 -0700 Organization: http://groups.google.com Message-ID: <1176749353.043776.226560@p77g2000hsh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1176752161 14648 80.91.229.12 (16 Apr 2007 19:36:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Apr 2007 19:36:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 16 21:35:50 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HdWzM-0004eN-0X for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Apr 2007 21:35:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HdX3z-0001Wg-Dk for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Apr 2007 15:40:35 -0400 Original-Path: shelby.stanford.edu!newshub.stanford.edu!postnews.google.com!p77g2000hsh.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 16 Original-NNTP-Posting-Host: 85.194.49.108 Original-X-Trace: posting.google.com 1176749353 15263 127.0.0.1 (16 Apr 2007 18:49:13 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 16 Apr 2007 18:49:13 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: p77g2000hsh.googlegroups.com; posting-host=85.194.49.108; posting-account=VhnPwg0AAAB7O5OQRS5Hs376X47qoQdE Original-Xref: shelby.stanford.edu gnu.emacs.help:147127 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:42731 Archived-At: Is this the proper way to do that? (defun my-c-mode-common-hook () ; my customizations for all of c-mode and related modes (message "Running my-c-mode-common-hook") ; Replace C-m (C-m == == newline) with C-j (newline-and- indent). (define-key c-mode-base-map "\C-m" 'newline-and-indent) ) (add-hook 'c-mode-common-hook 'my-c-mode-common-hook) I tried with c-mode-map first but that didn't work out and display got corrupted... - Eric