bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#27103: Should show-trailing-whitespace highlight specified spaces?


From: Clément Pit--Claudel
Subject: bug#27103: Should show-trailing-whitespace highlight specified spaces?
Date: Sun, 28 May 2017 16:18:02 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

On 2017-05-28 15:51, Eli Zaretskii wrote:
>> Cc: 27103@debbugs.gnu.org
>> From: Clément Pit--Claudel <clement.pitclaudel@live.com>
>> Date: Sun, 28 May 2017 15:43:52 -0400
>>
>>> Maybe we could extend the line-prefix property to support left-fringe
>>> and right-fringe specs.
>>
>> Hey, it works!
>>
>>   (insert (propertize "AA" 'line-prefix (propertize "_" 'display 
>> '(left-fringe right-arrow))))
> 
> That's not what I meant, but if you are happy, it's fine with me.

I didn't realize that this was possible. It fits my use case very nicely :) In 
the (defun example, I can just put the line-prefix property on the defun, and 
everything works perfectly.

I wonder if we should mention this in the manual. Maybe in the "display specs" 
section, where (fringe …) is described, we could add this:

  `left-fringe' and `right-fringe' are replacing specs: the span of text that 
they apply to is made invisible.  To add a fringe to a line without hiding any 
of its contents, put the fringe property on the before-string of an overlay or 
on the line-prefix of your text.

>> Anything bad with this?
> 
> It's just a display property.  Nothing wrong with that, of course.

Thanks!


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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