- Subject: Re: [Jed-users-l] Feature requests (again)
- From: Peter Bengtsson <mail@xxxxxxxxxxx>
- Date: Thu, 6 Jan 2011 18:55:01 +0100
On 6 January 2011 18:47, Manfred Hanke
<Manfred.Hanke@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> 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);
> }
>
I tried that but then all other syntax colouring disappeared. Now all
text is white but the trick works.
>> 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);
>
Yup, that works (apart from the fact that the Python colours have now
disappeared)
> 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
>
--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
fun crosstips.org
_______________________________________________
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]