unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Alp Aker <alp.tekin.aker@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Grid lines in background
Date: Tue, 21 Jun 2011 17:37:13 +0000 (UTC)	[thread overview]
Message-ID: <loom.20110621T193520-778@post.gmane.org> (raw)
In-Reply-To: D2D66858C78D4B628D6D068F781BD38D@us.oracle.com

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

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

> http://www.emacswiki.org/emacs/FillColumnIndicator

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	other threads:[~2011-06-21 17:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 12:44 Grid lines in background William King
2011-06-20 18:27 ` Drew Adams
2011-06-21 17:37   ` Alp Aker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20110621T193520-778@post.gmane.org \
    --to=alp.tekin.aker@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).