title: Emacs hook when attempting to write a read-only buffer
body: <p>I'm looking to have a hook that triggers when a buffer marked read-only is attempted to be written. It's more of a convenience than necessary, I'm aware of C-x C-q which is currently where the function triggers (a Perforce p4-edit command), but it seems cleaner to do this when I begin to type (Much like the Visual Studio P4 plugin I believe).</p>
  
  <p>Any help much appreciated as I've ran out of ideas.</p>
  
  <p>Thanks,
  Jon.</p>