GNU bug report logs - #10566
some files bind to global-map "C-x" instead of ctl-x-map

Previous Next

Package: emacs;

Reported by: Teika Kazura <teika <at> lavabit.com>

Date: Fri, 20 Jan 2012 18:00:02 UTC

Severity: normal

Fixed in version 24.0.93

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10566 in the body.
You can then email your comments to 10566 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10566; Package emacs. (Fri, 20 Jan 2012 18:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Teika Kazura <teika <at> lavabit.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 20 Jan 2012 18:00:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Teika Kazura <teika <at> lavabit.com>
To: bug-gnu-emacs <at> gnu.org
Subject: some files bind to global-map "C-x" instead of ctl-x-map
Date: Fri, 20 Jan 2012 21:23:42 +0900 (JST)
Hi, Emacs developers.

In recent versions of emacs - at least in 23.3.3 and 24.0.92 -
some files do
  (define-key global-map "\C-x\C-j" 'some-command)
but it has to be
  (define-key ctl-x-map "\C-j" 'some-command)
If you bind "C-x" to non-keymap, you'll receive an error.

I've searched for "define-key.*global.*C-x" with the tool "ack" (it's
 like grep) in emacs-24.0.92/lisp/, and all hits are:
------------------------------------------------------------------------
obsolete/iso-insert.el:624:      (define-key global-map "\C-x8" 8859-1-map))
dired-x.el:88:               (define-key global-map "\C-x\C-j" 'dired-jump)
dired-x.el:89:               (define-key global-map "\C-x4\C-j" 'dired-jump-other-window))
dired-x.el:91:               (define-key global-map "\C-x\C-j" nil))
dired-x.el:93:               (define-key global-map "\C-x4\C-j" nil))))
vc/vc-hooks.el:944:(define-key global-map "\C-xv" 'vc-prefix-map)
------------------------------------------------------------------------

There's also lookup-key, but I don't know how to fix some of them.
All occurrences are:
------------------------------------------------------------------------
eshell/em-term.el:221:;     (lookup-key (current-global-map) "\C-x"))
eshell/em-term.el:244:;       (copy-keymap (lookup-key (current-global-map) "\C-x")))
term.el:911:    (copy-keymap (lookup-key (current-global-map) "\C-x")))
term.el:3484:   (lookup-key (current-global-map) "\C-x"))
obsolete/iso-insert.el:623:   (if (not (lookup-key global-map "\C-x8"))
dired-x.el:90:           (if (eq 'dired-jump (lookup-key global-map "\C-x\C-j"))
dired-x.el:92:           (if (eq 'dired-jump-other-window (lookup-key global-map "\C-x4\C-j"))
------------------------------------------------------------------------

Thank you very much for developing Emacs.

Sincerely,
Teika (Teika kazura)





Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Thu, 26 Jan 2012 02:39:01 GMT) Full text and rfc822 format available.

Notification sent to Teika Kazura <teika <at> lavabit.com>:
bug acknowledged by developer. (Thu, 26 Jan 2012 02:39:02 GMT) Full text and rfc822 format available.

Message #10 received at 10566-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 10566-done <at> debbugs.gnu.org
Subject: Re: bug#10566: some files bind to global-map "C-x" instead of
	ctl-x-map
Date: Wed, 25 Jan 2012 21:37:58 -0500
Version: 24.0.93

Teika Kazura wrote:

> In recent versions of emacs - at least in 23.3.3 and 24.0.92 -

Since always probably (at least 21.1).

> some files do
>   (define-key global-map "\C-x\C-j" 'some-command)
> but it has to be
>   (define-key ctl-x-map "\C-j" 'some-command)
> If you bind "C-x" to non-keymap, you'll receive an error.

Thanks for the report.

> obsolete/iso-insert.el:624:      (define-key global-map "\C-x8" 8859-1-map))

Let's not worry about obsolete things (one more reason to remove it).

> dired-x.el:88:               (define-key global-map "\C-x\C-j" 'dired-jump)
> dired-x.el:89:               (define-key global-map "\C-x4\C-j" 'dired-jump-other-window))
> dired-x.el:91:               (define-key global-map "\C-x\C-j" nil))
> dired-x.el:93:               (define-key global-map "\C-x4\C-j" nil))))

Fixed.

> vc/vc-hooks.el:944:(define-key global-map "\C-xv" 'vc-prefix-map)

I don't think this matters, since it is preloaded, so it's impossible to
change the C-x mapping before this point, but I changed it anyway.

> eshell/em-term.el:221:;     (lookup-key (current-global-map) "\C-x"))
> eshell/em-term.el:244:;       (copy-keymap (lookup-key (current-global-map) "\C-x")))

Let's not worry about code that has never been uncommented.

> term.el:911:    (copy-keymap (lookup-key (current-global-map) "\C-x")))

Changed.

> term.el:3484:   (lookup-key (current-global-map) "\C-x"))

I think it is appropriate to leave this as-is.

> obsolete/iso-insert.el:623:   (if (not (lookup-key global-map "\C-x8"))

Obsolete, ignoring.

> dired-x.el:90:           (if (eq 'dired-jump (lookup-key global-map "\C-x\C-j"))
> dired-x.el:92:           (if (eq 'dired-jump-other-window (lookup-key global-map "\C-x4\C-j"))

Fixed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 23 Feb 2012 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 177 days ago.

Previous Next


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