GNU bug report logs - #6527
C-h b alters key-translation-map (in a bad way)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: David Reitter <david.reitter@HIDDEN>; dated Mon, 28 Jun 2010 14:42:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 6527) by debbugs.gnu.org; 19 Jul 2012 12:12:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 19 08:12:54 2012
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>
To: Chong Yidong <cyd@HIDDEN>
Subject: Re: bug#6527: C-h b autoloads iso-transl and alters
	key-translation-map
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-Debbugs-Envelope-To: 6527
Cc: David Reitter <david.reitter@HIDDEN>, 6527 <at> debbugs.gnu.org
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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#6527; Package emacs. Full text available.

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


Received: (at 6527) by debbugs.gnu.org; 18 Jul 2012 11:28:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 18 07:28:24 2012
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>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#6527: C-h b autoloads iso-transl and alters
	key-translation-map
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-Debbugs-Envelope-To: 6527
Cc: David Reitter <david.reitter@HIDDEN>, 6527 <at> debbugs.gnu.org
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





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#6527; Package emacs. Full text available.

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


Received: (at 6527) by debbugs.gnu.org; 13 Apr 2012 12:39:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 13 08:39:25 2012
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>
To: David Reitter <david.reitter@HIDDEN>
Subject: Re: C-h b autoloads iso-transl and alters key-translation-map
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-Debbugs-Envelope-To: 6527
Cc: 6527 <at> debbugs.gnu.org
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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#6527; Package emacs. Full text available.
Removed tag(s) patch. Request was from Lars Magne Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) patch. Request was from Lars Magne Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 6527-quiet <at> debbugs.gnu.org:


Received: (at 6527-quiet) by debbugs.gnu.org; 19 Jul 2010 17:43:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 19 13:43:39 2010
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 1OauNO-0001i6-TH
	for submit <at> 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 <rgm@HIDDEN>) id 1OauNM-0001i0-3j
	for 6527-quiet <at> 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 <rgm@HIDDEN>) id 1OauNi-0002UF-0y
	for 6527-quiet <at> debbugs.gnu.org; Mon, 19 Jul 2010 13:43:58 -0400
X-From-Line: emacs-devel-bounces+rgm=gnu.org@HIDDEN 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 <emacs-devel-bounces+rgm=gnu.org@HIDDEN>)
	id 1OaRhs-0001P2-Ne for rgm@HIDDEN; 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 <emacs-devel-bounces+rgm=gnu.org@HIDDEN>)
	id 1OaRhs-0001yy-EK for rgm@HIDDEN; 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@HIDDEN; 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@HIDDEN; Sun, 18 Jul 2010 07:06:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <david.reitter@HIDDEN>) id 1OaRhA-0004vP-Ga
	for emacs-devel@HIDDEN; 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 <david.reitter@HIDDEN>) id 1OaRhA-0004vG-4q
	for emacs-devel@HIDDEN; Sun, 18 Jul 2010 07:06:08 -0400
Received: by wyj26 with SMTP id 26so4006385wyj.0
	for <emacs-devel@HIDDEN>; 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 <david.reitter@HIDDEN>
In-Reply-To: <handler.6527.B.12777361181855.ack <at> debbugs.gnu.org>
Date: Sun, 18 Jul 2010 12:06:03 +0100
References: <D91D370B-1D6F-4D58-B5AE-DB1159F7229E@HIDDEN>
	<handler.6527.B.12777361181855.ack <at> debbugs.gnu.org>
To: 6527-quiet <at> 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@HIDDEN
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: <ibd3uj5puq.fsf@HIDDEN>
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 <at> debbugs.gnu.org
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 (-----)

[ 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)
  




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


Received: (at 6527) by debbugs.gnu.org; 28 Jun 2010 19:48:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 28 15:48:37 2010
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)
Subject: Re: C-h b alters key-translation-map (in a bad way)
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>
To: 6527 <at> debbugs.gnu.org
X-Mailer: Apple Mail (2.1081)
X-Spam-Score: -3.2 (---)
X-Debbugs-Envelope-To: 6527
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.






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6527; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 28 Jun 2010 14:41:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 28 10:41:58 2010
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
Subject: C-h b alters key-translation-map (in a bad way)
Date: Mon, 28 Jun 2010 10:41:36 -0400
Message-Id: <D91D370B-1D6F-4D58-B5AE-DB1159F7229E@HIDDEN>
To: Bug-Gnu-Emacs <bug-gnu-emacs@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-Debbugs-Envelope-To: submit
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





Acknowledgement sent to David Reitter <david.reitter@HIDDEN>:
New bug report received and forwarded. Copy sent to larry@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, larry@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#6527; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
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.