I use a template engine for a lot of files in my project. The specific one is irrelevant -- let's say all my template files end with
Now, I've got many different kinds of templated files, like
By default, Emacs doesn't know about my template engine, so they all open in fundamental-mode. I could manually add each templated filetype to my .emacs file (
.html.template, etc), but that's tedious, and I'll have to update it whenever anybody finds a new filetype that's useful to template.
Is there an easy way to tell Emacs' major-mode-selection functionality that
.template is special, and that any file that looks like
foo.ext.template should be opened as if it were called