[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs ctrl-m is RET. how to change for rebinding ?
From: |
Stefan Monnier |
Subject: |
Re: emacs ctrl-m is RET. how to change for rebinding ? |
Date: |
Sun, 02 Apr 2006 22:37:15 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> But then, I discover that I bound "enter" to that function, cause Ctrl-m
> is enter. How to solve this problem ? I want to insert newline with enter
> and do delete-backward-char with Ctrl+m.
When running in a tty, you don't get to choose: The `return' key sends a C-m
and that's all Emacs will ever see.
When running under X11, Emacs can indeed tell the difference. The `return'
key is mapped to C-m via function-key-map, so all you need to do is to bind
[return] explicitly to a command like `newline' and the mapping to C-m will
not happen:
(global-set-key [return] 'newline)
Stefan