all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Dyballa <Peter_Dyballa@Web.DE>
To: Mike H <hspnew@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How to associate more than two file-types as C code, code included
Date: Tue, 4 Dec 2007 13:59:28 +0100	[thread overview]
Message-ID: <4C5BFEF7-5C60-4470-920E-1660C344EA96@Web.DE> (raw)
In-Reply-To: <c05308e4-16cc-41fd-960e-c9055cc63ea0@x69g2000hsx.googlegroups.com>


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."

  parent reply	other threads:[~2007-12-04 12:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-03 22:50 How to associate more than two file-types as C code, code included Mike H
2007-12-03 23:56 ` Lennart Borgman (gmail)
2007-12-04 12:59 ` Peter Dyballa [this message]
     [not found] ` <mailman.4464.1196726225.18990.help-gnu-emacs@gnu.org>
2007-12-04 17:27   ` Mike H
     [not found] ` <mailman.4488.1196773183.18990.help-gnu-emacs@gnu.org>
2007-12-04 17:27   ` Mike H

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C5BFEF7-5C60-4470-920E-1660C344EA96@Web.DE \
    --to=peter_dyballa@web.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=hspnew@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.