From: Henrik Enberg <henrik.enberg@telia.com>
Subject: Re: Novice question: my add-hook binding for c-mode doesnt work :(
Date: Fri, 2 Dec 2005 08:07:01 +0100 (CET) [thread overview]
Message-ID: <20051202070701.B40573F28@rocksteady.printf.se> (raw)
In-Reply-To: <8764q8yorw.fsf@totoz.gnu-rox.org> (message from Xavier Maillard on Fri, 02 Dec 2005 07:52:03 +0100)
> 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'.
next prev parent reply other threads:[~2005-12-02 7:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-01 11:08 Novice question: my add-hook binding for c-mode doesnt work :( Kpoxman (sent by Nabble.com)
2005-12-02 6:52 ` Xavier Maillard
2005-12-02 7:07 ` Henrik Enberg [this message]
2005-12-02 9:10 ` Kpoxman (sent by Nabble.com)
[not found] ` <mailman.17607.1133515063.20277.help-gnu-emacs@gnu.org>
2005-12-03 2:07 ` Stefan Monnier
2005-12-03 21:15 ` Alan Mackenzie
2005-12-04 15:48 ` Stefan Monnier
2005-12-04 16:05 ` Matthieu Moy
[not found] <mailman.17480.1133437995.20277.help-gnu-emacs@gnu.org>
2005-12-01 13:45 ` Anselm Helbig
2005-12-01 16:18 ` Thien-Thi Nguyen
2005-12-01 16:56 ` Johan Bockgård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051202070701.B40573F28@rocksteady.printf.se \
--to=henrik.enberg@telia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.