help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: different modes for file with same extension?


From: Luke A. Olbrish
Subject: Re: different modes for file with same extension?
Date: 21 Sep 2002 17:06:20 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

stig <nospam_stigerikson@yahoo.se> 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:

<comment specific to that mode> -*- mode: <mode-name> -*-

for example:

;; -*- mode: emacs-lisp -*-

or

// -*- mode: java -*-

-- 
Luke Olbrish
<luke.olbrish@cc.gatech.edu>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]