[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 12:43:23 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 |
On 2017-05-28 12:28, Eli Zaretskii wrote:
>> Cc: 27103@debbugs.gnu.org
>> From: Clément Pit--Claudel <clement.pitclaudel@live.com>
>> Date: Sat, 27 May 2017 15:52:27 -0400
>>
>> Would the same caveat apply to the creation of a new 'left-fringe text
>> property, such that instead of (concat "A" (propertize "_" 'display
>> '(left-fringe filled-square))) one could write (propertize "A" 'left-fringe
>> 'filled-square)?
>
> I'm not sure I understand why the former uses 'concat', while the
> latter doesn't. So perhaps I'm missing the point, because otherwise
> this looks like just "syntactic sugar", is it?
It uses `concat' because the display spec is replacing. Let me try a better
example :) Consider a buffer with contents like this:
(defun …
…)
(defun …
…)
Suppose I want to highlight each defun with a fringe indicator. With my
proposal, one could use the following font-lock rule:
("^(defun" (0 '(face nil left-fringe right-arrow)))
And the contents of the buffer would look like this:
→ (defun …
…)
→ (defun …
…)
I don't think such a result is currently achievable without overlays (which are
not nearly fast enough for my purposes).
Cheers,
Clément.
signature.asc
Description: OpenPGP digital signature
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Clément Pit--Claudel, 2017/05/27
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Eli Zaretskii, 2017/05/27
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Clément Pit--Claudel, 2017/05/27
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Eli Zaretskii, 2017/05/27
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Clément Pit--Claudel, 2017/05/27
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Eli Zaretskii, 2017/05/28
- bug#27103: Should show-trailing-whitespace highlight specified spaces?,
Clément Pit--Claudel <=
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Eli Zaretskii, 2017/05/28
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Clément Pit--Claudel, 2017/05/28
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Eli Zaretskii, 2017/05/28
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Clément Pit--Claudel, 2017/05/28
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Eli Zaretskii, 2017/05/28
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Clément Pit--Claudel, 2017/05/28
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Eli Zaretskii, 2017/05/28
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Clément Pit--Claudel, 2017/05/28
- bug#27103: Should show-trailing-whitespace highlight specified spaces?, Eli Zaretskii, 2017/05/29