GNU logs - #6527, boring messages


Message sent to owner <at> debbugs.gnu.org, larry@HIDDEN, bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#6527: C-h b alters key-translation-map (in a bad way)
Resent-From: David Reitter <david.reitter@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-To: owner <at> debbugs.gnu.org
Resent-CC: larry@HIDDEN, bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 28 Jun 2010 14:42:02 +0000
Resent-Message-ID: <handler.6527.B.12777361181855 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 6527
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 6527 <at> debbugs.gnu.org
Cc: larry@HIDDEN
X-Debbugs-Original-To: Bug-Gnu-Emacs <bug-gnu-emacs@HIDDEN>
X-Debbugs-Original-Xcc: larry@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.12777361181855
          (code B ref -1); Mon, 28 Jun 2010 14:42:02 +0000
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 <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OTFX3-0000Ts-Jm
	for submit <at> 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 <david.reitter@HIDDEN>) id 1OTFX0-0000Tl-1M
	for submit <at> 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 <david.reitter@HIDDEN>) id 1OTFWu-0006Lw-Tu
	for submit <at> 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@HIDDEN; 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 <david.reitter@HIDDEN>) id 1OTFWo-0002Wb-1D
	for bug-gnu-emacs@HIDDEN; 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 <david.reitter@HIDDEN>) id 1OTFWn-0002WM-TM
	for bug-gnu-emacs@HIDDEN; Mon, 28 Jun 2010 10:41:42 -0400
Received: by vws1 with SMTP id 1so1765641vws.0
	for <bug-gnu-emacs@HIDDEN>; 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 <david.reitter@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Date: Mon, 28 Jun 2010 10:41:36 -0400
Message-Id: <D91D370B-1D6F-4D58-B5AE-DB1159F7229E@HIDDEN>
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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.4 (-----)

X-debbugs-cc: larry@HIDDEN

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:
<help-echo> C-x k <return> ) s e <backspace> <backspace>=20
<backspace> ( s e t q SPC n s - a <backspace> c o m=20
m a n d - m o d i f i e r SPC ' a l t ) C-x C-e <return>=20
A-c A-c <down> <down> C-h b <help-echo> <down-mouse-1>=20
<mouse-1> A-c A-c <help-echo> <menu-bar> <help-menu>=20
<send-emacs-bug-report>

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 <larry@HIDDEN>
> Date: June 25, 2010 7:02:32 AM EDT
> To: aquamacs-bugs@HIDDEN
> Cc: larry@HIDDEN
> Subject: [Aquamacs-bugs] 23.2; ^H B doesn't just describe bindings, it =
changes them
> Reply-To: Bug reports for Aquamacs Emacs <aquamacs-bugs@HIDDEN>
>=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@HIDDEN
> 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:
> <ns-application-activated> ^H C =E2=8C=98. ^H B ^H C =E2=8C=98. ^X=20
> O ^H O <help-echo> <help-echo> <help-echo> <help-echo>=20
> <help-echo> <switch-frame> ^H C =E2=8C=98. <menu-bar> <help-menu>=20
> <bug-diagnosis> <start-vanilla-aquamacs> <menu-bar>=20
> <help-menu> <bug-diagnosis> <send-emacs-bug-report
>>=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@HIDDEN
> http://lists.aquamacs.org/mailman/listinfo.cgi/aquamacs-bugs





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: David Reitter <david.reitter@HIDDEN>
Subject: bug#6527: Acknowledgement (C-h b alters key-translation-map (in a
 bad way))
Message-ID: <handler.6527.B.12777361181855.ack <at> debbugs.gnu.org>
References: <D91D370B-1D6F-4D58-B5AE-DB1159F7229E@HIDDEN>
X-Gnu-PR-Message: ack 6527
X-Gnu-PR-Package: emacs
Reply-To: 6527 <at> debbugs.gnu.org
Date: Mon, 28 Jun 2010 14:42:03 +0000

Thank you for filing a new bug report with GNU.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

As you requested using X-Debbugs-CC, your message was also forwarded to
  larry@HIDDEN
(after having been given a bug report number, if it did not have one).

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 6527 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
6527: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D6527
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#6527: C-h b alters key-translation-map (in a bad way)
Resent-From: David Reitter <david.reitter@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-To: owner <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 28 Jun 2010 19:49:02 +0000
Resent-Message-ID: <handler.6527.B6527.127775451814738 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 6527
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 6527 <at> debbugs.gnu.org
Received: via spool by 6527-submit <at> debbugs.gnu.org id=B6527.127775451814738
          (code B ref 6527); Mon, 28 Jun 2010 19:49:02 +0000
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 <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OTKJo-0003pf-Ph
	for submit <at> 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 <david.reitter@HIDDEN>) id 1OTKJm-0003pX-WA
	for 6527 <at> debbugs.gnu.org; Mon, 28 Jun 2010 15:48:35 -0400
Received: by vws7 with SMTP id 7so1796048vws.3
	for <6527 <at> 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)
From: David Reitter <david.reitter@HIDDEN>
In-Reply-To: <handler.6527.B.12777361181855.ack <at> debbugs.gnu.org>
Date: Mon, 28 Jun 2010 15:48:28 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <3F7BCB9E-BE5B-41CA-BEDD-C94FA27CFC7C@HIDDEN>
References: <D91D370B-1D6F-4D58-B5AE-DB1159F7229E@HIDDEN>
	<handler.6527.B.12777361181855.ack <at> debbugs.gnu.org>
X-Mailer: Apple Mail (2.1081)
X-Spam-Score: -3.2 (---)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> 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.






Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 21 Sep 2011 21:09:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 21 17:09:19 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1R6U2g-0008M4-6e
	for submit <at> 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 <larsi@HIDDEN>) id 1R6U2d-0008Lw-Ec
	for control <at> 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 <larsi@HIDDEN>) id 1R6U2G-0006mi-OY
	for control <at> debbugs.gnu.org; Wed, 21 Sep 2011 23:08:52 +0200
Date: Wed, 21 Sep 2011 23:05:26 +0200
Message-Id: <m3zkhxr4h5.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: Lars Magne Ingebrigtsen <larsi@HIDDEN>
Subject: control message for bug #6527
X-MailScanner-ID: 1R6U2G-0006mi-OY
X-Netfonds-MailScanner: Found to be clean
X-Netfonds-MailScanner-From: larsi@HIDDEN
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 <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

tags 6527 patch




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 10 Apr 2012 10:31:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 10 06:31:28 2012
Received: from localhost ([127.0.0.1]:48085 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SHYMB-0001uJ-Ib
	for submit <at> 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 <larsi@HIDDEN>) id 1SHYM9-0001uB-CV
	for control <at> 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 <larsi@HIDDEN>) id 1SHYL1-0005gX-Ax
	for control <at> debbugs.gnu.org; Tue, 10 Apr 2012 12:30:15 +0200
Date: Tue, 10 Apr 2012 12:30:14 +0200
Message-Id: <m3bomzj2vd.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: Lars Magne Ingebrigtsen <larsi@HIDDEN>
Subject: control message for bug #6527
X-MailScanner-ID: 1SHYL1-0005gX-Ax
X-Netfonds-MailScanner: Found to be clean
X-Netfonds-MailScanner-From: larsi@HIDDEN
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 <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

tags 6527 - patch




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#6527: C-h b autoloads iso-transl and alters key-translation-map
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 13 Apr 2012 12:40:02 +0000
Resent-Message-ID: <handler.6527.B6527.133432076626276 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 6527
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: David Reitter <david.reitter@HIDDEN>
Cc: 6527 <at> debbugs.gnu.org
Received: via spool by 6527-submit <at> debbugs.gnu.org id=B6527.133432076626276
          (code B ref 6527); Fri, 13 Apr 2012 12:40:02 +0000
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 <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SIfmf-0006pk-76
	for submit <at> 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 <monnier@HIDDEN>) id 1SIfmX-0006pV-Ai
	for 6527 <at> 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 <monnier@HIDDEN>
Message-ID: <jwvvcl36ci1.fsf-monnier+emacs@HIDDEN>
References: <EAE1A91C-3B23-42B8-BF06-0D9E3EEF0146@HIDDEN>
Date: Fri, 13 Apr 2012 08:37:58 -0400
In-Reply-To: <EAE1A91C-3B23-42B8-BF06-0D9E3EEF0146@HIDDEN> (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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> 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




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#6527: C-h b autoloads iso-transl and alters key-translation-map
Resent-From: Chong Yidong <cyd@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 18 Jul 2012 11:29:02 +0000
Resent-Message-ID: <handler.6527.B6527.134261090423475 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 6527
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Stefan Monnier <monnier@HIDDEN>
Cc: David Reitter <david.reitter@HIDDEN>, 6527 <at> debbugs.gnu.org
Received: via spool by 6527-submit <at> debbugs.gnu.org id=B6527.134261090423475
          (code B ref 6527); Wed, 18 Jul 2012 11:29:02 +0000
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 <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SrSQa-00066a-1h
	for submit <at> 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 <cyd@HIDDEN>) id 1SrSQX-00066T-MJ
	for 6527 <at> 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 <cyd@HIDDEN>)
	id 1SrSKd-000495-CF; Wed, 18 Jul 2012 07:22:16 -0400
From: Chong Yidong <cyd@HIDDEN>
References: <EAE1A91C-3B23-42B8-BF06-0D9E3EEF0146@HIDDEN>
	<jwvvcl36ci1.fsf-monnier+emacs@HIDDEN>
Date: Wed, 18 Jul 2012 19:22:09 +0800
In-Reply-To: <jwvvcl36ci1.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
	of "Fri, 13 Apr 2012 08:37:58 -0400")
Message-ID: <87bojdco0u.fsf@HIDDEN>
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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)

Stefan Monnier <monnier@HIDDEN> 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





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#6527: C-h b autoloads iso-transl and alters key-translation-map
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 19 Jul 2012 12:13:02 +0000
Resent-Message-ID: <handler.6527.B6527.13426999746555 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 6527
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Chong Yidong <cyd@HIDDEN>
Cc: David Reitter <david.reitter@HIDDEN>, 6527 <at> debbugs.gnu.org
Received: via spool by 6527-submit <at> debbugs.gnu.org id=B6527.13426999746555
          (code B ref 6527); Thu, 19 Jul 2012 12:13:02 +0000
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 <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SrpbC-0001hf-03
	for submit <at> 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 <monnier@HIDDEN>) id 1Srpb9-0001hX-T8
	for 6527 <at> 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 <monnier@HIDDEN>
Message-ID: <jwvmx2wrmlz.fsf-monnier+emacs@HIDDEN>
References: <EAE1A91C-3B23-42B8-BF06-0D9E3EEF0146@HIDDEN>
	<jwvvcl36ci1.fsf-monnier+emacs@HIDDEN> <87bojdco0u.fsf@HIDDEN>
Date: Thu, 19 Jul 2012 08:06:32 -0400
In-Reply-To: <87bojdco0u.fsf@HIDDEN> (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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> 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





Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.