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

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

Re: Novice question: my add-hook binding for c-mode doesnt work :(


From: Henrik Enberg
Subject: Re: Novice question: my add-hook binding for c-mode doesnt work :(
Date: Fri, 2 Dec 2005 08:07:01 +0100 (CET)

> From: Xavier Maillard <zedek@gnu-rox.org>
> Date: Fri, 02 Dec 2005 07:52:03 +0100
> 
> "Kpoxman (sent by Nabble.com)" <lists@nabble.com> writes:
> 
> > The code from .emacs:
> >
> > (add-hook 'c-mode-common-hook
> >       '(lambda () (define-key c-mode-map (kbd "M-o") 'kpox-switch-h-cpp))
> >       )
> 
> This form is useless. You don't need to bind this key definition to this hook.
> 
> Just use the (define-key ..) stuff and that *should* work.

`c-mode-map' isn't defined until cc-mode is loaded, putting just the
define-key in .emacs will thow an error.

The problem is as someone pointed out that he should use
`c-mode-base-map' instead of `c-mode-map'.




reply via email to

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