Is there a way to make a buffer read only?
Modes such as Dired and Rmail make buffers read-only when altering the contents with the usual editing commands would probably be a mistake. The special commands of these modes bind buffer-read-only to nil (with let) or bind inhibit-read-only to t around the places where they themselves change the text.
What does inhibit read only do in a buffer?
If inhibit-read-only is a list, then read-only character properties have no effect if they are members of the list (comparison is done with eq ). This is the mode command for Read Only minor mode, a buffer-local minor mode. When the mode is enabled, buffer-read-only is non- nil in the buffer; when disabled, buffer-read-only is nil in the buffer.
How to bind a read only buffer to nil?
The special commands of these modes bind buffer-read-only to nil (with let) or bind inhibit-read-only to t around the places where they themselves change the text. This buffer-local variable specifies whether the buffer is read-only. The buffer is read-only if this variable is non- nil.
How does writeint32tobuffer have a lease on the buffer?
The WriteInt32ToBuffer method has a lease on (can consume) the buffer between the start of the method call and the time the method returns. Similarly, DisplayBufferToConsole has a lease on the buffer while it’s executing, and the lease is released when the method unwinds.
Which is read only or inhibit read only?
This buffer-local variable specifies whether the buffer is read-only. The buffer is read-only if this variable is non- nil. However, characters that have the inhibit-read-only text property can still be modified. See inhibit-read-only .
What to do when read only mode is disabled?
Even when Read Only mode is disabled, characters with non- nil read-only text properties remain read-only. To temporarily ignore all read-only states, bind inhibit-read-only, as described above. When enabling Read Only mode, this mode command also enables View mode if the option view-read-only is non- nil.