jed-users mailing list

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

Re: [Jed-users-l] Feature requests (again)


Hi,

> Manfred Hanke wrote:
>> With the following, you probably get almost what you want:
>>    set_column_colors(30, 80, 80);
>>    set_color_object (30, "black", "lightgray");
>> -- unless "lightgray" coincides with your default background... ;-)

Peter Bengtsson wrote:
> Works great for text files but not in Python mode.
> Any idea how to override the Python mode with your trick?

For me, it does. I don't think set_column_colors is related to a mode. 
However, it may depend on where you put the command. The best place is 
again a mode hook which gets called when the mode is activated, i.e.:

define python_mode_hook()
{
   set_column_colors(30, 80, SCREEN_WIDTH);
}

> Also, is it possible to make it so that all characters after column 80
> get that different colour?

Yes, that's just the third argument of set_column_colors. I just wanted 
to suggest to set it to `1<<31 - 1', a pretty large number, when I 
discovered the SCREEN_WIDTH variable in the documentation (Thanks John, 
well done!) of set_column_colors... ;-)

You can also add more colors, like
   set_column_colors(30, 80, 80);
   set_column_colors(31, 81, SCREEN_WIDTH);

Cheers,

Manfred


> set_column_colors: intrinsic function
>
>  SYNOPSIS
>   Associate a color with columns `c0' through `c1'
>
>  USAGE
>   Void set_column_colors (Integer color, Integer c0, Integer c1)
>
>  DESCRIPTION
>   This function associates a color with columns `c0' through `c1' in the
>   current buffer.  That is, if there is no syntax highlighting already
>   defined for the current buffer, when the current buffer is displayed,
>   columns `c0' through `c1' will be displayed with the attributes of the
>   `color' object.  The parameters `c0' and `c1' are restricted to the range
>   1 through `SCREEN_WIDTH'.  Use the function `set_color_object' to assign
>   attributes to the `color' object.
>
>  SEE ALSO
>   set_color_object
_______________________________________________
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]