emacs-devel
[Top][All Lists]
Advanced

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

Re: :extend face attribute at EOB without end-of-line char


From: Juanma Barranquero
Subject: Re: :extend face attribute at EOB without end-of-line char
Date: Tue, 15 Oct 2019 10:50:24 +0200

On Tue, Oct 15, 2019 at 10:27 AM Eli Zaretskii <address@hidden> wrote:

> Face extension is only a factor when it ends on the next line,
> i.e. "covers" the newline that ends the line.  When there's no newline
> at EOB, the face ends with the last character on the line, so IMO it
> makes no sense to extend it, because what would such an extension
> indicate?  When there's a newline, extending the face indicates that
> the newline (which is otherwise invisible) is "covered" by the face.

I understand, but again, that's an explanation of how it works. For me, face extension is useful as a way to fill the "empty background" of a line. It is only vaguely related to the idea of text ending in a newline. 

For example, if you open the speedbar and then activate hl-line-mode, the "lines" are highlighted up to the window margin, though speedbar "lines" are not conceptually lines of text, but an outline of some structure (of course they *are* lines of text, implementation-wise). In that case, it happens that the last item in the speedbar ends with a newline, so hl-line-mode works as expected. But if the speedbar were implemented like bs-show is, and the last item had no newline, it would be equally surprising to see the whole "window line" highlighted in all items, and just partially in the last one.

(Note: I'm not arguing for this to be implemented; just trying to explain why I would expect a behavior different of the current one.)

reply via email to

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