|
From: | Greg Hill |
Subject: | Re: Return doesn't work any more |
Date: | Thu, 15 May 2003 18:21:14 -0700 |
At 12:41 AM +0200 5/16/03, Karl Voit wrote:
Hi! When I add the lines ;;; Ctrl-M for _m_y personal shortcuts (as a test) (global-unset-key "\C-m") (global-set-key "\C-ml" 'goto-line) (global-set-key "\C-mg" 'goto-line) (global-set-key "\C-mf" 'flyspell-mode) to my .emacs, there's only 'RET' in the line at the bottom instead of a simple return in the buffer currently edited. Why does this affect the return-key and how do I get my custom shortcuts without harming my enter-key?
That's because in the ASCII character set \C-m (a.k.a. "control M") is the code for "carriage return." Depending on your platform, you _may_ be able to get your Emacs session to distinguish between typing the RETURN key and typing the M key while holding down the control key. But don't count on it. You can save yourself a lot of time and grief by just getting used to the idea that \C-m and RET are the same thing, and never trying to use \C-m as anything else. (By the way, \C-i is the ASCII code for TAB, so you may as well resign yourself to that as well.)
--Greg
[Prev in Thread] | Current Thread | [Next in Thread] |