diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-10-11 13:16:57 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-10-11 13:16:57 +0200 |
commit | 237b2ecf2d1140d6789822c5de90f9bf2a8ce50c (patch) | |
tree | 5cd9e9d50ac260c0daec5a6b12bcca4885e7c162 /lisp/emulation | |
parent | 74d3a1e7d6450f226d2f942d0c0e3410eea87dfc (diff) | |
download | emacs-237b2ecf2d1140d6789822c5de90f9bf2a8ce50c.tar.gz |
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.
Diffstat (limited to 'lisp/emulation')
-rw-r--r-- | lisp/emulation/cua-base.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 3976c1ea063..a98393fa2e5 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -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) |