all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Making ELSE know the language by file extension
@ 2008-05-01 21:33 TheLonelyStar
  2008-05-01 22:13 ` Peter Milliken
  0 siblings, 1 reply; 2+ messages in thread
From: TheLonelyStar @ 2008-05-01 21:33 UTC (permalink / raw)
  To: Help-gnu-emacs


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.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Making ELSE know the language by file extension
  2008-05-01 21:33 Making ELSE know the language by file extension TheLonelyStar
@ 2008-05-01 22:13 ` Peter Milliken
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Milliken @ 2008-05-01 22:13 UTC (permalink / raw)
  To: TheLonelyStar; +Cc: Help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1979 bytes --]

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 <nabble@lonely-star.org>
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.
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 2764 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-01 22:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-01 21:33 Making ELSE know the language by file extension TheLonelyStar
2008-05-01 22:13 ` Peter Milliken

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.