emacs-devel
[Top][All Lists]
Advanced

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

colorizing empty space


From: Ted Zlatanov
Subject: colorizing empty space
Date: Thu, 16 Dec 2010 13:13:57 -0600
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Say you have a buffer with this text (showing newlines as \n)

Hello\n
there\n
everyone\n

and you want to colorize the text background.  You'd end up with a
ragged appearance on the right, because the text ends at the newlines,
or (if you choose to colorize the newlines) the background would extend
to the right margin of the buffer, which looks awful when rendering
readable text in very wide buffers.

I wonder if there's a way to give all the lines max(paragraph lines)+1
width using "visual" space, so at least one "visual" space is added on
the right (shown with x):

Helloxxxx\n
therexxxx\n
everyonex\n

which can then be colorized with the proper background.  I'd like this
to happen without actually modifying the text (so if copied it will
retain the original content), so I was wondering if font-lock or some
other Emacs wizardry could be used to create this "visual" space effect.

Thanks
Ted




reply via email to

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