[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rebind key in a single major mode
From: |
Kai Großjohann |
Subject: |
Re: rebind key in a single major mode |
Date: |
Thu, 23 Jan 2003 11:21:12 +0100 |
User-agent: |
Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.3.50 (i686-pc-linux-gnu) |
"Glen Coates" <spam.really.sucks.balls.glen.coates@csiro.au.parse.that.spambot>
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 "<return>") (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 <return> will
behave the same in most modes, except where there is a special binding.
--
Ambibibentists unite!