Entry tags:
Dear Lazyweb
Preface: I have a hard time with the documentation of just about every GNU program I've ever tried to read, so never mind the RTFMs. I'm also too busy with actual work to try to dig this up.
Question: What magic line do I put into a .emacs file to tell it that all files of a certain extension should be read in a certain way? I'd like to apply C-mode syntax highlighting to all *.glsl files I open, without having to type `M-X c-mode' each time I open one.
Thank you,
Brian
click
Question: What magic line do I put into a .emacs file to tell it that all files of a certain extension should be read in a certain way? I'd like to apply C-mode syntax highlighting to all *.glsl files I open, without having to type `M-X c-mode' each time I open one.
Thank you,
Brian
click

no subject
Anyway, I don't understand it either, but here's the magical code that makes files ending in '.conf' and '.esp' load in perl-mode by default.
(setq auto-mode-alist (append '( ("\\.conf$" . perl-mode) ("\\.esp$" . perl-mode) ) auto-mode-alist))If you want to do it for all files:
(setq default-major-mode 'perl-mode)
no subject