From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: How to associate more than two file-types as C code, code included Date: Tue, 4 Dec 2007 13:59:28 +0100 Message-ID: <4C5BFEF7-5C60-4470-920E-1660C344EA96@Web.DE> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1196773207 10357 80.91.229.12 (4 Dec 2007 13:00:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Dec 2007 13:00:07 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Mike H Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 04 14:00:16 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IzXNm-0003wW-6a for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Dec 2007 14:00:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzXNV-0006vl-Ko for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Dec 2007 07:59:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IzXNH-0006vg-37 for help-gnu-emacs@gnu.org; Tue, 04 Dec 2007 07:59:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IzXNE-0006vU-Mu for help-gnu-emacs@gnu.org; Tue, 04 Dec 2007 07:59:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzXNE-0006vR-HP for help-gnu-emacs@gnu.org; Tue, 04 Dec 2007 07:59:40 -0500 Original-Received: from fmmailgate02.web.de ([217.72.192.227]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IzXND-0000zI-Fw for help-gnu-emacs@gnu.org; Tue, 04 Dec 2007 07:59:39 -0500 Original-Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate02.web.de (Postfix) with ESMTP id 03CDAB672CCE; Tue, 4 Dec 2007 13:59:32 +0100 (CET) Original-Received: from [195.4.207.101] (helo=[192.168.1.2]) by smtp06.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.108 #208) id 1IzXN5-0007ed-00; Tue, 04 Dec 2007 13:59:31 +0100 In-Reply-To: X-Mailer: Apple Mail (2.752.2) X-Sender: Peter_Dyballa@web.de X-Provags-ID: V01U2FsdGVkX19rSlS6u8WSEmb/EAaCB+33PFyuHNGR+FVeB657 kZ1oLXj/fEQC1iS8g7FP8lgURj1qrV+V4g1kkWfCS5b9vG+Yi7 bTUIU3XbtciYkIvSH8ww== X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:49810 Archived-At: Am 03.12.2007 um 23:50 schrieb Mike H: > I want the files .cu and .txx to be recognized as C files.. > One block of the following codes works separately, but when I put them > together.. it doesn't work. > > How should I do it ? > > when ((string-match "\\.cu$" fn) || (string-match "\\.txx$" fn)) I use or instead of the shell construct ||: (if (or (string-match "23.0.50" mEV) (string-match "22." mEV)) ... There is also the variable auto-mode-alist that you can modify like in: (add-to-list 'auto-mode-alist '("\\.drv\\'" . latex-mode)) -- Greetings Pete "A mathematician is a machine that turns coffee into theorems."