From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anselm Helbig Newsgroups: gmane.emacs.help Subject: Re: Novice question: my add-hook binding for c-mode doesnt work :( Date: Thu, 01 Dec 2005 14:45:47 +0100 Organization: Freie Universitaet Berlin Message-ID: <87br0153sk.wl@nospam.anselm.chemie.fu-berlin.de> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1133449685 16775 80.91.229.2 (1 Dec 2005 15:08:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 1 Dec 2005 15:08:05 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 01 16:07:53 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ehq0X-00077U-9Q for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Dec 2005 16:06:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ehq0V-0007Qw-Iv for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Dec 2005 10:05:59 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Original-X-Trace: news.uni-berlin.de cBubrXCcUYWWyZHkUuMriweEPaNH5NwyuU44x6EhrqvIbkVjGKxneNxfW5 X-Orig-Path: azrael.lygophilia.de!news In-Reply-To: Mail-Followup-To: anselm@chemie.fu-berlin.de User-Agent: Wanderlust/2.11.30 (Wonderwall) Emacs/21.4 Mule/5.0 (SAKAKI) X-Antipastobozoticataclysm: When George Bush projectile vomits antipasto on the Japanese. Original-Xref: shelby.stanford.edu gnu.emacs.help:135963 Original-To: help-gnu-emacs@gnu.org 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:31570 Archived-At: At Thu, 1 Dec 2005 03:08:14 -0800 (PST), "Kpoxman (sent by Nabble.com)" wrote: > The code from .emacs: > > (add-hook 'c-mode-common-hook > '(lambda () (define-key c-mode-map (kbd "M-o") 'kpox-switch-h-cpp)) > ) remove the quote before the lambda expression. you want the lambda expression to be evaluated, because it returns an anonymous function. regards, anselm