jed-users mailing list

[2004 Date Index] [2004 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

shmode - how does it recognize to enter it?


I have created an EDI mode. It's a very simplistic mode that simply
highlights delimiters and also includes two macros (edi_to_readable and
readable_to_edi)... the reason being is an EDI file looks like:

ISA*field1*field2~RECORD2*field1*field2~etc...

In a real EDI file, all records are on 1 line, and only 1 line. When
dealing with files over a hundred bytes or so it gets very hard to tell
whats going on, so, edi_to_readable simple searches for ~ and inserts a
\n after it. readable_to_edi does the oppisite.

Anyway, EDI files have no particular extension. Some people use .dat,
others .txt, while others still have no extension. I noticed that the
shmode must recognize the presence of #!/bin/sh on the first line.

How can I make my edi mode recognize say ISA* on the first line? If it's
a _jed_set_mode_hook then I can probably figure it out, but I did not
know if that was the proper way to accomplish the task or not.

Thanks,

----
jeremy <jc@xxxxxxxxxx>

Yesterday it was evil, today it's OK, tomorrow it's praised

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2004 date index] [2004 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]