I'm running cua-mode
, and I'm trying to override the cua binding for C-c
so that I can insert a function somefunc
before passing the baton to the original cua binding which is cua-prefix-override-handler
.
However, I find I can't override the original cua binding. (And even if could, I'm still not sure it would work because cua-prefix-override-handler
appears to be a tricky function based on timing in a loop.)
;; .emacs
...
(cua-mode t)
...
(defun somefunc--cua ()
"Run `some-command' and `some-other-command' in sequence."
(interactive)
(somefunc))
(cua-prefix-override-handler))
;; THIS FAILS TO OVERRIDE CUA BINDING FOR C-c
(global-set-key (kbd "C-c") 'somefunc--cua)
How can I achieve the desired effect of insert an extra function somefunct
and then continuing on with the cua processing?
(Background information about the motivation for this question is here.)