From unknown Sun Jun 22 04:16:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#12090: 24.1.50; "C-h c" mutilates M-c when c is a non-ASCII character Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Jul 2012 05:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12090 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 12090@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.134362491414311 (code B ref -1); Mon, 30 Jul 2012 05:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jul 2012 05:08:34 +0000 Received: from localhost ([127.0.0.1]:49786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SviDZ-0003il-IC for submit@debbugs.gnu.org; Mon, 30 Jul 2012 01:08:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39195) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SviDW-0003ie-Sh for submit@debbugs.gnu.org; Mon, 30 Jul 2012 01:08:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Svi6Y-0008OG-82 for submit@debbugs.gnu.org; Mon, 30 Jul 2012 01:01:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:56044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Svi6Y-0008OC-4j for submit@debbugs.gnu.org; Mon, 30 Jul 2012 01:01:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Svi6W-0000Bb-Vq for bug-gnu-emacs@gnu.org; Mon, 30 Jul 2012 01:01:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Svi6V-0008Nv-Ks for bug-gnu-emacs@gnu.org; Mon, 30 Jul 2012 01:01:16 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:51969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Svi6V-0008Nr-CA for bug-gnu-emacs@gnu.org; Mon, 30 Jul 2012 01:01:15 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M7Y00400J4V0F00@a-mtaout22.012.net.il> for bug-gnu-emacs@gnu.org; Mon, 30 Jul 2012 08:00:32 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M7Y003WFJ8VOB60@a-mtaout22.012.net.il> for bug-gnu-emacs@gnu.org; Mon, 30 Jul 2012 08:00:31 +0300 (IDT) Date: Mon, 30 Jul 2012 08:00:44 +0300 From: Eli Zaretskii Message-id: <83zk6hg7wj.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This bug report will be sent to the Bug-GNU-Emacs mailing list and the GNU bug tracker at debbugs.gnu.org. Please check that the From: line contains a valid email address. After a delay of up to one day, you should receive an acknowledgment at that address. Please write in English if possible, as the Emacs maintainers usually do not have translators for other languages. Please describe exactly what actions triggered the bug, and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': emacs -Q C-h c ESC-ALEPH =3D> M-=D5=90 (translated from =D7=90) is undefined (I type ALEPH by switching the keyboard to Hebrew. With a hebrew input method, I cannot produce META-ALEPH, I get M-t instead. Maybe it's a separate problem.) Now, if I step through key-description, I see that the key arrives there as [27 1488], which seems correct (1488 is 0x5d0, the Unicode codepoint of ALEPH). Then this fragment: else if (EQ (key, meta_prefix_char)) =09{ =09 add_meta =3D 1; =09 continue; =09} correctly decides that META modifier should be applied. But then thi= s fragment (see the line marked with "<<<<<<<"): =09 if (!INTEGERP (key) =09 || EQ (key, meta_prefix_char) =09 || (XINT (key) & meta_modifier)) =09 { =09 args[len++] =3D Fsingle_key_description (meta_prefix_char, Q= nil); =09 args[len++] =3D sep; =09 if (EQ (key, meta_prefix_char)) =09=09continue; =09 } =09 else =09 XSETINT (key, (XINT (key) | meta_modifier) & ~0x80); <<<<<<<< resets the 0x80 bit of 0x5d0, converting it to 0x550 in the process, which yields the Armenian character shown above. Is this a bug, a feature, or what? If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file d:/gnu/bzr/emacs/trunk/etc/DEBUG. In GNU Emacs 24.1.50.1 (i386-mingw-nt5.1.2600) of 2012-07-30 on HOME-C4E4A596F7 Bzr revision: 109283 dmantipov@yandex.ru-20120730040239-3fql4aq0pe97w= 1fh Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (3.4) --no-opt --enable-checking --cflags -Id:/usr/include/libxml2 -DGLYPH_DEBUG=3D1' Important settings: value of $EMACSDATA: D:/gnu/bzr/emacs/trunk/etc value of $EMACSDOC: D:/gnu/bzr/emacs/trunk/etc value of $EMACSLOADPATH: D:/gnu/bzr/emacs/trunk/lisp;D:/gnu/bzr/ema= cs/trunk/leim value of $EMACSPATH: D:/gnu/bzr/emacs/trunk/bin value of $LANG: ENU locale-coding-system: cp1255 default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-h c =D7=90 M-x r e p o r t=20 - e m a Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. M-=D5=90 (translated from =D7=90) is undefined byte-code: End of buffer Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 = mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcommen= t lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgia= n utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer button faces cus-face files text-properties overlay sha1 m= d5 base64 format env code-pages mule custom widget hashtable-print-reada= ble backquote make-network-process multi-tty emacs) From unknown Sun Jun 22 04:16:04 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Eli Zaretskii Subject: bug#12090: closed (Re: bug#12090: 24.1.50; "C-h c" mutilates M-c when c is a non-ASCII character) Message-ID: References: <83zk6hg7wj.fsf@gnu.org> X-Gnu-PR-Message: they-closed 12090 X-Gnu-PR-Package: emacs Reply-To: 12090@debbugs.gnu.org Date: Mon, 30 Jul 2012 07:59:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1343635142-28753-1" This is a multi-part message in MIME format... ------------=_1343635142-28753-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #12090: 24.1.50; "C-h c" mutilates M-c when c is a non-ASCII character which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 12090@debbugs.gnu.org. --=20 12090: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12090 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1343635142-28753-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 12090-done) by debbugs.gnu.org; 30 Jul 2012 07:58:39 +0000 Received: from localhost ([127.0.0.1]:49860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SvksA-0007TB-JA for submit@debbugs.gnu.org; Mon, 30 Jul 2012 03:58:39 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:58080) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Svks7-0007T3-Vn for 12090-done@debbugs.gnu.org; Mon, 30 Jul 2012 03:58:37 -0400 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3WltJV5tQqz3hhVn; Mon, 30 Jul 2012 09:51:22 +0200 (CEST) X-Auth-Info: frmK5Hb561gOqWN25iK0UhYezg4yGlOAiH0ObLUROFI= Received: from igel.home (ppp-93-104-158-221.dynamic.mnet-online.de [93.104.158.221]) by mail.mnet-online.de (Postfix) with ESMTPA id 3WltJV3v3fzbbjq; Mon, 30 Jul 2012 09:51:22 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id E7151CA2A5; Mon, 30 Jul 2012 09:51:21 +0200 (CEST) From: Andreas Schwab To: Eli Zaretskii Subject: Re: bug#12090: 24.1.50; "C-h c" mutilates M-c when c is a non-ASCII character References: <83zk6hg7wj.fsf@gnu.org> X-Yow: YOW!! Now I'm playing with my HOLOGRAPHIC ATOMIC SIMULATION LASER pinball machine!! WORLD PEACE is in the BALANCE!! Date: Mon, 30 Jul 2012 09:51:21 +0200 In-Reply-To: <83zk6hg7wj.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 30 Jul 2012 08:00:44 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12090-done Cc: 12090-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Eli Zaretskii writes: > But then this fragment (see the line marked with "<<<<<<<"): > > if (!INTEGERP (key) > || EQ (key, meta_prefix_char) > || (XINT (key) & meta_modifier)) > { > args[len++] = Fsingle_key_description (meta_prefix_char, Qnil); > args[len++] = sep; > if (EQ (key, meta_prefix_char)) > continue; > } > else > XSETINT (key, (XINT (key) | meta_modifier) & ~0x80); <<<<<<<< > > resets the 0x80 bit of 0x5d0, converting it to 0x550 in the process, > which yields the Armenian character shown above. This was added in commit b042457 back in 2004, and is most likely unintented. Fixed in trunk. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ------------=_1343635142-28753-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Jul 2012 05:08:34 +0000 Received: from localhost ([127.0.0.1]:49786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SviDZ-0003il-IC for submit@debbugs.gnu.org; Mon, 30 Jul 2012 01:08:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39195) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SviDW-0003ie-Sh for submit@debbugs.gnu.org; Mon, 30 Jul 2012 01:08:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Svi6Y-0008OG-82 for submit@debbugs.gnu.org; Mon, 30 Jul 2012 01:01:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:56044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Svi6Y-0008OC-4j for submit@debbugs.gnu.org; Mon, 30 Jul 2012 01:01:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Svi6W-0000Bb-Vq for bug-gnu-emacs@gnu.org; Mon, 30 Jul 2012 01:01:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Svi6V-0008Nv-Ks for bug-gnu-emacs@gnu.org; Mon, 30 Jul 2012 01:01:16 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:51969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Svi6V-0008Nr-CA for bug-gnu-emacs@gnu.org; Mon, 30 Jul 2012 01:01:15 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M7Y00400J4V0F00@a-mtaout22.012.net.il> for bug-gnu-emacs@gnu.org; Mon, 30 Jul 2012 08:00:32 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M7Y003WFJ8VOB60@a-mtaout22.012.net.il> for bug-gnu-emacs@gnu.org; Mon, 30 Jul 2012 08:00:31 +0300 (IDT) Date: Mon, 30 Jul 2012 08:00:44 +0300 From: Eli Zaretskii Subject: 24.1.50; "C-h c" mutilates M-c when c is a non-ASCII character To: bug-gnu-emacs@gnu.org Message-id: <83zk6hg7wj.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This bug report will be sent to the Bug-GNU-Emacs mailing list and the GNU bug tracker at debbugs.gnu.org. Please check that the From: line contains a valid email address. After a delay of up to one day, you should receive an acknowledgment at that address. Please write in English if possible, as the Emacs maintainers usually do not have translators for other languages. Please describe exactly what actions triggered the bug, and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': emacs -Q C-h c ESC-ALEPH =3D> M-=D5=90 (translated from =D7=90) is undefined (I type ALEPH by switching the keyboard to Hebrew. With a hebrew input method, I cannot produce META-ALEPH, I get M-t instead. Maybe it's a separate problem.) Now, if I step through key-description, I see that the key arrives there as [27 1488], which seems correct (1488 is 0x5d0, the Unicode codepoint of ALEPH). Then this fragment: else if (EQ (key, meta_prefix_char)) =09{ =09 add_meta =3D 1; =09 continue; =09} correctly decides that META modifier should be applied. But then thi= s fragment (see the line marked with "<<<<<<<"): =09 if (!INTEGERP (key) =09 || EQ (key, meta_prefix_char) =09 || (XINT (key) & meta_modifier)) =09 { =09 args[len++] =3D Fsingle_key_description (meta_prefix_char, Q= nil); =09 args[len++] =3D sep; =09 if (EQ (key, meta_prefix_char)) =09=09continue; =09 } =09 else =09 XSETINT (key, (XINT (key) | meta_modifier) & ~0x80); <<<<<<<< resets the 0x80 bit of 0x5d0, converting it to 0x550 in the process, which yields the Armenian character shown above. Is this a bug, a feature, or what? If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file d:/gnu/bzr/emacs/trunk/etc/DEBUG. In GNU Emacs 24.1.50.1 (i386-mingw-nt5.1.2600) of 2012-07-30 on HOME-C4E4A596F7 Bzr revision: 109283 dmantipov@yandex.ru-20120730040239-3fql4aq0pe97w= 1fh Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (3.4) --no-opt --enable-checking --cflags -Id:/usr/include/libxml2 -DGLYPH_DEBUG=3D1' Important settings: value of $EMACSDATA: D:/gnu/bzr/emacs/trunk/etc value of $EMACSDOC: D:/gnu/bzr/emacs/trunk/etc value of $EMACSLOADPATH: D:/gnu/bzr/emacs/trunk/lisp;D:/gnu/bzr/ema= cs/trunk/leim value of $EMACSPATH: D:/gnu/bzr/emacs/trunk/bin value of $LANG: ENU locale-coding-system: cp1255 default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-h c =D7=90 M-x r e p o r t=20 - e m a Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. M-=D5=90 (translated from =D7=90) is undefined byte-code: End of buffer Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 = mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcommen= t lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgia= n utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer button faces cus-face files text-properties overlay sha1 m= d5 base64 format env code-pages mule custom widget hashtable-print-reada= ble backquote make-network-process multi-tty emacs) ------------=_1343635142-28753-1--