all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.