osx - Preferring one function when a keybinding in two emacs packages overlap -
on os x, .emacs containing lines:
(require 'dired) (add-hook 'dired-load-hook (function (lambda () (load "dired-x"))))
dired-omit-mode
in dired-x
, ns-open-file-using-panel
in ns-win
fight on keybinding m-o.
i understand .emacs above specifying dired-x should loaded after dired—and hence binding of m-o in dired-x should take on when emacs starts. not case. reason binding in ns-win wins.
how can force dired-x keybinding @ startup?
edit
(following phils' suggestion) if .emacs loads 2 other packages define m-o
(require 'ns-win) (require 'facemenu) (require 'dired) (add-hook 'dired-load-hook (function (lambda () (load "dired-x"))))
even though dired loaded last, binding in facemenu still takes over.
first, load ns-win
, sets binding. this:
(add-hook 'dired-mode-hook (lambda() (require 'dired-x) (define-key dired-mode-map (kbd "m-o") 'dired-omit-mode)))
the dired-mode-hook
override bound m-o dired-mode
.
Comments
Post a Comment