jed-users mailing list

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

Re: Fixes to "recent" and "tree" modes


Paul Boekholt wrote:
> On Fri, Jan 30, 2004 at 11:42:14AM -0800, Dave Kuhlman wrote:
 
> > In recent.sl, I changed:
> > 
> >     autoload("what_line_if_wide", "bufutils");
> > 
> > to:
> > 
> >     autoload("what_line_if_wide", "sl_utils");

Thanks for the report, it is fixed now.

> Apparently Günter changed his mind about where to put what_line_if_wide.
> The best way to manage the autoloads for Günter's *utils is IMHO to not
> write autoloads in the modes that use them, instead the user should use
> make_ini.sl to make his own autoloads.

Of course, using make_ini (also on jedmodes.sf.net) makes life easier for
the mode developer (as (s)he doesnot need to think about the autoloads. For
modes intended for widespread use, I still prefer the explicit way -> less
dependencies, more transparent. (The backside is, that as I use the make_ini
method myself, I sometimes miss to spot the bugs..)

Optimizing the modes "layout" is tricky. My priorities are:

  - Fast startup  - load only what is needed, other stuff can wait.
  - code recycling - reuse helper functions whenever possible
  - Modularity    - makes the above points easier/possible
  

For the decision what mode a function should belong, there are sometimes
contradictory side-constraints:  
  
  - Keep stuff that belongs together in one file (data-utils, buffer-utils,
    string-utils, ...)
    
  - Backwards compatibility  

  - Let user-interface modes depend on as few as possible other modes:
    sl_utils - most basic functions needed by almost any other mode
    (so, e.g. what_line_if_wide is needed by navigate.sl which
     autoloads a bunch of sl_utils functions but no other one from bufutils)


Günter

-- 
G.Milde at web.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>.


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