简体   繁体   中英

Emacs hook when attempting to write a read-only buffer

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 Cx Cq 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).

Any help much appreciated as I've ran out of ideas.

Thanks, Jon.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM