Some of the packages I use define keybindings that I want to overwrite or remove. How do I overwrite/remove these keybindings?
For example, I use ace-window
and speedbar
together. ace-window
uses M-p
for switching windows, and I want to keep that binding. However, it's used by speedbar
for speedbar-restricted-prev
with (define-key map "\M-p" 'speedbar-restricted-prev)
in the source).
I don't know what speedbar-restricted-prev
does and I don't think I will be using it. This is how I have configured ace-window
. What else do I need to do to disable the binding of M-p
in speedbar
? Outside of speedbar
it works.
(use-package ace-window
:ensure t
:defer t
:init
(progn
(global-set-key (kbd "M-p") 'ace-window)
(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
;;more info at https://github.com/abo-abo/ace-window
))