jed-users mailing list

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

Re: make_ini and autoload [was: Re: rst mode with tokenlist navigator]


John E. Davis wrote:

I think that a cleaner approach would be to use array_map:

array_map (Void_Type, &autoload, ["buffer_compress", "spaces2tab", "format_table",
	       "goto_max_column", "format_table_rect"],
	      "M:\\jed\\libjmr\\csvutils.sl");

--John

It took me 5 minutes to understand the above ;)
At least now I know about array_map.

It is OK to add such constructs to ini.sl since it is automatically
generated. But to use it for autoloading multiple macros in a
manually managed file is IMO not such a good idea since a casual
SLang programmer will have difficulties understandnig what it
does.

I think the above is also slower than
  ...
  loop(5) { file; autoload(); }

and I don't see an easy way to make autoloads() with array_map.

Could autoload() be modified to accept multiple macros?

Marko

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


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