summaryrefslogtreecommitdiff
path: root/src/intervals.h
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2014-11-16 23:36:58 +0100
committerLars Magne Ingebrigtsen <larsi@gnus.org>2014-11-16 23:41:55 +0100
commitd1b04a9e7ada7070dbd84bb450411c1f169b3739 (patch)
tree8f0e26d1e2154f91364fd1b919df8bd8855604fd /src/intervals.h
parentc94988f4b740738cbc4660ee9c64637e55ad5d76 (diff)
downloademacs-d1b04a9e7ada7070dbd84bb450411c1f169b3739.tar.gz
emacs-d1b04a9e7ada7070dbd84bb450411c1f169b3739.tar.bz2
emacs-d1b04a9e7ada7070dbd84bb450411c1f169b3739.zip
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.
Diffstat (limited to 'src/intervals.h')
-rw-r--r--src/intervals.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/intervals.h b/src/intervals.h
index 4e7a177140e..bd1f49dc383 100644
--- a/src/intervals.h
+++ b/src/intervals.h
@@ -197,6 +197,7 @@ set_interval_plist (INTERVAL i, Lisp_Object plist)
/* Is this interval writable? Replace later with cache access. */
#define INTERVAL_WRITABLE_P(i) \
(i && (NILP (textget ((i)->plist, Qread_only)) \
+ || !NILP (textget ((i)->plist, Qinhibit_read_only)) \
|| ((CONSP (Vinhibit_read_only) \
? !NILP (Fmemq (textget ((i)->plist, Qread_only), \
Vinhibit_read_only)) \