Commit 2fbc7e7
committed
fix(textprop): remove text properties in place so aliased snapshots update
`text-properties-at` returns the live interval plist, so a captured value
aliases its cons cells (matching GNU). But `plist_value_remove` rebuilt the
plist from scratch via `plist_value_from_pairs`, repointing `node.plist` to
fresh cells and leaving the captured snapshot stale. GNU's `remove_properties`
(src/textprop.c) mutates the existing chain in place: head matches advance the
plist pointer without touching the old head cell, body matches are spliced out
with setcdr. Rewrite `plist_value_remove` to do the same (mirrors the existing
in-place `plist_value_put_replace`); allocates nothing.
Fixes div_v7_text_property_remove_overlapping: a value captured before
remove-text-properties / remove-list-of-text-properties now reflects the
shared-structure mutation, as in GNU.1 parent bd8d938 commit 2fbc7e7
1 file changed
Lines changed: 47 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
289 | 295 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
295 | 312 | | |
296 | | - | |
297 | | - | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
298 | 338 | | |
299 | 339 | | |
300 | 340 | | |
| |||
0 commit comments