From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: kbd vs read-key-sequence Date: Sun, 04 Mar 2007 21:55:32 -0500 Message-ID: References: <45E8657D.4080202@gnu.org> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1173063667 17888 80.91.229.12 (5 Mar 2007 03:01:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Mar 2007 03:01:07 +0000 (UTC) Cc: lekktu@gmail.com, jasonr@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 05 04:01:01 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HO3Rb-00016C-FA for ged-emacs-devel@m.gmane.org; Mon, 05 Mar 2007 04:00:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HO3Rb-0007CQ-1x for ged-emacs-devel@m.gmane.org; Sun, 04 Mar 2007 22:00:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HO3Nz-0004jH-Ok for emacs-devel@gnu.org; Sun, 04 Mar 2007 21:57:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HO3Nz-0004in-8l for emacs-devel@gnu.org; Sun, 04 Mar 2007 21:57:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HO3Ny-0004iX-Vj for emacs-devel@gnu.org; Sun, 04 Mar 2007 21:57:14 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HO3Ny-0001RM-Ck for emacs-devel@gnu.org; Sun, 04 Mar 2007 21:57:14 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HO3MK-0002j0-28; Sun, 04 Mar 2007 21:55:32 -0500 In-reply-to: (message from Stefan Monnier on Sat, 03 Mar 2007 18:01:08 -0500) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:67337 Archived-At: On the other side of the problem we have code written in the .emacs file which tries to bind something to this key. To work, this has to satisfy the condition that when Emacs loads the .emacs file, the key it finds in the define-key call corresponds to the form of the event after key-translation-map (but before unibyte-char-to-multibyte if applicable). Except for the case of unibyte characters, that is the same as the character that gets inserted in the buffer if you type the character, right? So it should be possible to type in the character code that C-x = shows you, right? And you should also be able to insert that character in .emacs, then save it in whichever coding system. Why won't that work? And if you want it to work with modifiers, it's yet a bit more interesting because the base-event is not always decoded I don't understand that. What does it mean to "decode the base-event"? Anyway, if you want to bind a character with modifiers, you can just use a construct in .emacs that applies the modifier to the desired base character, such as \M- in a string, or (meta CHAR). Is there a case where that doesn't work?