Change how cua-mode defined C-x' and
C-c'
* lisp/emulation/cua-base.el (cua-cut-handler): (cua-copy-handler): New aliases (bug#28930). (cua--init-keymaps): Use them for `C-x' and `C-c' to be able to distinguish the commands when looking them up in reverse.
This commit is contained in:
parent
74d3a1e7d6
commit
237b2ecf2d
1 changed files with 7 additions and 4 deletions
|
@ -699,6 +699,11 @@ Repeating prefix key when region is active works as a single prefix key."
|
|||
(interactive)
|
||||
(cua--prefix-override-replay 0))
|
||||
|
||||
;; These aliases are so that we can look up the commands and find the
|
||||
;; correct keys when generating menus.
|
||||
(defalias 'cua-cut-handler #'cua--prefix-override-handler)
|
||||
(defalias 'cua-copy-handler #'cua--prefix-override-handler)
|
||||
|
||||
(defun cua--prefix-repeat-handler ()
|
||||
"Repeating prefix key when region is active works as a single prefix key."
|
||||
(interactive)
|
||||
|
@ -1258,10 +1263,8 @@ If ARG is the atom `-', scroll upward by nearly full screen."
|
|||
(define-key cua--cua-keys-keymap [(meta v)]
|
||||
#'delete-selection-repeat-replace-region))
|
||||
|
||||
(define-key cua--prefix-override-keymap [(control x)]
|
||||
#'cua--prefix-override-handler)
|
||||
(define-key cua--prefix-override-keymap [(control c)]
|
||||
#'cua--prefix-override-handler)
|
||||
(define-key cua--prefix-override-keymap [(control x)] #'cua-cut-handler)
|
||||
(define-key cua--prefix-override-keymap [(control c)] #'cua-copy-handler)
|
||||
|
||||
(define-key cua--prefix-repeat-keymap [(control x) (control x)]
|
||||
#'cua--prefix-repeat-handler)
|
||||
|
|
Loading…
Add table
Reference in a new issue