In my case, company-mode
was overriding the cider-repl-mode
bindings for M-p
and M-n
when the Company completions menu was showing. The keymap for the completions menu is company-active-map
, but there's no minor mode corresponding to it (company-mode
is for when the menu is not active), so I couldn't use any of the existing answers.
Here's what I came up with instead:
(add-hook 'cider-repl-mode-hook
(lambda ()
(make-local-variable 'company-active-map)
(setq company-active-map (copy-tree company-active-map))
(define-key company-active-map (kbd "M-p") nil)
(define-key company-active-map (kbd "M-n") nil)))