From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Daum Newsgroups: gmane.emacs.help,gmane.linux.debian.devel.emacsen Subject: Representation of non-ascii keys in emacs? Date: Mon, 09 Jul 2007 15:35:58 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1183988251 19568 80.91.229.12 (9 Jul 2007 13:37:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 9 Jul 2007 13:37:31 +0000 (UTC) Cc: debian-emacsen@lists.debian.org To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 09 15:37:30 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I7tQe-0001tW-Ew for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Jul 2007 15:37:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I7tQe-0003L5-0x for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Jul 2007 09:37:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I7tQF-0003Gu-LD for help-gnu-emacs@gnu.org; Mon, 09 Jul 2007 09:37:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I7tQF-0003GO-5Y for help-gnu-emacs@gnu.org; Mon, 09 Jul 2007 09:37:03 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I7tQE-0003GJ-QJ for help-gnu-emacs@gnu.org; Mon, 09 Jul 2007 09:37:02 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I7tQE-0003ag-DI for help-gnu-emacs@gnu.org; Mon, 09 Jul 2007 09:37:02 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1I7tQ6-0007dS-84 for help-gnu-emacs@gnu.org; Mon, 09 Jul 2007 15:36:54 +0200 Original-Received: from p57a0e167.dip.t-dialin.net ([87.160.225.103]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 09 Jul 2007 15:36:54 +0200 Original-Received: from gator_ml by p57a0e167.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 09 Jul 2007 15:36:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 37 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p57a0e167.dip.t-dialin.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060720 SeaMonkey/1.0.3 Mnenhy/0.7.4.0 In-Reply-To: X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:45552 gmane.linux.debian.devel.emacsen:2347 Archived-At: Hi, Peter Daum wrote: > Here a minimal code snippet to illustrate the problem: > > (defun latin1-to-emacs (char-code) > (make-char 'latin-iso8859-1 (- char-code 128))) > (setq c_ae (latin1-to-emacs 228)) > (local-set-key (make-vector 1 c_ae) "ae") > > This should bind the key labeled "ä" to instead insert "ae". technically, > it still works on emacs 21.4 in Etch ((current-local-map) indicates the > change) but the key still produces "ä". as I could meanwhile figure out, in the Debian Emacs21, the key labeled "ä" is represented just by its iso8859-1 value (as also generally has been the case for emacs versions before 21), so the example above could be simply: (local-set-key (make-vector 1 228) "ae") But as far as I can see, this is only for the Debian emacs21 package (and I still could not figure out, which modification is responsible for that) while all other emacsens I tried (including version 22.1) still need (make-char 'latin-iso8859-1 (- char-code 128) to get the emacs representation of a given iso8859-1 value. Does anybody know what is going on here? Is this just a configuration option set differently in Debian emacs? Is there any simpler/more portable way to bind non-ascii keys? Regards, Peter Daum