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: Teemu Likonen <tlikonen <at> iki.fi>
To: 6632 <at> debbugs.gnu.org
Subject: bug#6632: 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 1 (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 359 days ago.

Previous Next


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