]> git.eshelyaron.com Git - emacs.git/commit
Fix deletion of text holding `inhibit-read-only' properties
authorPo Lu <luangruo@yahoo.com>
Tue, 30 Apr 2024 10:26:39 +0000 (18:26 +0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 6 May 2024 16:29:44 +0000 (18:29 +0200)
commit8c8928ab2c4e6d2fd8a5cfdc1f06b0dfda4f5f93
treedb6df5825b3deeb1eb8b975b621456009bfd1bc4
parent0815b677ef9912206e2761b93228e8ff52e0e7f6
Fix deletion of text holding `inhibit-read-only' properties

* src/intervals.h (INTERVAL_VISIBLE_P): Split into ...
(INTERVAL_GENERALLY_WRITABLE_P, INTERVAL_EXPRESSLY_WRITABLE_P):
... two new macros.

* src/textprop.c (verify_interval_modification): If the buffer
is read only, verify not that there is only a single exempting
interval spanning the area of a multiple-character operation,
but that every intervening interval in such an operation exempts
it from write restrictions, either by providing a read-only
property that appears in Vinhibit_read_only, or by providing an
inhibit-read-only property.

* test/src/textprop-tests.el (textprop-interval-immutability):
New test.

(cherry picked from commit b36fd07560fd12c5e819e808a6f0eb9579f77c25)
src/intervals.h
src/textprop.c
test/src/textprop-tests.el