From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xavier Maillard Newsgroups: gmane.emacs.help Subject: Re: Novice question: my add-hook binding for c-mode doesnt work :( Date: Fri, 02 Dec 2005 07:52:03 +0100 Message-ID: <8764q8yorw.fsf@totoz.gnu-rox.org> References: <1732372.post@talk.nabble.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1133506687 6313 80.91.229.2 (2 Dec 2005 06:58:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Dec 2005 06:58:07 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 02 07:57:59 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ei4qS-0003op-Pq for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Dec 2005 07:56:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ei4qQ-0005UA-SA for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Dec 2005 01:56:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ei4o1-0005Rj-RV for help-gnu-emacs@gnu.org; Fri, 02 Dec 2005 01:54:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ei4ny-0005Oy-MU for Help-gnu-emacs@gnu.org; Fri, 02 Dec 2005 01:54:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ei4ny-0005OJ-13 for Help-gnu-emacs@gnu.org; Fri, 02 Dec 2005 01:54:02 -0500 Original-Received: from [213.41.184.169] (helo=smtp.gnu-rox.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ei4nx-0001iJ-W6 for Help-gnu-emacs@gnu.org; Fri, 02 Dec 2005 01:54:02 -0500 Original-Received: from localhost.localdomain (unknown [10.0.0.7]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gnu-rox.org (Postfix) with ESMTP id 0E2D68BBF6; Fri, 2 Dec 2005 07:56:31 +0100 (CET) Original-Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by localhost.localdomain with esmtp (Exim 4.54) id 1Ei4m3-0002WN-Qx; Fri, 02 Dec 2005 07:52:03 +0100 Original-To: "Kpoxman (sent by Nabble.com)" In-Reply-To: <1732372.post@talk.nabble.com> (lists@nabble.com) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:31603 Archived-At: "Kpoxman (sent by 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.