From d1b04a9e7ada7070dbd84bb450411c1f169b3739 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 16 Nov 2014 23:36:58 +0100 Subject: Implement an `inhibit-read-only' text property * doc/lispref/text.texi (Special Properties): Mention `inhibit-read-only'. * src/buffer.c (Fbarf_if_buffer_read_only): Don't raise an error if the text at POSITION (new optional argument) has the `inhibit-read-only' text property set. * src/callint.c (Fcall_interactively): Pass in nil as argument to Fbarf_if_buffer_read_only. * src/fileio.c (Finsert_file_contents): Ditto. * src/insdel.c (prepare_to_modify_buffer_1): Pass start region in. * src/intervals.h (INTERVAL_WRITABLE_P): Check the `inhibit-read-only' text property. * src/textprop.c (verify_interval_modification): Check buffer readedness after the last interval. --- src/insdel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/insdel.c') diff --git a/src/insdel.c b/src/insdel.c index 463392dcada..3133ca4bd2c 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -1797,9 +1797,11 @@ prepare_to_modify_buffer_1 (ptrdiff_t start, ptrdiff_t end, ptrdiff_t *preserve_ptr) { struct buffer *base_buffer; + Lisp_Object temp; + XSETFASTINT (temp, start); if (!NILP (BVAR (current_buffer, read_only))) - Fbarf_if_buffer_read_only (); + Fbarf_if_buffer_read_only (temp); bset_redisplay (current_buffer); -- cgit v1.2.1