Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a built in way in emacs to to suggest what mode it should use? I have lots of properties files that doesn't have a file endings to guide emacs.

Ideally I'd like to be able to put somthing like this in the file header

# Emacs-Mode: <name of mode wanted>
share|improve this question

1 Answer 1

up vote 7 down vote accepted

You mean like this:

-*- mode: outline -*-

There are two methods of doing this. In the first one, Emacs reads the first line of the file, looking for file variables to set. One of them is the mode to use for the file (in this case outline-mode). The line can start with anything, so a comment character can be used.

The page Specifying File Variables gives more information on how to use them.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.