all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hill <zhubicen@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to enable the Major mode: ttcn-3-mode.
Date: Sun, 8 Aug 2010 06:08:19 -0700 (PDT)	[thread overview]
Message-ID: <0f8021ca-52df-4a8f-bdae-6e996f8e3878@l25g2000prn.googlegroups.com> (raw)
In-Reply-To: 4c5e870d$0$285$14726298@news.sunsite.dk

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	other threads:[~2010-08-08 13:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-08  8:05 How to enable the Major mode: ttcn-3-mode Hill
2010-08-08 10:29 ` Colin S. Miller
2010-08-08 13:08   ` Hill [this message]
     [not found]     ` <4c5eb374$0$286$14726298@news.sunsite.dk>
2010-08-08 22:41       ` Hill
2010-08-10 21:13         ` Colin S. Miller
2010-08-12  4:05           ` Hill

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=0f8021ca-52df-4a8f-bdae-6e996f8e3878@l25g2000prn.googlegroups.com \
    --to=zhubicen@gmail.com \
    --cc=help-gnu-emacs@gnu.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.