[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how can I add a file extension to a font lock mode
From: |
tomas |
Subject: |
Re: how can I add a file extension to a font lock mode |
Date: |
Fri, 24 Jul 2009 10:57:23 +0200 |
User-agent: |
Mutt/1.5.15+20070412 (2007-04-11) |
-----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-----