help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to enable the Major mode: ttcn-3-mode.


From: Hill
Subject: Re: How to enable the Major mode: ttcn-3-mode.
Date: Wed, 08 Dec 2010 15:23:45 -0000
User-agent: G2/1.0

On 8月8日, 下午6时29分, "Colin S. Miller" <no-spam-
thank-...@csmiller.demon.co.uk> wrote:
> Hill wrote:
> > Now I want to use emacs on windows as my editor for TTCN3 programming
> > language.
> > I find one (only) emacs lib after googling the web,
> >http://packages.qa.debian.org/t/ttcn-el.html
> > But It's a deb package that can be used on Ubutnu or debian, so I can
> > not installed it on windows.
> > So I download the source of the package, except some control files to
> > build the deb package, I also find some el files.
>
> > from the 
> > link:http://manpages.ubuntu.com/manpages/karmic/man7/ttcn-el.7.html,
> > I know the package can enable 3 modes: ttcn-3-mode, ttcn-mode and tm-
> > functions.
>
> > Now I am trying to enable the first mode ttcn-3-mode which is
> > corresponding the file: ttcn3.el.
> > I add following cmd to enable it:
>
> > (add-to-list 'load-path "~/emacs_lib/ttcn-el-0.6.9")
> > (require 'ttcn3)
> > (autoload 'ttcn-3-mode "ttcn-3-mode" "TTCN3 editing mode." t)
> > (setq auto-mode-alist (cons '("\\.ttcn3?" . ttcn-3-mode) auto-mode-
> > alist))
>
> > After that I can launch emacs sucessfully. When I open a .ttcn3 file,
> > the mode became TTCN-3, but no highliting. Then I M-x and try to load
> > the mode by typing: ttcn-3-mode, In the minibuffer it indicates me: c-
> > set-style: Buffer aaa.ttcn3 is not a CC Mode buffer (c-set-style).
>
> > I would like to know how to enable the ttcn-3-mode? Thanks any advice.
>
> > The TTCN-3 mode can get from here:
> > svn://svn.debian.org/collab-maint/deb-maint/ttcn-el/tags/0.6.9-1
>
> Hill,
> Kudos on getting so far on your own.
>
> ttcn3-mode is dependant on cc-mode, which is part of c-mode.
> You need to download this as well, although it should be part
> of the standard download.
>
> ttcn3 also needs compile, easymenu, font-lock, and imenu.
> (These are listed in the (require ...) lines at the start of the
> .el)
>
> The buffer's current mode is listed in the status bar, it is at
> the far right and defaults to (Fundamental) or (lisp-interaction)
>
> Did the mode change from to (ttcn3)? If so, the buffer is now in ttcn3-mode.
>
> Most modes do not auto-enable syntax highlighting when they are entered,
> to do this you need to do
>
> M-x font-lock-mode
>
> after loading each file.
>
> To do this automatically, add to your .emacs
>
> (add-hook 'ttcn3-mode-hook '(lambda ()
>                                   (turn-on-font-lock)
>                              ))
>
> Or,
> (add-hook 'ttcn3-mode-hook '(lambda ()
>                                   (turn-on-font-lock)
>                                   (flyspell-prog-mode)
>                              ))
>
> If you want autospell checking in comments and strings in ttc3n-mode
> buffers. However, this needs ispell-mode and one of the external programs
> ispell or aspell. This can be a pain to set up correctly in MS-Windows,
> however, we can help with ispell-mode; just ask in a separate thread.
>
> HTH,
> Colin S. Miller

Thanks Colin S. Miler very much!
I have turn on the font-lock at the beginning of the .emacs:

(global-font-lock-mode t)

I try it again, after comment the line:
;;(setq auto-mode-alist (cons '("\\.ttcn3?" . ttcn-3-mode) auto-mode-
alist))
and Open a a.ttcn file, the mode is still Fundamental.
Using the line, when I open the file a.ttcn, the mode line show the
Major mode is : TTCN-3 without hight-light and indent feature.

Yes, the ttcn3.el need the module --compile, easymenu and others.
Emacs can load the ttcn3.el well, can I think all these dependency is
meet?
Thanks very much!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]