While in cua mode, I want C-x to act as if cua mode was not active. I like cua C-c, C-v and C-z. But, I grew accustomed to eMacs use of C-x, and I want C-x to remain exactly as it was, with or without a selection.
(define-key cua--prefix-repeat-keymap (kbd "C-x") nil)
successfully modifies the value to nil, but cua still strangely affects the functioning of C-x, if it does anything at all.
I would like a way to completely remove the keybinding because in this case, setting the value to nil does not cause the binding to be ignored.
For the curious... I prefer delete to cause deleted ranges to enter the yank stack (like the cua C-x would do). I achieved this with the following:
(bind-keys ([delete] . (lambda ()
"Kill active region to the yank stack.
Otherwise, perform normal delete.
Use backspace for an emacs range delete into register 0."
(interactive)
(if (use-region-p)
(delete-active-region t) ;; yank selection into stack
(delete-char 1))))) ;; forget singly removed characters
Via stack exchange How to implement remove-key to completely undo the effect of define-key, I extracted elisp which successfully removes the key binding.
Using
remove-key
, all cua reaction to C-x is successfully eliminated: