From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: luke.olbrish@cc.gatech.edu (Luke A. Olbrish) Newsgroups: gmane.emacs.help Subject: Re: different modes for file with same extension? Date: 21 Sep 2002 17:06:20 -0400 Organization: The Valley of the Dead Sender: help-gnu-emacs-admin@gnu.org Message-ID: <7vd6r7giib.fsf@gehennom.net> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1032643581 8435 127.0.0.1 (21 Sep 2002 21:26:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 21 Sep 2002 21:26:21 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17srlb-0002Bn-00 for ; Sat, 21 Sep 2002 23:26:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17srla-0005gv-00; Sat, 21 Sep 2002 17:26:18 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!HSNX.atgi.net!usenet.INS.cwru.edu!news-ext.gatech.edu!news-int.gatech.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: r57h31.res.gatech.edu Original-X-Trace: news-int.gatech.edu 1032642383 24521 128.61.57.31 (21 Sep 2002 21:06:23 GMT) Original-X-Complaints-To: usenet@news-int.gatech.edu Original-NNTP-Posting-Date: Sat, 21 Sep 2002 21:06:23 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-Xref: nntp.stanford.edu gnu.emacs.help:105138 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1692 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1692 stig writes: > is it possible to set up emacs to understand that two files with the same > extension are actually written in two different programming languages? > > perl = .pl > prolog = .pl > > same extensions, but very different code. > > would it be possible, and in that case how? Make your first line in the file like this: -*- mode: -*- for example: ;; -*- mode: emacs-lisp -*- or // -*- mode: java -*- -- Luke Olbrish