From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.help Subject: Re: rebind key in a single major mode Date: Thu, 23 Jan 2003 11:21:12 +0100 Organization: University of Duisburg, Germany Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <84lm1c9nfr.fsf@lucy.is.informatik.uni-duisburg.de> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1043325057 19058 80.91.224.249 (23 Jan 2003 12:30:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 23 Jan 2003 12:30:57 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18bgUh-0004uA-00 for ; Thu, 23 Jan 2003 13:30:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18bgHA-0005u7-06 for gnu-help-gnu-emacs@m.gmane.org; Thu, 23 Jan 2003 07:16:08 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!p50877a2c.dip.t-dialin.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-NNTP-Posting-Host: p50877a2c.dip.t-dialin.net (80.135.122.44) Original-X-Trace: fu-berlin.de 1043323968 29415305 80.135.122.44 (16 [73968]) User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.3.50 (i686-pc-linux-gnu) Cancel-Lock: sha1:33zDX1k6GE2rWuSSNKuUGa7xZLM= Original-Xref: shelby.stanford.edu gnu.emacs.help:109374 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5896 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5896 "Glen Coates" writes: > I've currently got the enter key bound to C-j in all modes because it > makes indenting so much easier, however, in gdb-mode this means I have to > hit C-m instead of enter because gdb-mode doesn't recognise C-j as the > newline character (I think). > > What do I need to put in my .emacs in order to rebind enter to C-m for > gdb-mode only? Can you show us exactly what you did? I get confused reading your description. Anyhow, (define-key gud-mode-map (kbd "RET") 'something-or-other) might do the trick. Hm. Ah, maybe you did this: (global-set-key (kbd "") (kbd "C-j")). In that case, I suggest to do (global-set-key (kbd "RET") 'newline-and-indent), instead. Then RET and C-m and will behave the same in most modes, except where there is a special binding. -- Ambibibentists unite!