From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Daum Newsgroups: gmane.emacs.help Subject: emacs 21.4: can't bind umlaut keys Date: Sat, 07 Jul 2007 11:55:14 +0200 Message-ID: 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 1183802191 10179 80.91.229.12 (7 Jul 2007 09:56:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 7 Jul 2007 09:56:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 07 11:56:30 2007 connect(): Connection refused 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 1I771h-0001ht-Ev for geh-help-gnu-emacs@m.gmane.org; Sat, 07 Jul 2007 11:56:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I771h-0000If-36 for geh-help-gnu-emacs@m.gmane.org; Sat, 07 Jul 2007 05:56:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I771S-0000FI-Pm for help-gnu-emacs@gnu.org; Sat, 07 Jul 2007 05:56:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I771R-0000DF-2S for help-gnu-emacs@gnu.org; Sat, 07 Jul 2007 05:56:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I771Q-0000Cx-Tj for help-gnu-emacs@gnu.org; Sat, 07 Jul 2007 05:56:12 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I771Q-0003AW-3p for help-gnu-emacs@gnu.org; Sat, 07 Jul 2007 05:56:12 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I771P-0007i7-9N for help-gnu-emacs@gnu.org; Sat, 07 Jul 2007 05:56:11 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1I771K-00009R-2k for help-gnu-emacs@gnu.org; Sat, 07 Jul 2007 11:56:06 +0200 Original-Received: from p57a0e51c.dip.t-dialin.net ([87.160.229.28]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 07 Jul 2007 11:56:06 +0200 Original-Received: from gator_ml by p57a0e51c.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 07 Jul 2007 11:56:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p57a0e51c.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 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:45526 Archived-At: Hi, I am using a German keyboard, but usually write languages like "Perl" at least as often as "German" and with the standard German keyboard layout chars like "[]{}" are difficult to reach. Therefore, I had already long time ago written some ELisp code to switch the binding of the umlaut keys between different sets of keykbindings according to my current needs. Unfortunately, it is a little tricky to refer to those keys in emacs lisp (and the exact modalities changed a little since emacs 19). Now after migrating my systems from Suse (9.3) to Debian (Etch), or, as far as emacs is concerned, from version 21.3 to 21.4 my key bindings don't work anymore and I can't figure out, what changed. 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 "ä". Some side notes: - Emacs is running in unibyte mode - The X server or the console driver (the problem is not X-related, on the console it's the same) produce the expected key event: state 0x0, keycode 48 (keysym 0xe4, adiaeresis), same_screen YES, XLookupString gives 1 bytes: (e4) "ä" XmbLookupString gives 1 bytes: (e4) "ä" Anybody has any idea, what is going wrong? Help would be greatly appreciated! Regards, Peter Daum