[Top][All Lists]

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

Re: C++-mode is assign to a key that I want to use.

From: Kevin Rodgers
Subject: Re: C++-mode is assign to a key that I want to use.
Date: Wed, 03 May 2006 16:40:48 -0600
User-agent: Thunderbird (Windows/20060308)

address@hidden wrote:
C++-mode is assigning to the key C-c C-B (c-submit-bug-report).  I want
to use it for something else.

The Keymaps node of the Emacs manual explains that `C-c b' or `C-c B'
would avoid that:

|    As a user, you can redefine any key; but it is usually best to stick
| to key sequences that consist of `C-c' followed by a letter (upper or
| lower case).  These keys are "reserved for users," so they won't
| conflict with any properly designed Emacs extension.  The function keys
| <F5> through <F9> are also reserved for users.  If you redefine some
| other key, your definition may be overridden by certain extensions or
| major modes which redefine the same key.

Any ideas how to override it?  I tried
to do it by:
 (global-set-key [(control c) (control b)] 'bury-buffer)
in my

and then doing:
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)

but no dice (I also have a (global-set-key [(control c) (control b)]
'bury-buffer) in the main part of .emacs)

If you want to override the local key binding in C mode, you need to
call local-set-key instead of global-set-key.


reply via email to

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