How do you rebind a key set by CUA mode in Emacs?

397 views Asked by At

In my .emacs I have:

(cua-mode 1)

I would like to use Alt-V for next-buffer, but CUA mode sets it to delete-selection-repeat-replace-region. I've tried this:

(global-unset-key (kbd "M-v"))
(global-set-key   (kbd "M-v") 'next-buffer)

This doesn't work, I assume because the global key map is shadowed by the cua mode one, so how do I change it?

1

There are 1 answers

0
Brian Malehorn On BEST ANSWER

You are completely correct, cua-mode is shadowing the global map. I believe the solution is:

(define-key cua--cua-keys-keymap (kbd "M-v") 'next-buffer)