jed-users mailing list

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

Re: Defining a very long list of keywords, define_keywords_n(...) and add_keywords(...)


On Wed, Jun 18, 2003 at 11:07:09AM -0400, John E. Davis wrote:
> Jens.Wulf@xxxxxxxxxxxxxxxx <Jens.Wulf@xxxxxxxxxxxxxxxx> wrote:
> >I'm currently extending my set of assembler-editing modes with a really rich
> >instruction set. The string given to define_keywords_n(...) is too long and
> >so I receive an error.
> 
> How did you specify the string?  Did you use strcat or "+" to build
> the string?  I do not recall adding any limits to the number of
> keywords supported by Jed.

I remember a similar problem with _autoload:

I wrote a mode (make_ini.sl) that scans slang files for public defined
functions and writes autoload statements in an initialization file (ini.sl).
The idea to use _autoload and _add_completion did not work:
a file with 12 global functions triggered a "line len too long" error
when running ini.sl.

Maybe the problem was the too long literal string in ini.sl?

> Jens.Wulf@xxxxxxxxxxxxxxxx <Jens.Wulf@xxxxxxxxxxxxxxxx> wrote:
> 
> add_keywords(...) seemed to be the way out, but jed tells me
> 'S-Lang Error: Undefined Name: add_keywords is undefined'
> 
> What do I do wrong? Is there another possibility to define a long list of
> keywords?

you need an autoload statement before you can use add_keywords:

autoload("add_keywords", "syntax.sl");

will help.

(But try building the keyword string out of line-wide pieces first, it is
faster.)

Günter

-- 
Milde at ife.et.tu-dresden.de

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


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