Function: barf-if-buffer-read-only
barf-if-buffer-read-only is a function defined in buffer.c.
Signature
(barf-if-buffer-read-only &optional POSITION)
Documentation
Signal a buffer-read-only error if the current buffer is read-only.
If the text under POSITION (which defaults to point) has the
inhibit-read-only text property set, the error will not be raised.
Source Code
// Defined in /usr/src/emacs/src/buffer.c
{
if (NILP (position))
XSETFASTINT (position, PT);
else
CHECK_FIXNUM (position);
if (!NILP (BVAR (current_buffer, read_only))
&& NILP (Vinhibit_read_only)
&& NILP (Fget_text_property (position, Qinhibit_read_only, Qnil)))
xsignal1 (Qbuffer_read_only, Fcurrent_buffer ());
return Qnil;
}