From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dgiglio@iol.it (daniele.g) Newsgroups: gmane.emacs.help Subject: Re: Hooks and c/c++-mode Date: Wed, 11 May 2011 09:41:33 +0200 Message-ID: <877h9xbs5u.fsf@father.nostromo.wy> References: <87k4dyp1gj.fsf@father.nostromo.wy> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1305109510 15360 80.91.229.12 (11 May 2011 10:25:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 11 May 2011 10:25:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 11 12:25:07 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 1QK6bK-0000he-Jj for geh-help-gnu-emacs@m.gmane.org; Wed, 11 May 2011 12:25:06 +0200 Original-Received: from localhost ([::1]:42733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK6bJ-0003Wz-4x for geh-help-gnu-emacs@m.gmane.org; Wed, 11 May 2011 06:25:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:45907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK6bB-0003WQ-TD for help-gnu-emacs@gnu.org; Wed, 11 May 2011 06:24:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QK6bB-00022d-6R for help-gnu-emacs@gnu.org; Wed, 11 May 2011 06:24:57 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:57536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK6bB-00022T-0c for help-gnu-emacs@gnu.org; Wed, 11 May 2011 06:24:57 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QK6b9-0000cF-2p for help-gnu-emacs@gnu.org; Wed, 11 May 2011 12:24:55 +0200 Original-Received: from 151.54.40.92 ([151.54.40.92]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 May 2011 12:24:55 +0200 Original-Received: from dgiglio by 151.54.40.92 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 May 2011 12:24:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 20 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 151.54.40.92 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUHAwEzEQ8vLy85IwpP BwVwAgBRKwZXV1dsRhGMBQCxBwGkLwSiWRLYHwvsYiLoiS7i6+iSAAAAEHRSTlP//5z/////AP// //////8AWdD7oAAAAAFiS0dEDxi6ANkAAAAJcEhZcwAAAEgAAABIAEbJaz4AAAEVSURBVDjL7dEh T8NAFAfwG02nWcM891JyFotsaT2Qe+LGBJ/hTCVN+AqcuPmZJcMQ1MzwhAlcE7ZPMCrnCG2g9K7r 0BP81SU/8d67P0nMbOonSXbkH/4EJltBQhHWAkB7vYMWkDTmfQxgC6CvHrvIz6EB0sfhnfOEvBpT AcQ4nHdeZjpsAI31Q0ryd81tkBQHq5QsMsXBhiM1yEvQ6DEDJLh6sjoli/VEhWAAHLt6mpeg9aUJ krpiurwph4uL74V/ZsCJHi3Tzus6UyGzhvsFzJ3PbKzAggSEGD07H2O8stctv0q8OTMVNS8vLry+ 72IUVGXVv+sjniH32hqMYn7osS0oKgy8ulsD5I7OG9kruN3LrX7zBVQ6Au7pbqYDAAAAGHRFWHRj b21tZW50AFRlcnJvcl9iYWRnZS5wbmcqbG73AAAAAElFTkSuQmCC User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:eqg2c3vOakeg0dkajlNoWRdhbr8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:80963 Archived-At: "Edward O'Connor" writes: >> Is there a smart way to set a hook for several modes at once? Maybe >> using a regex or similar. >> >> For example: >> >> --8<---------------cut here---------------start------------->8--- >> (add-hook '{c|c++}-mode-hook >>          '(lambda () >>             'do-something ))) >> --8<---------------cut here---------------end--------------->8--- > > `C-mode-common-hook' is your friend. :) Thanks to both. -- Oh, noi siamo noi, signore. Anche loro sono noi. Cosi', sia noi che loro siamo noi. -- Data a Picard e Riker, "Ricordare Parigi" (TNG)