bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6632: 23.2.50; dired-mode should use [remap ...] instead of hard-cod


From: Teemu Likonen
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.50 (gnu/linux)

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.

Attachment: dired-mode-remap.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]