From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/read-only-buffers.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 devdocs/elisp/read-only-buffers.html (limited to 'devdocs/elisp/read-only-buffers.html') diff --git a/devdocs/elisp/read-only-buffers.html b/devdocs/elisp/read-only-buffers.html new file mode 100644 index 00000000..f966638f --- /dev/null +++ b/devdocs/elisp/read-only-buffers.html @@ -0,0 +1,23 @@ +

Read-Only Buffers

If a buffer is read-only, then you cannot change its contents, although you may change your view of the contents by scrolling and narrowing.

Read-only buffers are used in two kinds of situations:

Variable: buffer-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.

+
Variable: inhibit-read-only +
+

If this variable is non-nil, then read-only buffers and, depending on the actual value, some or all read-only characters may be modified. Read-only characters in a buffer are those that have a non-nil read-only text property. See Special Properties, for more information about text properties.

If inhibit-read-only is t, all read-only character properties have no effect. 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).

+
+
Command: read-only-mode &optional arg +
+

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. The calling convention is the same as for other minor mode commands (see Minor Mode Conventions).

This minor mode mainly serves as a wrapper for buffer-read-only; unlike most minor modes, there is no separate read-only-mode variable. 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. See Miscellaneous Buffer Operations in The GNU Emacs Manual. When disabling Read Only mode, it disables View mode if View mode was enabled.

+
+
Function: barf-if-buffer-read-only &optional position +
+

This function signals a buffer-read-only error if the current buffer is read-only. If the text at position (which defaults to point) has the inhibit-read-only text property set, the error will not be raised.

See Using Interactive, for another way to signal an error if the current buffer is read-only.

+
+
+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Read-Only-Buffers.html +

+
-- cgit v1.2.3