[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Remove local key binding in Dired
From: |
Xah Lee |
Subject: |
Re: Remove local key binding in Dired |
Date: |
Thu, 2 Jul 2009 06:34:39 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Jul 1, 11:54 pm, Torben Knudsen <t...@es.aau.dk> wrote:
> I have the following which I find conveinent
>
> ;;; Window spliting
> (global-set-key (kbd "M-3") 'split-window-horizontally) ; was digit-argument
> (global-set-key (kbd "M-2") 'split-window-vertically) ; was digit-argument
> (global-set-key (kbd "M-1") 'delete-other-windows) ; was digit-argument
> (global-set-key (kbd "M-0") 'delete-window) ; was digit-argument
> (global-set-key (kbd "M-o") 'other-window) ; was prefix
>
> However, in dired
>
> M-o runs the command dired-omit-mode
>
> I can remove this "manually" by
>
> local-unset-key M-o
>
> in a dired buffer
>
> but how can I do this in my .emacs?
you might try the latest version of ergoemacs, which fixes this.
http://code.google.com/p/ergoemacs/
The code that fixes this is this:
(add-hook 'dired-mode-hook
(lambda ()
(define-key dired-mode-map (kbd "C-n") 'new-empty-buffer) ; was
dired-next-line
(define-key dired-mode-map (kbd "M-o") 'other-window) ; was dired-
omit-mode
(define-key dired-mode-map (kbd "M-s") 'isearch-forward) ; was
prefix in emacs 23.
))
some explanation here:
• How To Reclaim Keybindings In Emacs
http://xahlee.org/emacs/reclaim_keybindings.html
Xah
∑ http://xahlee.org/
☄