From 9e860631e74a527248a75f16c036da26feec8dfd Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 15 Apr 2004 00:26:17 +0000 Subject: [PATCH] (Read Only Buffers): Mention optional ARG to `toggle-read-only'. --- lispref/ChangeLog | 7 ++++++- lispref/buffers.texi | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 2b4eae1ca63..6637064af48 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,6 +1,11 @@ +2004-04-14 Luc Teirlinck + + * buffers.texi (Read Only Buffers): Mention optional ARG to + `toggle-read-only'. + 2004-04-14 Nick Roberts - * windows.texi (Selecting Windows): Note that get-lru-window + * windows.texi (Selecting Windows): Note that get-lru-window returns a full-width window if possible. 2004-04-13 Luc Teirlinck diff --git a/lispref/buffers.texi b/lispref/buffers.texi index 0eee01d980d..723dae742ab 100644 --- a/lispref/buffers.texi +++ b/lispref/buffers.texi @@ -737,12 +737,17 @@ properties have no effect. If @code{inhibit-read-only} is a list, then of the list (comparison is done with @code{eq}). @end defvar -@deffn Command toggle-read-only -This command changes whether the current buffer is read-only. It is +@deffn Command toggle-read-only &optional arg +This command toggles whether the current buffer is read-only. It is intended for interactive use; do not use it in programs. At any given point in a program, you should know whether you want the read-only flag on or off; so you can set @code{buffer-read-only} explicitly to the proper value, @code{t} or @code{nil}. + +If @var{arg} is non-@code{nil}, it should be a raw prefix argument. +@code{toggle-read-only} sets @code{buffer-read-only} to @code{t} if +the numeric value of that prefix argument is positive and to +@code{nil} otherwise. @xref{Prefix Command Arguments}. @end deffn @defun barf-if-buffer-read-only