From: "Peter Milliken" <peter.milliken@gmail.com>
To: TheLonelyStar <nabble@lonely-star.org>
Cc: Help-gnu-emacs@gnu.org
Subject: Re: Making ELSE know the language by file extension
Date: Fri, 2 May 2008 08:13:20 +1000 [thread overview]
Message-ID: <791153ba0805011513u3abbac2dlbb856e7091a449be@mail.gmail.com> (raw)
In-Reply-To: <16995070.post@talk.nabble.com>
[-- 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 --]
prev parent reply other threads:[~2008-05-01 22:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-01 21:33 Making ELSE know the language by file extension TheLonelyStar
2008-05-01 22:13 ` Peter Milliken [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=791153ba0805011513u3abbac2dlbb856e7091a449be@mail.gmail.com \
--to=peter.milliken@gmail.com \
--cc=Help-gnu-emacs@gnu.org \
--cc=nabble@lonely-star.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.