* C++-mode is assign to a key that I want to use.
@ 2006-05-03 21:06 pookiebearbottom
2006-05-03 22:40 ` Kevin Rodgers
0 siblings, 1 reply; 2+ messages in thread
From: pookiebearbottom @ 2006-05-03 21:06 UTC (permalink / raw)
C++-mode is assigning to the key C-c C-B (c-submit-bug-report). I want
to use it for something else. Any ideas how to override it? I tried
to do it by:
putting:
(global-set-key [(control c) (control b)] 'bury-buffer)
in my
"my-c-mode-common-hook"
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: C++-mode is assign to a key that I want to use.
2006-05-03 21:06 C++-mode is assign to a key that I want to use pookiebearbottom
@ 2006-05-03 22:40 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2006-05-03 22:40 UTC (permalink / raw)
pookiebearbottom@yahoo.com 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:
> putting:
> (global-set-key [(control c) (control b)] 'bury-buffer)
> in my
> "my-c-mode-common-hook"
>
> 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.
--
Kevin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-05-03 22:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-03 21:06 C++-mode is assign to a key that I want to use pookiebearbottom
2006-05-03 22:40 ` Kevin Rodgers
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.