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

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

Re: Trace Format files on AIX


From: Robert Thorpe
Subject: Re: Trace Format files on AIX
Date: 27 Nov 2006 10:26:39 -0800
User-agent: G2/1.0

Perry Smith wrote:
> Two questions, first the easy one:
>
> Does anyone have a 'font-lock-mode' for the trace format files that
> AIX uses?
>
> Assuming the answer to that is no... Where should I start?

Probably with C-h f generic-mode.

You could also base a mode of a simple one in emacs.
Or maybe this one:-
http://groups.google.com/group/comp.emacs/msg/3c8a54187d038191?dmode=source

> I would like two basic things when I edit a trace format file.  One
> would be to highlight and color various parts of the file like C mode
> does in font-lock-mode.

That's quite easy with Generic mode.

> But more importantly is a syntax check.  I
> have a package called nxml that does this for xml things.

That is not so easy.  Syntax highlighting is done using regexp, this
makes it simple and fast, but not foolproof (except in the case of
something like lisp).  Syntax checking needs to be foolproof, so it
needs parsing.  You could write a simple parser in Emacs.

Or, you could make some regexp that find common mistakes and highlight
them.
See cwarn.el in Emacs for an example of that.

>  I'm not
> sure if the two concepts are connected or not (I think not actually).

They are.  Syntax highlight could be done by parsing in Emacs, but it
isn't.
It is in some Emacs add-on packages.



reply via email to

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