From unknown Tue Aug 19 09:34:52 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#6527 <6527@debbugs.gnu.org> To: bug#6527 <6527@debbugs.gnu.org> Subject: Status: C-h b alters key-translation-map (in a bad way) Reply-To: bug#6527 <6527@debbugs.gnu.org> Date: Tue, 19 Aug 2025 16:34:52 +0000 retitle 6527 C-h b alters key-translation-map (in a bad way) reassign 6527 emacs submitter 6527 David Reitter severity 6527 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 28 10:41:58 2010 Received: (at submit) by debbugs.gnu.org; 28 Jun 2010 14:41:58 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTFX3-0000Ts-Jm for submit@debbugs.gnu.org; Mon, 28 Jun 2010 10:41:58 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTFX0-0000Tl-1M for submit@debbugs.gnu.org; Mon, 28 Jun 2010 10:41:55 -0400 Received: from lists.gnu.org ([199.232.76.165]:46665) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OTFWu-0006Lw-Tu for submit@debbugs.gnu.org; Mon, 28 Jun 2010 10:41:48 -0400 Received: from [140.186.70.92] (port=40764 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTFWr-0000Sm-Q1 for bug-gnu-emacs@gnu.org; Mon, 28 Jun 2010 10:41:48 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTFWo-0002Wb-1D for bug-gnu-emacs@gnu.org; Mon, 28 Jun 2010 10:41:45 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:57528) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTFWn-0002WM-TM for bug-gnu-emacs@gnu.org; Mon, 28 Jun 2010 10:41:42 -0400 Received: by vws1 with SMTP id 1so1765641vws.0 for ; Mon, 28 Jun 2010 07:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=LYq/P1AqCMKPi7n1kYPshczUkicjwbRjhdu7Kp19NPM=; b=OSvjS3QNi4vWEwhEF8CoeAc1355ETgnF1+gSX1UVTKKcLHIsrSasGTUXh/GUd1DQS0 h+bY34N07DBF+cNFJjNhaP0G95K7dt9EUWvu6YsnDo7zX6F8nDA1cHr1RjY4T3bkJSBX e0werMyMHF1WlgmnbU4DHKRm2uVQhgUeu249Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=w2nPgRPH5SlW3ybUEXSUjsFgaQGE9j2Yg40FwPLXsdb1WSyzpzho824UTB0s2NY/qU kv5/f47Pg3NT5NUULxcZ/wEOG2M6TW3k4kkKUqyvyowJ3CsBWKCUFM9oAE21VupcyDqQ bljes6dzcvSs/LDdjGWR3yYzFnZ5qHcubzJE0= Received: by 10.224.72.132 with SMTP id m4mr3329725qaj.145.1277736100537; Mon, 28 Jun 2010 07:41:40 -0700 (PDT) Received: from [192.168.1.17] (pool-96-235-7-98.pitbpa.east.verizon.net [96.235.7.98]) by mx.google.com with ESMTPS id q31sm24434760qcq.44.2010.06.28.07.41.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 28 Jun 2010 07:41:39 -0700 (PDT) From: David Reitter Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: C-h b alters key-translation-map (in a bad way) Date: Mon, 28 Jun 2010 10:41:36 -0400 Message-Id: To: Bug-Gnu-Emacs Mime-Version: 1.0 (Apple Message framework v1081) X-Mailer: Apple Mail (2.1081) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.5 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -5.4 (-----) X-debbugs-cc: larry@denenberg.com C-h b alters the key translation map. Emacs (setq ns-command-modifier 'alt) ;; On NS, we need to assign the = modifier key Press Command-C -> A-c is undefined (correct) C-h b Press Command-C -> =C2=A2 is inserted The value of `key-translation-map' is indeed changed by C-h b, and = resetting it fixes the problem. Some debugging suggests that something odd is happening in = describe_map(). Commenting out map =3D call1 (Qkeymap_canonicalize, map); makes the error go away. A direct call to `keymap-canonicalize' does = not, however, reproduce it, so there is something else going on. Full credit for the original report of a reproducible bug goes to Larry = Denenberg - his report is quoted below. In GNU Emacs 23.2.50.1 (x86_64-apple-darwin10.3.1, NS = apple-appkit-1038.29) of 2010-05-10 on elin.psy.cmu.edu Windowing system distributor `Apple', version 10.3.1038 configured using `configure '--with-ns'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: which-function-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x k ) s e =20 ( s e t q SPC n s - a c o m=20 m a n d - m o d i f i e r SPC ' a l t ) C-x C-e =20 A-c A-c C-h b =20 A-c A-c =20 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Unable to load color "darkblue" alt Type C-x 1 to delete the help window, C-M-v to scroll help. Load-path shadows: None found. Features: (shadow sort mail-extr message ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug kmacro two-column iso-transl help-mode view ghostedit ghostedit-stopwords-en easy-mmode which-func imenu tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win easymenu tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian 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 loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) =3D=3D=3D Begin forwarded message: > From: Larry Denenberg > Date: June 25, 2010 7:02:32 AM EDT > To: aquamacs-bugs@aquamacs.org > Cc: larry@denenberg.com > Subject: [Aquamacs-bugs] 23.2; ^H B doesn't just describe bindings, it = changes them > Reply-To: Bug reports for Aquamacs Emacs >=20 >=20 > Starting from scratch, type ^H C =E2=8C=98. [that's C-h A-.) to get > =E2=8C=98. runs the command keyboard-quit >=20 > Then type ^H B to see a help buffer describing key bindings, after > which ^H C =E2=8C=98. again (in any buffer) yields > =C2=B7 (translated from =E2=8C=98.) runs the command = self-insert-command >=20 > Note that the first character here is not a period but a centered dot, = #xb7. >=20 > BTW, after you've done this, you get "Options have changed - save = them?" > upon exit. >=20 > I get this behavior in Aquamacs as described below, whether starting > "-q" or "-Q", and also in 24.0.50.1. I do not get it in 22.3.1, nor = in > plain GNU Emacs 24.0.50.2. >=20 > /Larry Denenberg > larry@denenberg.com > http://larry.denenberg.com/ >=20 >=20 > In GNU Emacs 23.2.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54) > of 2010-05-09 on braeburn.aquamacs.org - Aquamacs Distribution 2.0 > Windowing system distributor `Apple', version 10.3.1038 > configured using `configure '--with-ns' '--without-x' 'CFLAGS=3D-arch = i386 -arch ppc' 'LDFLAGS=3D-arch i386 -arch ppc'' >=20 > Important settings: > value of $LC_ALL: nil > value of $LC_COLLATE: nil > value of $LC_CTYPE: nil > value of $LC_MESSAGES: nil > value of $LC_MONETARY: nil > value of $LC_NUMERIC: nil > value of $LC_TIME: nil > value of $LANG: en_US.UTF-8 > value of $XMODIFIERS: nil > locale-coding-system: utf-8-unix > default enable-multibyte-characters: t >=20 > Major mode: Text >=20 > Minor modes in effect: > savehist-mode: t > smart-frame-positioning-mode: t > aquamacs-autoface-mode: t > recentf-mode: t > osx-key-mode: t > tabbar-mwheel-mode: t > tabbar-mode: t > show-paren-mode: t > delete-selection-mode: t > pc-selection-mode: t > cua-mode: t > 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-encryption-mode: t > auto-compression-mode: t > smart-spacing-mode: t > column-number-mode: t > line-number-mode: t > visual-line-mode: t > transient-mark-mode: t >=20 > Recent input: > ^H C =E2=8C=98. ^H B ^H C =E2=8C=98. ^X=20 > O ^H O =20 > ^H C =E2=8C=98. =20 > =20 > >=20 >=20 > Recent messages: > Cleaning up the recentf list...done (0 removed) > 29 environment variables imported from login shell (/bin/bash). > Loading = /Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/auc= tex.el (source)...done > Loading = /Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/has= kell-mode/haskell-site-file.el (source)...done > one-buffer-one-frame-mode disabled. > Mark set [32 times] > Aquamacs is based on GNU Emacs, a part of the GNU/Linux system. It is = Free Software: you can improve and redistribute it under the GNU General = Public License, version 3 or later. Copyright (C) 2010 Free Software = Foundation, Inc. (C) 2010 D. Reitter. No Warranty. > =E2=8C=98. runs the command keyboard-quit > Type "q" to quit, M-x scroll-up to scroll help. > =C2=B7 (translated from =E2=8C=98.) runs the command = self-insert-command [2 times] > start-vanilla-aquamacs: Searching for program: no such file or = directory, Aquamacs.app/Contents/MacOS/Aquamacs >=20 > Load-path shadows: > None found. >=20 > Features: > (shadow sort mail-extr message ecomplete rfc822 mml mml-sec > password-cache mm-decode mm-bodies mm-encode mailcap mail-parse = rfc2231 > rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc > mm-util mail-prsvr gmm-utils mailheader canlock sha1 hex-util hashcash > mail-utils emacsbug kmacro two-column iso-transl = aquamacs-mode-defaults > auctex-config server tex-site smart-dnd aquamacs-aux savehist = mouse-sel > one-buffer-one-frame smart-frame-positioning drews_init > color-theme-autoloads saveplace visual-line aquamacs-bug > aquamacs-autoface-mode aquamacs-editing sendmail recentf tree-widget > cus-edit osxkeys emulate-mac-keyboard-mode frame-cmds strings misc-fns > thingatpt+ thingatpt frame-fns avoid aquamacs-mac-fontsets fit-frame > aquamacs-frame-setup aquamacs-tabbar tabbar-window cl cl-19 tabbar > easy-mmode cus-start cus-load aquamacs-site-start cocoa-compatibility > filladapt aquamacs-redo check-for-updates aquamacs-menu osx_defaults > aquamacs-tool-bar aquamacs mac-extra-functions aquamacs-tools > aquamacs-macros parse-time timezone time-date paren delsel pc-select > cua-base wid-edit regexp-opt advice advice-preload byte-opt bytecomp > byte-compile debug help-fns help-mode view image-file disp-table = tooltip > ediff-hook vc-hooks lisp-float-type mwheel ns-win easymenu tool-bar = dnd > fontset image fringe lisp-mode register page menu-bar rfn-eshadow = timer > select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu > font-core frame cham georgian 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 loaddefs button minibuffer faces > cus-face files text-properties overlay md5 base64 format env = code-pages > mule custom widget hashtable-print-readable backquote > make-network-process ns multi-tty emacs) >=20 > Command line: (Aquamacs.app/Contents/MacOS/Aquamacs) >=20 > PATH: = /Users/larry/Bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/nmh/bin:/usr/loc= al/bin:/usr/local/mysql/bin:/usr/texbin:/opt/subversion/bin:/usr/lib:/User= s/larry/Bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/nmh/bin:/usr/local/bi= n:/usr/local/mysql/bin:/usr/texbin:/opt/subversion/bin:/usr/lib:/usr/texbi= n:/usr/local/texlive/2008/bin >=20 > exec-path: (/Users/larry/Bin /bin /sbin /usr/bin /usr/sbin = /usr/local/nmh/bin /usr/local/bin /usr/local/mysql/bin /usr/texbin = /opt/subversion/bin /usr/lib /Users/larry/Bin /bin /sbin /usr/bin = /usr/sbin /usr/local/nmh/bin /usr/local/bin /usr/local/mysql/bin = /usr/texbin /opt/subversion/bin /usr/lib = /Applications/Aquamacs.app/Contents/MacOS/bin = /usr/local/texlive/2008/bin) > _______________________________________________ > Aquamacs-bugs mailing list > Aquamacs-bugs@aquamacs.org > http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-bugs From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 28 15:48:37 2010 Received: (at 6527) by debbugs.gnu.org; 28 Jun 2010 19:48:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTKJo-0003pf-Ph for submit@debbugs.gnu.org; Mon, 28 Jun 2010 15:48:37 -0400 Received: from mail-vw0-f44.google.com ([209.85.212.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTKJm-0003pX-WA for 6527@debbugs.gnu.org; Mon, 28 Jun 2010 15:48:35 -0400 Received: by vws7 with SMTP id 7so1796048vws.3 for <6527@debbugs.gnu.org>; Mon, 28 Jun 2010 12:48:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=URas74wjSi8eZANPcOgW5V7kXaiLb+B3D+H8BpbDx0I=; b=W9HV1zZfW9S97x9r6zPeNyGG1tNBI2DJz728mMKtyLNHQRbQvMGq6fzQkxzxWvKCFD n37hR2i4C87kGRNoiaP28GmrdjnepWrpSqQg0YPJwrzSknGFyEEhWaGIcY3XSTSS5tri H7WIYAwV/5fWMBG2bUo5rVNUFTJJlCfR6r+6M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=uT0BWvCRZedQN/GUrvozpWCusesQYSfGg4PWKylXtBtDubUF45tNGYbn2ZPurL7APd QxpRhMzVY2ZWDlHrDKAe+ls6VmKftSu6jhbVTLJysan3nZdb5QTZykOc8YKBrF0/rdD9 hhc/q8w17IyABdGp0fNAwqgINAKEb+iT4f6+Q= Received: by 10.220.95.199 with SMTP id e7mr3203726vcn.138.1277754510329; Mon, 28 Jun 2010 12:48:30 -0700 (PDT) Received: from elin.psy.cmu.edu (ELIN.PSY.CMU.EDU [128.2.248.190]) by mx.google.com with ESMTPS id y7sm19431394vcx.22.2010.06.28.12.48.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 28 Jun 2010 12:48:29 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: C-h b alters key-translation-map (in a bad way) From: David Reitter In-Reply-To: Date: Mon, 28 Jun 2010 15:48:28 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <3F7BCB9E-BE5B-41CA-BEDD-C94FA27CFC7C@gmail.com> References: To: 6527@debbugs.gnu.org X-Mailer: Apple Mail (2.1081) X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 6527 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.2 (---) I have reduced bug 6527 to this: (map-keymap-internal 'ignore 'iso-transl-ctl-x-8-map) (as called via `keymap_canonicalize') or also (keymap-parent 'iso-transl-ctl-x-8-map) because it seems to be the call to get_keymap with autoloading that is = causing it. Indeed we have the following autoload: ;;;*** ;;;### (autoloads nil "iso-transl" "international/iso-transl.el" ;;;;;; (19423 17168)) ;;; Generated autoloads from international/iso-transl.el (or key-translation-map (setq key-translation-map = (make-sparse-keymap))) (define-key key-translation-map "\C-x8" 'iso-transl-ctl-x-8-map) (autoload 'iso-transl-ctl-x-8-map "iso-transl" "Keymap for C-x 8 = prefix." t 'keymap) And, merely loading iso-trans.el is documented to create keybindings = with Alt. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 19 13:43:39 2010 Received: (at 6527-quiet) by debbugs.gnu.org; 19 Jul 2010 17:43:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OauNO-0001i6-TH for submit@debbugs.gnu.org; Mon, 19 Jul 2010 13:43:39 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OauNM-0001i0-3j for 6527-quiet@debbugs.gnu.org; Mon, 19 Jul 2010 13:43:37 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1OauNi-0002UF-0y for 6527-quiet@debbugs.gnu.org; Mon, 19 Jul 2010 13:43:58 -0400 X-From-Line: emacs-devel-bounces+rgm=gnu.org@gnu.org Sun Jul 18 07:06:52 2010 Received: from mail.gnu.org ([199.232.76.166]:44148 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OaRhs-0001P2-Ne for rgm@gnu.org; Sun, 18 Jul 2010 07:06:52 -0400 Received: from lists.gnu.org ([199.232.76.165]:36844) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OaRhs-0001yy-EK for rgm@gnu.org; Sun, 18 Jul 2010 07:06:52 -0400 Received: from localhost ([127.0.0.1]:46521 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OaRhr-000366-Uj for rgm@gnu.org; Sun, 18 Jul 2010 07:06:51 -0400 Received: from [140.186.70.92] (port=37119 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OaRhB-000361-Ux for emacs-devel@gnu.org; Sun, 18 Jul 2010 07:06:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OaRhA-0004vP-Ga for emacs-devel@gnu.org; Sun, 18 Jul 2010 07:06:09 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:63274) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OaRhA-0004vG-4q for emacs-devel@gnu.org; Sun, 18 Jul 2010 07:06:08 -0400 Received: by wyj26 with SMTP id 26so4006385wyj.0 for ; Sun, 18 Jul 2010 04:06:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=OOdZdJcVXnsjor2rg/EMeNTcYG42iINT4832nNvEfI0=; b=pWUYSojXuKI7vcisc3u9hB9h1UXEHM0s7ZrykbYc9PNQLblTtwoe5Ns41gBn8xBs0n tKNen+Q8J9NSHF2z2oAJmwjNqOy6ENHWDJWqSPYNCZ6IeMj5wTuGpZINTNPEWwwGH/TY ifd6uoEi3oLFMTQ4Ie7hhbHwAt+XE0Gl7roLI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=RzmsSt7X1NWsCPwUn4Ufe4EOE7okpKKWPXJBr9Km/9dtDahcE/l59FtcwW+EW7LCYJ Bm/Pz//6+pfuKC/bAa62JUE98IcGzYbUGQnLz5ZJTHPtYi8cUiYVW0g45LdITzFeR/cq hWptW4u+0Xfkp+nPupppQ/lFplbOn4EECMztw= Received: by 10.227.32.82 with SMTP id b18mr2788067wbd.149.1279451166638; Sun, 18 Jul 2010 04:06:06 -0700 (PDT) Received: from [192.168.0.100] (cpc1-sgyl8-0-0-cust16.sgyl.cable.virginmedia.com [80.192.30.17]) by mx.google.com with ESMTPS id l6sm1668104wed.1.2010.07.18.04.06.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 18 Jul 2010 04:06:05 -0700 (PDT) From: David Reitter In-Reply-To: Date: Sun, 18 Jul 2010 12:06:03 +0100 References: To: 6527-quiet@debbugs.gnu.org X-Debbugs-No-Ack: yes X-Mailer: Apple Mail (2.1081) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: iso-transl pach (bug#6527: C-h b alters key-translation-map (in a bad way)) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Lines: 172 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 6527-quiet X-BeenThere: debbugs-submit@debbugs.gnu.org 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: -5.4 (-----) [ Resent from http://lists.gnu.org/archive/html/emacs-devel/2010-07/msg00967.html Otherwise how will someone reading this bug report find it? ] I reported bug 6527 a while ago. > 6527: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6527 The problem was that iso-trans.el is autoloaded (e.g., when doing C-h b) and unconditionally binds Alt key combinations, overriding any user/package defined A- keys. Once loaded, there is no obvious way to undo those bindings. Here's a fix for this. It defines a new minor mode, `iso-transl-mode', which controls those A-... key bindings. I chose to automatically define the C-x 8 prefix key combinations when the package is loaded, so that the C-x 8 autoloading mechanism remains in place for the comfort of the occasional user. I don't know how much iso-transl is used by people, so I can't gauge the impact of this. Please advise. diff --combined lisp/international/iso-transl.el index 8a88b50,b11a7a2..0000000 --- a/lisp/international/iso-transl.el +++ b/lisp/international/iso-transl.el @@@ -25,21 -25,16 +25,21 @@@ ;;; Commentary: ;; Loading this package defines three ways of entering the non-ASCII -;; printable characters with codes above 127: the prefix C-x 8, or the -;; Alt key, or a dead accent key. For example, you can enter uppercase -;; A-umlaut as `C-x 8 " A' or `Alt-" A' (if you have an Alt key) or -;; `umlaut A' (if you have an umlaut/diaeresis key). +;; printable characters with codes above 127: the prefix C-x 8, and, +;; with `iso-transl-mode' enabled, also the Alt key, and a dead accent +;; key. For example, you can enter uppercase A-umlaut as `C-x 8 " A' +;; or, `iso-transl-mode' is enabled, `Alt-" A' (if you have an Alt +;; key) or `umlaut A' (if you have an umlaut/diaeresis key). -;; C-x 8 is set up to autoload this package, -;; but Alt keys and dead accent keys are only defined -;; once you have loaded the package. It is nontrivial -;; to make all of the Alt keys autoload, and it is not clear -;; that the dead accent keys SHOULD autoload this package. +;; C-x 8 is set up to autoload this package, but Alt keys and dead +;; accent keys are only defined once you have loaded the package and +;; enabled `iso-transl-mode'. It is nontrivial to make all of the Alt +;; keys autoload, and it is not clear that the dead accent keys SHOULD +;; autoload this package. + +;; Note that C-h b will autoload this package, which is one reason +;; why the more destructive key sequences (without C-x 8 prefix) are +;; only defined in `iso-transl-mode', and are thus reversible. ;;; Code: @@@ -252,41 -247,29 +252,41 @@@ sequence VECTOR. (VECTOR is normally o (setq key-translation-map (make-sparse-keymap))) (define-key key-translation-map "\C-x8" iso-transl-ctl-x-8-map) +(defmacro iso-transl-define-key (keymap key def) + "Back up definition of KEY in KEYMAP, then `define-key'." + `(progn + (push (cons ,key (or (lookup-key ,keymap ,key) 'none)) + (get ',keymap 'iso-transl-backup)) + (define-key ,keymap ,key ,def))) + ;; For each entry in the alist, we'll make up to three ways to generate ;; the character in question: the prefix `C-x 8'; the ALT modifier on ;; the first key of the sequence; and (if applicable) replacing the first ;; key of the sequence with the corresponding dead key. For example, a ;; character associated with the string "~n" can be input with `C-x 8 ~ n' ;; or `Alt-~ n' or `mute-asciitilde n'. +(defun iso-transl-define-prefix-keys (alist) + (while alist + (let ((translated-vec (cdr (car alist)))) + (iso-transl-define-key iso-transl-ctl-x-8-map (car (car alist)) translated-vec)) + (setq alist (cdr alist)))) (defun iso-transl-define-keys (alist) (while alist (let ((translated-vec (cdr (car alist)))) - (define-key iso-transl-ctl-x-8-map (car (car alist)) translated-vec) + ;(iso-transl-define-key iso-transl-ctl-x-8-map (car (car alist)) translated-vec) (let ((inchar (aref (car (car alist)) 0)) (vec (vconcat (car (car alist)))) (tail iso-transl-dead-key-alist)) (aset vec 0 (logior (aref vec 0) ?\A-\^@)) - (define-key key-translation-map vec translated-vec) - (define-key isearch-mode-map (vector (aref vec 0)) nil) + (iso-transl-define-key key-translation-map vec translated-vec) + (iso-transl-define-key isearch-mode-map (vector (aref vec 0)) nil) (while tail (if (eq (car (car tail)) inchar) (let ((deadvec (copy-sequence vec)) (deadkey (cdr (car tail)))) (aset deadvec 0 deadkey) - (define-key isearch-mode-map (vector deadkey) nil) - (define-key key-translation-map deadvec translated-vec))) + (iso-transl-define-key isearch-mode-map (vector deadkey) nil) + (iso-transl-define-key key-translation-map deadvec translated-vec))) (setq tail (cdr tail))))) (setq alist (cdr alist)))) @@@ -297,45 -280,14 +297,45 @@@ (iso-transl-define-keys (cdr (assoc lang iso-transl-language-alist)))) -;; The standard mapping comes automatically. You can partially overlay it -;; with a language-specific mapping by using `M-x iso-transl-set-language'. -(iso-transl-define-keys iso-transl-char-map) - +;; unconditional definitions +(iso-transl-define-prefix-keys iso-transl-char-map) (define-key isearch-mode-map "\C-x" nil) (define-key isearch-mode-map [?\C-x t] 'isearch-other-control-char) (define-key isearch-mode-map "\C-x8" nil) +(define-minor-mode iso-transl-mode + "ISO Key translation mode. +This mode defines two ways of entering the non-ASCII printable +characters with codes above 127: the Alt key and +a dead accent key. For example, you can enter uppercase A-umlaut as +`Alt-\" A' (if you have an Alt key) or `umlaut A' (if +you have an umlaut/diaeresis key). + +This character can always be entered as `C-x 8 \" A' regardless of +this mode." + :group 'i18n + :lighter " ISO" + + (if iso-transl-mode + ;; The standard mapping comes automatically. You can partially overlay it + ;; with a language-specific mapping by using `M-x iso-transl-set-language'. + (iso-transl-define-keys iso-transl-char-map) + (mapc + (lambda (key-def) + (define-key key-translation-map (car key-def) + (and (not (eq (cdr key-def) 'none)) (cdr key-def)))) + (nreverse (get 'key-translation-map 'iso-transl-backup))) + (put 'key-translation-map 'iso-transl-backup nil) + (mapc + (lambda (key-def) + (condition-case nil + (define-key isearch-mode-map (car key-def) + (and (not (eq (cdr key-def) 'none)) (cdr key-def))) + ;; if some of the unconditional definitions above are instead made conditional + ;; restoring the default keys fails. + (error nil))) + (nreverse (get 'isearch-mode-map 'iso-transl-backup))) + (put 'isearch-mode-map 'iso-transl-backup nil))) (provide 'iso-transl) From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 17:09:19 2011 Received: (at control) by debbugs.gnu.org; 21 Sep 2011 21:09:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6U2g-0008M4-6e for submit@debbugs.gnu.org; Wed, 21 Sep 2011 17:09:18 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6U2d-0008Lw-Ec for control@debbugs.gnu.org; Wed, 21 Sep 2011 17:09:15 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R6U2G-0006mi-OY for control@debbugs.gnu.org; Wed, 21 Sep 2011 23:08:52 +0200 Date: Wed, 21 Sep 2011 23:05:26 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #6527 X-MailScanner-ID: 1R6U2G-0006mi-OY X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1317244132.84893@T2Ljq938jFpl4uC4+Unurw X-Spam-Status: No X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.6 (--) tags 6527 patch From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 10 06:31:28 2012 Received: (at control) by debbugs.gnu.org; 10 Apr 2012 10:31:28 +0000 Received: from localhost ([127.0.0.1]:48085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHYMB-0001uJ-Ib for submit@debbugs.gnu.org; Tue, 10 Apr 2012 06:31:27 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:56532) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHYM9-0001uB-CV for control@debbugs.gnu.org; Tue, 10 Apr 2012 06:31:26 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SHYL1-0005gX-Ax for control@debbugs.gnu.org; Tue, 10 Apr 2012 12:30:15 +0200 Date: Tue, 10 Apr 2012 12:30:14 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #6527 X-MailScanner-ID: 1SHYL1-0005gX-Ax X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1334658616.16815@C/eLEYVsOFpb87SOeNOKrQ X-Spam-Status: No X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control 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 (-) tags 6527 - patch From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 13 08:39:25 2012 Received: (at 6527) by debbugs.gnu.org; 13 Apr 2012 12:39:26 +0000 Received: from localhost ([127.0.0.1]:56309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIfmf-0006pk-76 for submit@debbugs.gnu.org; Fri, 13 Apr 2012 08:39:25 -0400 Received: from ironport-out.teksavvy.com ([206.248.143.162]:21611) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SIfmX-0006pV-Ai for 6527@debbugs.gnu.org; Fri, 13 Apr 2012 08:39:19 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApUIACxOgk9sr+di/2dsb2JhbABDuCMDgQyBCIIKAQVWIxALNBIUGA0kiCG2MothhHkEkTOTEoFdgwM X-IronPort-AV: E=Sophos;i="4.75,391,1330923600"; d="scan'208";a="174053772" Received: from 108-175-231-98.dsl.teksavvy.com (HELO pastel.home) ([108.175.231.98]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 13 Apr 2012 08:37:58 -0400 Received: by pastel.home (Postfix, from userid 20848) id 57E7F5809E; Fri, 13 Apr 2012 08:37:58 -0400 (EDT) From: Stefan Monnier To: David Reitter Subject: Re: C-h b autoloads iso-transl and alters key-translation-map Message-ID: References: Date: Fri, 13 Apr 2012 08:37:58 -0400 In-Reply-To: (David Reitter's message of "Mon, 28 Jun 2010 15:51:14 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 6527 Cc: 6527@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 (-) IIRC the reason why we've accepted the "change upon load" behavior of iso-transl.el for so long is that it only affects Alt bindings, and most Emacs users probably don't have both Meta and Alt keys, so they can't get to the Alt bindings anyway. This said, I think your patch is doing the right thing: move those extra bindings to a minor mode. I'd just like to see the implementation changed to make use of the new multiple inheritance in keymaps: - define the added bindings statically in a separate keymap (call it iso-transl-mode-translation-map). - when enabling/disabling the mode, just add/remove that map from the parents of key-translation-map. That will save you from the iso-transl-define-key dance of saving previous bindings. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 18 07:28:24 2012 Received: (at 6527) by debbugs.gnu.org; 18 Jul 2012 11:28:24 +0000 Received: from localhost ([127.0.0.1]:47638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrSQa-00066a-1h for submit@debbugs.gnu.org; Wed, 18 Jul 2012 07:28:24 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:39128) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrSQX-00066T-MJ for 6527@debbugs.gnu.org; Wed, 18 Jul 2012 07:28:22 -0400 Received: from [155.69.19.199] (port=53850 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SrSKd-000495-CF; Wed, 18 Jul 2012 07:22:16 -0400 From: Chong Yidong To: Stefan Monnier Subject: Re: bug#6527: C-h b autoloads iso-transl and alters key-translation-map References: Date: Wed, 18 Jul 2012 19:22:09 +0800 In-Reply-To: (Stefan Monnier's message of "Fri, 13 Apr 2012 08:37:58 -0400") Message-ID: <87bojdco0u.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 6527 Cc: David Reitter , 6527@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: -6.9 (------) Stefan Monnier writes: > I'd just like to see the implementation changed to make use of the new > multiple inheritance in keymaps: > - define the added bindings statically in a separate keymap (call it > iso-transl-mode-translation-map). > - when enabling/disabling the mode, just add/remove that map from the > parents of key-translation-map. How about something like the following (modulo comment changes and fixing the isearch integration)? There's still no facility for cleanly adding/removing a keymap parent. So this patch makes iso-transl-map the parent to key-translation-map at top-level, and leaves it as the parent. To enable the key translations, it calls define-key on iso-transl-map; to disable the key translations, it does (setcdr iso-transl-map nil), which turns iso-transl-map back into a sparse keymap. (Hence this relies on knowledge of the internal representation of keymaps, but I don't see how to avoid that.) =3D=3D=3D modified file 'lisp/international/iso-transl.el' *** lisp/international/iso-transl.el 2012-07-18 09:27:23 +0000 --- lisp/international/iso-transl.el 2012-07-18 11:20:36 +0000 *************** *** 236,249 **** ("N" . [?=C3=91]) ("n" . [?=C3=B1])))) =20=20 ! (defvar iso-transl-ctl-x-8-map nil "Keymap for C-x 8 prefix.") ! (or iso-transl-ctl-x-8-map ! (fset 'iso-transl-ctl-x-8-map ! (setq iso-transl-ctl-x-8-map (make-sparse-keymap)))) ! (or key-translation-map ! (setq key-translation-map (make-sparse-keymap))) ! (define-key key-translation-map "\C-x8" iso-transl-ctl-x-8-map) =20=20 ;; For each entry in the alist, we'll make up to three ways to generate ;; the character in question: the prefix `C-x 8'; the ALT modifier on --- 236,247 ---- ("N" . [?=C3=91]) ("n" . [?=C3=B1])))) =20=20 ! (defvar iso-transl-map (make-sparse-keymap)) ! (set-keymap-parent key-translation-map iso-transl-map) !=20 ! (defvar iso-transl-ctl-x-8-map (make-sparse-keymap) "Keymap for C-x 8 prefix.") ! (fset 'iso-transl-ctl-x-8-map iso-transl-ctl-x-8-map) =20=20 ;; For each entry in the alist, we'll make up to three ways to generate ;; the character in question: the prefix `C-x 8'; the ALT modifier on *************** *** 259,265 **** (vec (vconcat (car (car alist)))) (tail iso-transl-dead-key-alist)) (aset vec 0 (logior (aref vec 0) ?\A-\^@)) ! (define-key key-translation-map vec translated-vec) (define-key isearch-mode-map (vector (aref vec 0)) nil) (while tail (if (eq (car (car tail)) inchar) --- 257,263 ---- (vec (vconcat (car (car alist)))) (tail iso-transl-dead-key-alist)) (aset vec 0 (logior (aref vec 0) ?\A-\^@)) ! (define-key iso-transl-map vec translated-vec) (define-key isearch-mode-map (vector (aref vec 0)) nil) (while tail (if (eq (car (car tail)) inchar) *************** *** 267,273 **** (deadkey (cdr (car tail)))) (aset deadvec 0 deadkey) (define-key isearch-mode-map (vector deadkey) nil) ! (define-key key-translation-map deadvec translated-vec))) (setq tail (cdr tail))))) (setq alist (cdr alist)))) =20=20 --- 265,271 ---- (deadkey (cdr (car tail)))) (aset deadvec 0 deadkey) (define-key isearch-mode-map (vector deadkey) nil) ! (define-key iso-transl-map deadvec translated-vec))) (setq tail (cdr tail))))) (setq alist (cdr alist)))) =20=20 *************** *** 280,286 **** =20=20 ;; The standard mapping comes automatically. You can partially overlay it ;; with a language-specific mapping by using `M-x iso-transl-set-language= '. ! (iso-transl-define-keys iso-transl-char-map) =20=20 (provide 'iso-transl) =20=20 --- 278,295 ---- =20=20 ;; The standard mapping comes automatically. You can partially overlay it ;; with a language-specific mapping by using `M-x iso-transl-set-language= '. !=20 ! (define-minor-mode iso-transl-mode ! "Toggle ISO-8859 Key Translation mode." ! :group 'i18n ! :global t ! (setcdr iso-transl-map nil) ! (setcdr iso-transl-ctl-x-8-map nil) ! (when iso-transl-mode ! (iso-transl-define-keys iso-transl-char-map) ! (define-key iso-transl-map "\C-x8" iso-transl-ctl-x-8-map))) !=20 ! (iso-transl-mode) =20=20 (provide 'iso-transl) =20=20 From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 19 08:12:54 2012 Received: (at 6527) by debbugs.gnu.org; 19 Jul 2012 12:12:54 +0000 Received: from localhost ([127.0.0.1]:49695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SrpbC-0001hf-03 for submit@debbugs.gnu.org; Thu, 19 Jul 2012 08:12:54 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:35016) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Srpb9-0001hX-T8 for 6527@debbugs.gnu.org; Thu, 19 Jul 2012 08:12:52 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q6JC6YfE017429; Thu, 19 Jul 2012 08:06:39 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id C5258AECFD; Thu, 19 Jul 2012 08:06:32 -0400 (EDT) From: Stefan Monnier To: Chong Yidong Subject: Re: bug#6527: C-h b autoloads iso-transl and alters key-translation-map Message-ID: References: <87bojdco0u.fsf@gnu.org> Date: Thu, 19 Jul 2012 08:06:32 -0400 In-Reply-To: <87bojdco0u.fsf@gnu.org> (Chong Yidong's message of "Wed, 18 Jul 2012 19:22:09 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4283=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4283> : streams <787166> : uri <1169283> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 6527 Cc: David Reitter , 6527@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: -3.5 (---) > How about something like the following (modulo comment changes and > fixing the isearch integration)? I don't much like the idea of hard-coding key-translation-map's parent like this. > There's still no facility for cleanly adding/removing a keymap parent. Then, let's try to fix this problem. How 'bout: (defun add-parent (map new-parent) (let ((cur (keymap-parent map))) (cond ((null cur) (set-keymap-parent map new-parent)) ((eq cur new-parent)) ((and (consp cur) (memq new-parent cur))) ((implicit-parents-holder-p cur) (push new-parent (cdr cur))) (t (set-keymap-parent map (make-composed-keymap (list new-parent cur))))))) (defun remove-parent (map parent) (let ((cur (keymap-parent map))) (cond ((eq cur parent) (set-keymap-parent map nil)) ((and (consp cur) (memq parent cur)) (delq parent cur) (unless (cdr cur) (set-keymap-parent map nil)))))) The only remaining problem is to define implicit-parents-holder-p which magically determines if the keymap is one of those that where implicitly created by add-parent (by calling make-composed-keymap) or if it's a *real* keymap that belongs to someone else and that we shouldn't modify. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 02 11:38:07 2021 Received: (at 6527) by debbugs.gnu.org; 2 Nov 2021 15:38:07 +0000 Received: from localhost ([127.0.0.1]:37845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhvrS-0000Kc-Qm for submit@debbugs.gnu.org; Tue, 02 Nov 2021 11:38:06 -0400 Received: from quimby.gnus.org ([95.216.78.240]:35030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhvrQ-0000K1-3Z for 6527@debbugs.gnu.org; Tue, 02 Nov 2021 11:38:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Jnu4QSvB60XDY2L8zmq1xDbiSpadEosVmjQ+PsqTA4E=; b=JuYd3dlxXZxH+MWK9HaEfYzS+p +jpCLc7313vq8MPr3WNTZctv6fCqDAsMnaHOHZ7tYQ3YIoOkyqJ844uDfuXBwsdKcbdQKfazAaG0q R9h51zPoWRLP/+hXDErj6l/3k3IiCssnxe1cIzjBsRcjC2qd/gkKZuoedI0G9nDlOHYs=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhvrG-00081H-54; Tue, 02 Nov 2021 16:37:56 +0100 From: Lars Ingebrigtsen To: David Reitter Subject: Re: bug#6527: C-h b alters key-translation-map (in a bad way) References: X-Now-Playing: Nona Hendryx's _Nona_: "Transformation" Date: Tue, 02 Nov 2021 16:37:52 +0100 In-Reply-To: (David Reitter's message of "Mon, 28 Jun 2010 10:41:36 -0400") Message-ID: <87h7culga7.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: David Reitter writes: > C-h b alters the key translation map. In Emacs 28, Emacs is preloaded with iso-transl, so this no longer happens. I'm therefore closing this bug report. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 6527 Cc: larry@denenberg.com, 6527@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) David Reitter writes: > C-h b alters the key translation map. In Emacs 28, Emacs is preloaded with iso-transl, so this no longer happens. I'm therefore closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 02 11:38:21 2021 Received: (at control) by debbugs.gnu.org; 2 Nov 2021 15:38:22 +0000 Received: from localhost ([127.0.0.1]:37848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhvrd-0000L3-1B for submit@debbugs.gnu.org; Tue, 02 Nov 2021 11:38:21 -0400 Received: from quimby.gnus.org ([95.216.78.240]:35044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhvrW-0000KV-89 for control@debbugs.gnu.org; Tue, 02 Nov 2021 11:38:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=kKwdb5PsKDDxGqjn3EIrXRwIvkYbRL1TNlwvEGLWAes=; b=fwEx2H58XQoS4KgtXor0PJGLkg kuROQdWKzr5KgVY4x4fpw/k4+MdA6MEJLlfXI+dLagV6JZaZAzONzqxweGj/zFpCPcUFy+C7/ZsXQ rS1K7ADEEgJYQeSAyDYaP+tG11SB2lhMca70B6qNW/d4rhJ/Q7ne0ZAyokrw+mANxy9o=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhvrO-00081O-8G for control@debbugs.gnu.org; Tue, 02 Nov 2021 16:38:04 +0100 Date: Tue, 02 Nov 2021 16:38:01 +0100 Message-Id: <87fsselg9y.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #6527 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 6527 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 6527 28.1 quit From unknown Tue Aug 19 09:34:52 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 01 Dec 2021 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator