[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grid lines in background

From: Alp Aker
Subject: Re: Grid lines in background
Date: Tue, 21 Jun 2011 17:37:13 +0000 (UTC)
User-agent: Loom/3.14 (

Drew Adams <drew.adams <at>> writes:

> Dunno whether this helps, but you might want to take a look at Alp Aker's
> code for column highlighting:


Ironically, I just dropped support for the shading style of fill-column
highlighting.  The older code is still on the page, though, so the OP can
take a look at it.  

If he wants to take a stab at adapting it, I'd recommend a two-part strategy:
use font-lock to put shaded intervals on each line up to the end of the line,
then put a zero-length overlay before the newline character with a
before-string or an after-string that pads out the rest line of with however
many more intervals are necessary to complete that line of the grid.  (You
wouldn't want to use overlays for everything, because that would quash any
background coloration done by font-lock.  If you use font-lock for the first
part, you can arrange for the background shading to take lowest priority wrt
to other fontification.)  You'll have to add some epicycles to the
arrangement if you want to avoid conflicts with whitespace-mode,
hl-line-mode, et similia.

Actually, now that I've thought about it should be pretty easy to implement,
so I might do so when I next have a chance.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]