diff options
| author | Jim Porter | 2025-05-28 09:55:58 -0700 |
|---|---|---|
| committer | Jim Porter | 2025-06-10 22:09:26 -0700 |
| commit | 4a3c8e6e1df44b187b7286747e363232e8b4e0ea (patch) | |
| tree | 415ffb4422e3457bb37ad8e15e892b74b448a405 /src | |
| parent | 7416595e2fc0ff676ef98a139328722ac9220ca0 (diff) | |
| download | emacs-4a3c8e6e1df44b187b7286747e363232e8b4e0ea.tar.gz emacs-4a3c8e6e1df44b187b7286747e363232e8b4e0ea.zip | |
Don't delete in-place when replacing a display property
When calling 'add-display-text-property' on a region of text that
already contains PROP, we first delete the old display specification
from the region. If the region's 'display' property is a list of
display specifications, we need to avoid destructively modifying the
list; other regions of text could be using the same list object. (For a
'display' property that's a vector or a single display spec, this
doesn't matter since we first make a new list in the code.)
In addition, be more careful when working with a display property like
((margin ...) ...). This is a single display specification, not a list
of display specs.
* lisp/emacs-lisp/subr-x.el (add-display-text-property): Don't delete
in-place for list values. Handle (margin ...) display specification
type correctly.
* test/lisp/emacs-lisp/subr-x-tests.el
(subr-x-test-add-display-text-property): Update test.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions