Hi Nathan, ELSE (currently) works out the name of the template to load using the major mode name - in versions of Emacs prior to 21.1 this worked perfectly because C and C++ files had a major mode name of "C" and "C++" respectively. So ELSE would calculate a template name of C.lse and C++.lse respectively - the names of the language templates you would have downloaded. Emacs 21.1 (or perhaps the c-mode changes did this?) changed the major mode name displayed to be C/l and C++/l (I have no idea what the "l" is - another language also uses the C major mode????) respectively - so ELSE's current naming rules were broken. I have produced a new version of ELSE that allows a customisable variable to be set by the user so that such major mode names can be "translated" i.e. "C/l" => "C" "C++/l" => "C++" and then ELSE can find the correct template file. I just haven't put the new version of ELSE on my web-site yet (I can't access it from work due to firewall restrictions and I never seem to remember to do it from home - too many things happening there :-)). I'll email you the latest version directly and hopefully this weekend get my web-site updated as well. Or you can apply directly to me at peterm@resmed.com.au. Regards Peter On Fri, May 2, 2008 at 7:33 AM, TheLonelyStar wrote: > > Hi, > > I have installed ELSE, and added this to my .emacs: > (require 'else-mode) > (add-hook 'c-mode-common-hook > (lambda () > ;; this is shown as a lambda so you can add further interesting > ;; minor mode definitions here. > (else-mode))) > > Now, if I open "test.cpp" else asks me fo the language type (and I say > C++). > Can't else now the language somehow automaticly? > > Thanks! > Nathan > -- > View this message in context: > http://www.nabble.com/Making-ELSE-know-the-language-by-file-extension-tp16995070p16995070.html > Sent from the Emacs - Help mailing list archive at Nabble.com. > > > >