emacs-devel
[Top][All Lists]
Advanced

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

Overlay behavior change


From: Gregory Heytings
Subject: Overlay behavior change
Date: Wed, 8 Jul 2020 10:14:25 +0200 (CEST)
User-agent: Alpine 2.21 (NEB 202 2017-01-01)


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?

Gregory



reply via email to

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