all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* different modes for file with same extension?
@ 2002-09-21 20:48 stig
  2002-09-21 21:06 ` Luke A. Olbrish
  0 siblings, 1 reply; 2+ messages in thread
From: stig @ 2002-09-21 20:48 UTC (permalink / raw)


Hello
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?

Stig

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: different modes for file with same extension?
  2002-09-21 20:48 different modes for file with same extension? stig
@ 2002-09-21 21:06 ` Luke A. Olbrish
  0 siblings, 0 replies; 2+ messages in thread
From: Luke A. Olbrish @ 2002-09-21 21:06 UTC (permalink / raw)


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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-21 21:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-21 20:48 different modes for file with same extension? stig
2002-09-21 21:06 ` Luke A. Olbrish

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.