2

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?

Curyous
  • 8,716
  • 15
  • 58
  • 83

1 Answers1

4

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)
Curyous
  • 8,716
  • 15
  • 58
  • 83
Brian Malehorn
  • 2,627
  • 14
  • 15