jed-users mailing list

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

Re: [Jed-users-l] diffmode, custom_color and custom_variable


Hi,

I hope it's not too annoying for the majority if I continue to discuss 
this question via the mailing list... (The reason why I didn't answer to 
Günter directly so far is that I was and still am confused about how to 
configure these special jed-features, as maybe some of you are, too.)

> On  8.01.11, Manfred Hanke wrote:
>> However, I don't see how the following works for you:
>>> I have in my jed.rc:
>> [...]
>>> set_color("diff_block", "black", "lightgray");       % @@
>>> set_color("diff_white", "black", "lightgray");
>
>> If I use a mere `set_color', diffmode.sl will still override it.

Günter Milde wrote:
> Did you try this?

Sure. If I use the following in my ~/.jedrc (or $JED_CONF_DIR/jed.conf):
> autoload("diff_mode", "diffmode.sl");
> set_color("diff_cmd",      "yellow",     "black");  % diff
> set_color("diff_oldfile", "brightred",   "black");  % ---
> set_color("diff_newfile", "brightgreen", "black");  % +++
> set_color("diff_block",   "lightgray",   "black");  % @@
> set_color("diff_deleted", "red",         "black");  % -
> set_color("diff_added",   "green",       "black");  % +
> set_color("diff_junk",    "magenta",     "black");  % Only / Binary
> _add_completion("diff_mode", 1);
> variable Diff_Use_Tree = 0;
then
> vmessage("%d", color_number("diff_newfile"));
reports
* -1
   if run before calling `diff_mode'
   (which is why `custom_color' in diffmode.sl will use its fallback),
and
* 66
   only after calling `diff_mode'
   (because then `add_color_object' has been called by `custom_color')

> While I don't see a return value either, I see the use of it only in
> the S-Lang library, as similar to custom_color(), it provides a
> fallback definition.

I'm really sorry if I created some confusion here! From my experience 
described above, I came to the conclusion that -- as I have to call 
add_color followed by set_color -- custom_color was made for me, and 
that the statement in the documentation was probably a mistake...
I appologize, this thought was quite arrogant! ;-)

Cheers,

Manfred, running `Jed pre0.99.20-35U' on `Linux 2.6.35-24-generic 
#42-Ubuntu SMP Thu Dec 2 01:41:57 UTC 2010 i686 GNU/Linux' by the way
_______________________________________________
Jed-users-l mailing list
Jed-users-l@xxxxxxxx
http://mailman.jtan.com/mailman/listinfo/jed-users-l


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