From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.help Subject: Re: Help producing the Alt modifier Date: Thu, 01 May 2003 13:47:39 +0200 Organization: University of Duisburg, Germany Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <84wuha6g84.fsf@lucy.is.informatik.uni-duisburg.de> References: <84he8gvz6e.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1051790237 17396 80.91.224.249 (1 May 2003 11:57:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 1 May 2003 11:57:17 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu May 01 13:57:16 2003 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 19BCge-0004WQ-00 for ; Thu, 01 May 2003 13:57:16 +0200 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 19BCf8-0003Di-06 for gnu-help-gnu-emacs@m.gmane.org; Thu, 01 May 2003 07:55:42 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.uchicago.edu!newsswitch.lcs.mit.edu!newsfeed.mathworks.com.MISMATCH!newsfeed!fu-berlin.de!uni-berlin.de!pd951fdcc.dip.t-dialin.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-NNTP-Posting-Host: pd951fdcc.dip.t-dialin.net (217.81.253.204) Original-X-Trace: fu-berlin.de 1051789813 13373539 217.81.253.204 (16 [73968]) In-Reply-To: (Jeremy Bowen's message of "Thu, 01 May 2003 12:24:40 +1200") Mail-Copies-To: never User-Agent: Gnus/5.09002 (Oort Gnus v0.20) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:aybysPQo5+VanVkwwb6ynkDhsN0= Original-Xref: shelby.stanford.edu gnu.emacs.help:112620 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:9117 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9117 Jeremy Bowen writes: > Kai Großjohann wrote: >> What happens when you do this? >> >> (global-set-key (kbd " a") 'forward-char) >> (global-set-key (kbd "M-a") 'backward-char) > > It seems that ESC actually gives me ESC which is then interpreted as Meta as > it should be according to the docs. Did you actually try it? I just did "emacs -q -no-site-file", then evaled the above expressions, then tested them. And ESC a and M-a did different things! However, it only works in a window system where Emacs knows the difference between and ESC. These are actually different things, though Emacs tries hard to make them behave the same. Here's the story: In the old days, there were only ascii terminals, so special function keys like ESC and RET and TAB were assigned ascii codes (27 and 13 and 9). And the system could not distinguish ESC from Ctrl-[, nor RET from Ctrl-M, nor TAB from Ctrl-I. But now we have real function keys. But to preserve the old behavior, whereby C-m and RET always did the same thing, as did TAB and C-i and ESC and C-[, function-key-map was invented. It translates into ESC (which is the same as C-[). There is also additional magic that makes M-x be the same as ESC x, but I don't know how that works. It's different magic, I think. By explicitly binding , the automatic translation from to ESC (via function-key-map) is shadowed. -- file-error; Data: (Opening input file no such file or directory ~/.signature)