unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: tomas@tuxteam.de
To: n179911 <n179911@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: how can I add a file extension to a font lock mode
Date: Fri, 24 Jul 2009 10:57:23 +0200	[thread overview]
Message-ID: <20090724085723.GA8594@tomas> (raw)
In-Reply-To: <3b9893450907231736h72eb17dfy88a8d30fd93c3ba4@mail.gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Jul 23, 2009 at 05:36:19PM -0700, n179911 wrote:
> Hi,
> 
> Can you please tell me how can I add file extension '*.mm' to use
> c/c++ font lock mode?

There is a variable auto-mode-alist which associates file name patterns
with modes. You can read about it with C-h v auto-mode-alist[RET]
(that is: control-h, then "v" -- you are then queried for a var name in
the minbuffer; enter "auto-mode-alist").

To set it from your start-up file, you may use this code there:

  (add-to-list 'auto-mode-alist '("\\.mm\\'" . c++-mode))

HTH
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFKaXdzBcgs9XrR2kYRAmp7AJ4yvNB5uPdlv3NPyIpevR75KZAUfQCdEr7b
qYBPDQm/UFtN11XrVa2Z7Xo=
=puU+
-----END PGP SIGNATURE-----




  reply	other threads:[~2009-07-24  8:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-24  0:36 how can I add a file extension to a font lock mode n179911
2009-07-24  8:57 ` tomas [this message]
     [not found] <mailman.3063.1248395789.2239.help-gnu-emacs@gnu.org>
2009-07-24  1:11 ` Xah Lee

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20090724085723.GA8594@tomas \
    --to=tomas@tuxteam.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=n179911@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).