all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gregory Heytings via "Emacs development discussions." <emacs-devel@gnu.org>
To: emacs-devel@gnu.org
Subject: Overlay behavior change
Date: Wed, 8 Jul 2020 10:14:25 +0200 (CEST)	[thread overview]
Message-ID: <alpine.NEB.2.21.2007080958370394.9785@sdf.lonestar.org> (raw)


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	other threads:[~2020-07-08  8:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08  8:14 Gregory Heytings via Emacs development discussions. [this message]
2020-07-08  8:48 ` Overlay behavior change Eli Zaretskii
2020-07-08  9:14   ` Gregory Heytings via Emacs development discussions.
2020-07-08 14:26     ` Eli Zaretskii
2020-07-08 15:12       ` Gregory Heytings via Emacs development discussions.
2020-07-08 16:25         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.NEB.2.21.2007080958370394.9785@sdf.lonestar.org \
    --to=emacs-devel@gnu.org \
    --cc=ghe@sdf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.