I'd like to set some things (e.g., cursor shape) when in read-only-mode
. That part is easy enough with
(add-hook 'read-only-mode-hook
(lambda() (setq-local cursor-type 'box)))
Then I'd like to switch it back when exiting read-only-mode
. Something like
(add-hook 'read-write-mode-hook
(lambda() (setq-local cursor-type 'bar)))
except that there is no such thing as read-write-mode
.