0

This question already has an answer here:

This is kind of a weird question, but I have a file that's a mix of perl, text, and Bourne shell. Is there some (easy) way to have emacs switch major modes at different points in the file?

Perhaps when it sees -*- Text -*- or -*- Perl -*- or something?

Or can I just change it for the region if I narrow-to-region?

Thanks.

-E

I just noticed that there is a tag for "multiple-modes", so I'm hopeful.

marked as duplicate by Drew, Tobias, Stefan, DoMiNeLa10 Apr 2 at 16:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    Please have a look at a google search for “emacs multiple modes” and try out the options that pop up. – Dan Apr 2 at 10:59
  • 1
    You find a reference of mmm-mode with a configuration example in that answer to another question. From my point of view this question is actually a duplicate of that other question. – Tobias Apr 2 at 14:19
  • @Tobias: Agreed - voted to close as dup. It would be good if Someone (TM) edited that question to present the question more generally and to have a title like this one. – Drew Apr 2 at 14:47
  • @Drew Better? I admit I was not very original with the new name;-). – Tobias Apr 2 at 14:56
  • @Tobias: Definitely. Thx. – Drew Apr 2 at 16:29

Browse other questions tagged or ask your own question.