jed-users mailing list

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

Re: Proposal for new modes


Dear jedies,

I had to realize, some of my messages to the list did not make it through
(due to a different from-address). This one is actually written Nov. 17.

Günter

On Sun, Nov 16, 2003 at 08:24:27PM +0100, Marko Mahnic wrote:
> 
> I think there should be a rule on where and how to put the new modes / 
> extensions.
> 
> I propose this:
>   * there should be a special directory for modes that are not part of 
> the main distribution, like
>   JED_ROOT/libnew
>   It should be in the default jed-library search path

Something like this is implemented in my home-lib mode
 http://jedmodes.sf.net/mode/home-lib/last/index.php

It calls the site-wide extensions library dir JED_ROOT/site-lib and
initialises (under UNIX) also a per-user library ~/.jed/lib.

From the documentation:

%  * If a subdirectory .jed/ exists in Jed_Home_Directory, 
%    let Jed_Home_Directory point there,
%  * Prepend site-specific and user-specific libraries to the library path,
%  * evaluate (if existent) the file ini.sl in site and home libraries
%    to enable initialization (autoloads etc).
%  * set Color_Scheme_, dfa-cache- and documentation- path
%  
% Together with make-ini.sl, this provides a convenient way of extending
% jed with contributed or home-made scripts.

Try it out, maybe you can support my application of home-lib.sl going to 
jed 99.17.

Having it in the main distribution (even if turned off) will help a lot, as
this one needs to be in the path to be evaluated (or you need to give the
full path in the require() call.)

 
>   * every new set of  files should be in its own directory
>   JED_ROOT/libnew/mymode
> 
>   * evrey set of files should have its 'root' script
>   JED_ROOT/libnew/mymode.sl
>
>   * the user would use the mode with
>   () = eval ("mymode.sl") ;
>   in his .jedrc

My idea of initialization is a bit different. The make-ini script scans the
library for public function definitions and adds autoloads for these to an
ini.sl file (+ byte-compiles them).

The next version of make-ini will also support an 

#<INITIALIZATION>
   % initialization code
#</INITIALIZATION>

section, that will be copied to ini.sl verbatim.

The user woud have to copy the mode to .jed/lib or JED_ROOT/site-lib and run
make_ini() on the directory, thats all. I use the scheme for some years now
and will not miss it again.


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>.


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