(read-only-mode -1), not
See the doc string of macro
C-h f define-minor-mode) for more info about the argument to a minor-mode function.
And see the doc string of
read-only-mode for some good info about its use:
read-only-mode is an interactive compiled Lisp function in
It is bound to
(read-only-mode &optional ARG)
Change whether the current buffer is read-only.
With prefix argument
ARG, make the buffer read-only if
positive, otherwise make it writable. If buffer is read-only
view-read-only is non-
nil, enter view mode.
Do not call this from a Lisp program unless you really intend to
do the same thing as the
C-x C-q command, including
possibly enabling or disabling View mode. Also, note that this
command works by setting the variable
does not affect read-only regions caused by text properties. To
ignore read-only status in a Lisp program (whether due to text
properties or buffer state), bind
to a non-