fix for toggle-read-only in emacs