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


On  8.01.11, Manfred Hanke wrote:
> Günter Milde wrote:
> > I recommend to use autoload() instead of require() whenever possible,

> Thanks for your advice -- and, by the way, for maintaining jedmodes!

> I thought before that I have to load diffmode.sl already at startup in 
> order to customize the colors and disable the Diff_Use_Tree feature 
> (just as you do), but see now how clever the custom_{variable,color} 
> functions are: Even if diffmode.sl is loaded /after/ I set my 
> definitions, these values will be kept and not overwritten.

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

Did you try this? 

> But I've just learned that using `custom_color' instead will do the job.

The idea is that *you* use set_color() while diffmode.sl will provide
a fallback with custom_color().

> And another comment for John: I think the last two paragraphs of the 
> documentation of `custom_variable' are wrong. The function does not have 
> a return value, and as I take it now, users *are* encouraged to use 
> it... ;-)

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.

Günter
_______________________________________________
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]