jed-users mailing list

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

Re: Line numbers and Visible Tabs


I think you're underestimating the flexibility of this approach.  You
could do exactly what you want by a function that changes the syntax
colors for space and tab from the special space/tab ones to normal.

Lets say we add two custom colors for "space" and "tab" and set them to
"white"/"darkgrey" and "white"/"charcoal" and your "normal" colors are
"white"/"black"/.  To enable whitespace marking you'd need a function
that does:

% set_color("normal", "white", "black");
set_color("space", "white", "darkgrey");
set_color("tab", "white", "charcoal");

And to disable it you'd need a function that does:

% set_color("normal", "white", "black");
set_color("normal", "white", "black");
set_color("normal", "white", "black");

This is fairly trivial.  (Note that "normal" is just there to show that
we're matching it.)  The only remaining quibble is since the colors are
global this would affect all buffers.  If your real objection is N.I.H.
you'll probably find that a crucial difference however. ;-)

In an interesting side note I found a related "FIXME" in the code:

syntax.c:326:        /* FIXME!!! I need to add a whitespace syntax */

So it looks like John has at least thought of something like this.

On Tue, 30 Sep 2003 01:49:23 +0200 Robert Lillack wrote:
> Tom Culliton wrote:
> 
> > I was thinking more along the lines of trivially adding a couple of
> > whitespace entries (say "space" and "tab") to Color_Name_Map from
> > colors.c using the provided intrinsic function "add_color_object".  
> > Then you could have the syntax modes use them.
> 
> This is exactly the behaviour I would *not* want. I like
> switching "visible spaces" on and off whenever I want,
> regardless of the mode.
> 
> Regards,
> Rob.
> -- 
> r o b e r t | l i l l a c k
> www.lillaxsitedesign.de/rob
> secure mail key: 0xE7FFDF77
> 
> --------------------------
> To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
> the word "unsubscribe" in the message body.
> Need help? Email <jed-users-owner@xxxxxxxxxxx>.

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