help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: How to redefine C-c


From: Drew Adams
Subject: RE: How to redefine C-c
Date: Mon, 14 Jan 2013 15:00:50 -0800

> I want to redefine "C-c" to "backward-char"... 

I don't recommend that you do that, but if you want to, you can.

> However when I enable the c-mode, my bind is overridden by a prefix.

(global-set-key "\C-c" 'backward-char)
(define-key c-mode-map "\C-c" 'backward-char)

> I have tested to redefine "mode-specific-command-prefix" like
> (define-key global-map "\C-y" 'mode-specific-command-prefix)

That just binds the same keymap that `C-c' is bound to to another key (`C-y') as
well.  What you need to do is remove the `C-c' binding, not just add a `C-y'
binding.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]