From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.bugs Subject: Re: =?utf-8?q?Emacs_does_not_distingui?= =?utf-8?b?c2ggYmV0d2VlbiBgw6YnIGFuZCBgQy3Dpic=?= Date: 14 May 2003 14:40:54 -0400 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <5l4r3x4bih.fsf@rum.cs.yale.edu> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1052937998 7750 80.91.224.249 (14 May 2003 18:46:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 14 May 2003 18:46:38 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 14 20:46:34 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 19G1Gs-00020Q-00 for ; Wed, 14 May 2003 20:46:34 +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 19G1DY-0006xK-00 for gnu-bug-gnu-emacs@m.gmane.org; Wed, 14 May 2003 14:43:08 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19G1CV-0005vw-00 for bug-gnu-emacs@gnu.org; Wed, 14 May 2003 14:42:03 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19G1Bi-0005Mn-00 for bug-gnu-emacs@gnu.org; Wed, 14 May 2003 14:41:15 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19G1BY-0005Ga-00 for bug-gnu-emacs@gnu.org; Wed, 14 May 2003 14:41:04 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19G19v-0001Pv-00 for ; Wed, 14 May 2003 20:39:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19G19u-0001Pm-00 for ; Wed, 14 May 2003 20:39:22 +0200 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with SMTP id h4EIf1x6018617 for ; Wed, 14 May 2003 14:41:01 -0400 Original-Lines: 45 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-Original-NNTP-Posting-Host: rum.cs.yale.edu X-Original-Trace: 14 May 2003 14:40:54 -0400, rum.cs.yale.edu X-MIME-Autoconverted: from 8bit to quoted-printable by rum.cs.yale.edu id h4EIf1x6018617 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5050 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5050 > My Danish keyboard has an `=C3=A6' key. In Emacs 21.2 `=C3=A6' and `C-= =C3=A6' were > recognized as different key sequences: > (read-key-sequence "") Input: =C3=A6 =3D> [230] > (read-key-sequence "") Input: C-=C3=A6 =3D> [134] > This is no longer the case in Emacs 21.3 (and cvs head): > (read-key-sequence "") Input: =C3=A6 =3D> [2278] > (read-key-sequence "") Input: C-=C3=A6 =3D> [2278] > This means that I can only bind `=C3=A6', but not `C-=C3=A6'. I think this is due to the fact that Emacs ignores modifiers on multibyte-char keys. It worked before because your key was not recognize= d as a multibyte-char key (it was only converted to the proper latin-1 char when inserting the char in the buffer). But by fixing this bug, I bumped into the limitation you're seeing. The patch below should fix it (applied to both branches). Stefan Index: keyboard.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/emacs/emacs/src/keyboard.c,v retrieving revision 1.741 diff -u -r1.741 keyboard.c --- keyboard.c 10 May 2003 22:15:35 -0000 1.741 +++ keyboard.c 14 May 2003 18:38:00 -0000 @@ -5013,8 +5013,15 @@ case MULTIBYTE_CHAR_KEYSTROKE_EVENT: { Lisp_Object lispy_c; + int c =3D event->code; =20 - XSETFASTINT (lispy_c, event->code); + /* Add in the other modifier bits. We took care of ctrl_modifier + just above, and the shift key was taken care of by the X code, + and applied to control characters by make_ctrl_char. */ + c |=3D (event->modifiers + & (meta_modifier | alt_modifier + | hyper_modifier | super_modifier | ctrl_modifier)); + XSETFASTINT (lispy_c, c); return lispy_c; } =20