From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.help Subject: Re: add-hook Date: Sat, 04 Jun 2011 17:11:42 +0300 Message-ID: <87y61h4rfl.fsf@mithlond.arda> References: <87pqmtbvk1.fsf@father.nostromo.wy> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1307196826 1923 80.91.229.12 (4 Jun 2011 14:13:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Jun 2011 14:13:46 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "daniele g." Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 04 16:13:42 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QSrbi-0007dR-8L for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Jun 2011 16:13:42 +0200 Original-Received: from localhost ([::1]:50282 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSrbg-0006CU-O9 for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Jun 2011 10:13:40 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:51431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSrZz-0006C2-57 for help-gnu-emacs@gnu.org; Sat, 04 Jun 2011 10:11:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSrZx-0005TL-Gf for help-gnu-emacs@gnu.org; Sat, 04 Jun 2011 10:11:54 -0400 Original-Received: from mta-out.inet.fi ([195.156.147.13]:39117 helo=jenni1.inet.fi) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSrZx-0005SN-46 for help-gnu-emacs@gnu.org; Sat, 04 Jun 2011 10:11:53 -0400 Original-Received: from mithlond.arda (84.251.132.215) by jenni1.inet.fi (8.5.133) id 4DC043D30168B5BC; Sat, 4 Jun 2011 17:11:43 +0300 Original-Received: from dtw by mithlond.arda with local (Exim 4.72) (envelope-from ) id 1QSrZm-0001Jb-2W; Sat, 04 Jun 2011 17:11:42 +0300 In-Reply-To: <87pqmtbvk1.fsf@father.nostromo.wy> (daniele g.'s message of "Sat, 04 Jun 2011 15:00:46 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 195.156.147.13 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81291 Archived-At: * 2011-06-04T15:00:46+02:00 * daniele g. wrote: > Is that syntax correct? > > > (add-hook 'c-mode-common-hook > '(lambda () > 'hs-minor-mode > 'linum-mode > (local-set-key [(control return)] > 'semantic-ia-complete-symbol-menu))) It is correct Emacs Lisp syntax but most likely the behaviour is not what you want. I believe you want this: (add-hook 'c-mode-common-hook (lambda () (hs-minor-mode 1) (linum-mode 1) (local-set-key [(control return)] 'semantic-ia-complete-symbol-menu)))