From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.help Subject: Re: how can I add a file extension to a font lock mode Date: Fri, 24 Jul 2009 10:57:23 +0200 Message-ID: <20090724085723.GA8594@tomas> References: <3b9893450907231736h72eb17dfy88a8d30fd93c3ba4@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1248425698 31896 80.91.229.12 (24 Jul 2009 08:54:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jul 2009 08:54:58 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: n179911 Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 24 10:54:51 2009 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 1MUGYD-0002lA-HX for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Jul 2009 10:54:50 +0200 Original-Received: from localhost ([127.0.0.1]:41118 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MUGYD-0005uZ-2t for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Jul 2009 04:54:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MUGVM-0003a4-CG for help-gnu-emacs@gnu.org; Fri, 24 Jul 2009 04:51:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MUGVH-0003Xx-7z for help-gnu-emacs@gnu.org; Fri, 24 Jul 2009 04:51:51 -0400 Original-Received: from [199.232.76.173] (port=53415 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MUGVH-0003Xm-1h for help-gnu-emacs@gnu.org; Fri, 24 Jul 2009 04:51:47 -0400 Original-Received: from alextrapp1.equinoxe.de ([217.22.192.104]:40898 helo=www.elogos.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MUGVG-0006iV-5T for help-gnu-emacs@gnu.org; Fri, 24 Jul 2009 04:51:46 -0400 Original-Received: by www.elogos.de (Postfix, from userid 1000) id 1574890003; Fri, 24 Jul 2009 10:57:23 +0200 (CEST) Content-Disposition: inline In-Reply-To: <3b9893450907231736h72eb17dfy88a8d30fd93c3ba4@mail.gmail.com> User-Agent: Mutt/1.5.15+20070412 (2007-04-11) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:66371 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, Jul 23, 2009 at 05:36:19PM -0700, n179911 wrote: > Hi, >=20 > 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=C3=A1s -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFKaXdzBcgs9XrR2kYRAmp7AJ4yvNB5uPdlv3NPyIpevR75KZAUfQCdEr7b qYBPDQm/UFtN11XrVa2Z7Xo=3D =3DpuU+ -----END PGP SIGNATURE-----