[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to enable the Major mode: ttcn-3-mode.
From: |
Colin S. Miller |
Subject: |
Re: How to enable the Major mode: ttcn-3-mode. |
Date: |
Wed, 08 Dec 2010 15:23:45 -0000 |
User-agent: |
Mozilla-Thunderbird 2.0.0.24 (X11/20100328) |
Hill,
<snip!>
> Thanks Colin S. Miler very much!
Just "Colin" will do ;-}
> I have turn on the font-lock at the beginning of the .emacs:
>
> (global-font-lock-mode t)
Ok, that should turn font locking for all (major) modes
with a syntax table.
> I try it again, after comment the line:
> ;;(setq auto-mode-alist (cons '("\\.ttcn3?" . ttcn-3-mode) auto-mode-
> alist))
With the semi-colons? ';' is called a semicolon.
Everything after a semicolon to the end of the line is a comment.
Emacs will ignore the comments.
I'd use
(add-to-list 'auto-mode-alist '("\\.ttcn3?" . ttcn-3-mode) 't)
to add to the list of modes. However I don't think it makes
any difference.
> 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?
In ttcn3.el, the
(require 'foo)
lines will check if "foo" is already loaded by examining the
variable "features".
You can use
C-h v features
to get a list of the loaded features.
If "foo" is not in "features", then (load-library '"foo")
will be called. This will search the paths defined in
the variable "load-path", for foo.elc or foo.el.
.elc is "Emacs Lisp, Compiled", and .el is "Emacs Lisp" (source).
You can use (add-path '"/some/path") to modify the path list.
Finally, the foo.el should do (provide 'foo) to confirm to Emacs
that it has initialised correctly.
Could you copy in a buffer the requires from ttcn3.el
(require 'cc-mode) ; ttcn-3-mode inherits from cc-mode
(require 'cc-langs) ; e.g. c-make-inherited-keymap
(require 'compile) ; and this for compile-interal,
(require 'easymenu) ; and uses easymenu,
(require 'font-lock) ; font-lock,
(require 'imenu) ; and imenu
select them, and then press
M-x eval-region
Is an error reported?
After this, what is the value of "features" ?
HTH,
Colin S. Miller
--
Replace the obvious in my email address with the first three letters of the
hostname to reply.