GNU bug report logs - #6632
23.2.50; dired-mode should use [remap ...] instead of hard-coded overriding of global key bindings

Previous Next

Package: emacs;

Reported by: Teemu Likonen <tlikonen <at> iki.fi>

Date: Wed, 14 Jul 2010 16:01:01 UTC

Severity: normal

Found in version 23.2.50

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Teemu Likonen <tlikonen <at> iki.fi>
Subject: bug#6632: closed (Re: bug#6632: 23.2.50; dired-mode should use
 [remap ...] instead of  hard-coded overriding of global key bindings)
Date: Thu, 22 Jul 2010 11:57:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#6632: 23.2.50; dired-mode should use [remap ...] instead of hard-coded overriding of global key bindings

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 6632 <at> debbugs.gnu.org.

-- 
6632: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6632
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Juanma Barranquero <lekktu <at> gmail.com>
To: Teemu Likonen <tlikonen <at> iki.fi>
Cc: 6632-done <at> debbugs.gnu.org
Subject: Re: bug#6632: 23.2.50; dired-mode should use [remap ...] instead of 
	hard-coded overriding of global key bindings
Date: Thu, 22 Jul 2010 13:57:00 +0200
On Wed, Jul 14, 2010 at 17:58, Teemu Likonen <tlikonen <at> iki.fi> wrote:

> The attached patch fixes this for dired-mode.

Committed, thanks.

    Juanma

[Message part 3 (message/rfc822, inline)]
From: Teemu Likonen <tlikonen <at> iki.fi>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.2.50; dired-mode should use [remap ...] instead of hard-coded
	overriding of global key bindings
Date: Wed, 14 Jul 2010 18:58:13 +0300
[Message part 4 (text/plain, inline)]
dired-mode uses hard-coding when it rebinds some global key bindings.
For example, there is the following line in dired.el file:

    (define-key map "\C-n" 'dired-next-line)

Therefore it overrides the global C-n key, whatever its command is in
user's keymap. The command should be bound like this:

    (define-key map [remap next-line] 'dired-next-line)

Using [remap ...] is preferred because it makes it possible for user to
redefine the global keymap they way she wishes and keys will still
automatically get their mode-specific behaviour. The attached patch
fixes this for dired-mode.

[dired-mode-remap.diff (text/x-diff, attachment)]

This bug report was last modified 14 years and 358 days ago.

Previous Next


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