From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Colin S. Miller" Newsgroups: gmane.emacs.help Subject: Re: How to enable the Major mode: ttcn-3-mode. Date: Sun, 08 Aug 2010 11:29:33 +0100 Organization: SunSITE.dk - Supporting Open source Message-ID: <4c5e870d$0$285$14726298@news.sunsite.dk> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291856207 29829 80.91.229.12 (9 Dec 2010 00:56:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 00:56:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 01:56:40 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQUoH-0008BB-Tr for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 01:56:38 +0100 Original-Received: from localhost ([127.0.0.1]:52576 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQUoH-0003PI-BK for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 19:56:37 -0500 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!news.net.uni-c.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100328) Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 82 Original-NNTP-Posting-Host: 62.56.60.192 Original-X-Trace: news.sunsite.dk DXC=\4NOMB4nbJRbD]FUj; YcCZYSB=nbEKnk[C:SEdRC9RGW5fdD?L8VmBXOOn[7LY1L_UQScK68eBi5W; QNS\SSPXnW=`B>8HMEIDXXG\>dU List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:76335 Archived-At: 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