jed-users mailing list

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

Re: __FILE__ and path_rel


On Tue, 21 Jan 2003 22:27:23 +0100 wrote Klaus Schmid <klaus.schmid@xxxxxx>:

> Since 0.99.16 Jed has implemented a variable __FILE__, which I think
> is very useful, but probably not very well known.

Thank you for the hint.

 
> Additionally I defined in my jed.rc a new function, which is similar
> to path_concat:
... 
 
If I see it right, path_rel(b, r) does a subset of
expand_filename(path_concat(b, r)), as long as b is an absolute pathname
(starts with "/"). (otherwise the pwd is prepended.)

However, the examples should work with standard commands as well 

>  Color_Scheme_Path+= ","+path_rel( __FILE__, "../colors");

   Color_Scheme_Path+= "," + path_concat(path_dirname(__FILE__), "colors");

>  variable hsjmode_dir= path_rel( __FILE__, "../hsjmode/");

   variable hsjmode_dir= path_concat(path_dirname(__FILE__), "/hsjmode/");



>         provide(__FILE__);

is a nice trick indeed. (I recommend to put it at the end of the mode, so it
will only be executed if the rest has loaded successfully.)

> With these constructions I think implementing and trying different
> modes and scripts gets even more easier.
> 
> And maybe more people will actually try new modes and other Jed
> enhancements, leading to even more enhancements. :)

May your words come true...

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]