[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overlay behavior change
From: |
Eli Zaretskii |
Subject: |
Re: Overlay behavior change |
Date: |
Wed, 08 Jul 2020 11:48:36 +0300 |
User-agent: |
K-9 Mail for Android |
On July 8, 2020 11:14:25 AM GMT+03:00, "Gregory Heytings via Emacs development
discussions." <emacs-devel@gnu.org> wrote:
>
> Hi,
>
> Since at least Emacs 21, overlays between two buffer positions, when
> these
> two positions are on different lines, extend to the right border of
> the
> window. In Emacs 28.0.50 this is not the case anymore, overlays
> extend
> only one character position after the last character of the line.
> Sample
> code (put the cursor on, say, 'lambda' and press C-t):
>
> (global-set-key
> (kbd "C-t")
> (function
> (lambda ()
> (interactive)
> (let* ((start (point))
> (end (progn (save-excursion (forward-line 5) (point))))
> (o (make-overlay start end)))
> (overlay-put o 'face '(:background "green"))))))
>
> Is this change intentional? It does not seem to be documented in the
> NEWS, and I did not find it in the ChangeLogs either (but perhaps I
> did
> not look carefully enough). How can one get the previous default
> behavior?
Yes, this is an intentional change: faces are no longer by default extended to
end of line. If you really need that, use the ':extend' attribute of the face.
This is in NEWS for Emacs 27, I guess you just didn't know which keyword to
look for.