all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk>
To: help-gnu-emacs@gnu.org
Subject: Re: How to enable the Major mode: ttcn-3-mode.
Date: Sun, 08 Aug 2010 11:29:33 +0100	[thread overview]
Message-ID: <4c5e870d$0$285$14726298@news.sunsite.dk> (raw)
In-Reply-To: <e70560c0-5a3a-4a45-86b5-1b7da3d28545@z34g2000pro.googlegroups.com>

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





  reply	other threads:[~2010-08-08 10:29 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 [this message]
2010-08-08 13:08   ` Hill
     [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='4c5e870d$0$285$14726298@news.sunsite.dk' \
    --to=no-spam-thank-you@csmiller.demon.co.uk \
    --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.