unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to redefine C-c
@ 2013-01-14 22:45 Clément Sipieter
  2013-01-14 23:00 ` Drew Adams
  0 siblings, 1 reply; 2+ messages in thread
From: Clément Sipieter @ 2013-01-14 22:45 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 530 bytes --]

Hello everybody,

I want to redefine "C-c" to "backward-char" like (define-key global-map
"\C-c" 'backward-char) because I've a BÉPO keyboard. However when I enable
the c-mode, my bind is overridden by a prefix.

Major Mode Bindings:
key             binding
---             -------

C-c             Prefix Command

I have tested to redefine "mode-specific-command-prefix" like (define-key
global-map "\C-y" 'mode-specific-command-prefix) in my init.el but my bind
it's always overridden.


Any ideas?

Thanks

[-- Attachment #2: Type: text/html, Size: 721 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: How to redefine C-c
  2013-01-14 22:45 How to redefine C-c Clément Sipieter
@ 2013-01-14 23:00 ` Drew Adams
  0 siblings, 0 replies; 2+ messages in thread
From: Drew Adams @ 2013-01-14 23:00 UTC (permalink / raw)
  To: 'Clément Sipieter', help-gnu-emacs

> 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.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-14 23:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-14 22:45 How to redefine C-c Clément Sipieter
2013-01-14 23:00 ` Drew Adams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).