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: Eli Zaretskii
Subject: bug#27103: Should show-trailing-whitespace highlight specified spaces?
Date: Sun, 28 May 2017 20:44:35 +0300

> Cc: 27103@debbugs.gnu.org
> From: Clément Pit--Claudel <clement.pitclaudel@live.com>
> Date: Sun, 28 May 2017 12:43:23 -0400
> 
> > 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 …
>     …)

But this again asks that the display engine could produce 2 different
display elements out of the same buffer position, which means it would
need to scan that buffer position twice.  Right?

> I don't think such a result is currently achievable without overlays (which 
> are not nearly fast enough for my purposes).

Are overlays really so slow that you are prepared to jump through such
hoops?





reply via email to

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