[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] * lisp/files.el (toggle-read-only): Mention in the doc-string th
From: |
Eric Hanchrow |
Subject: |
[PATCH] * lisp/files.el (toggle-read-only): Mention in the doc-string that it's only for interactive use. |
Date: |
Thu, 10 Nov 2011 08:45:05 -0800 |
lisp/ChangeLog | 8 ++++++++
lisp/emacs-lisp/bytecomp.el | 7 ++++---
lisp/files.el | 5 ++++-
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2b9edd0..fb01278 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
+2011-11-10 Eric Hanchrow <address@hidden>
+
+ * files.el (toggle-read-only): Mention in the doc-string that it's
+ only for interactive use.
+
+ * emacs-lisp/bytecomp.el
+ (byte-compile-interactive-only-functions): add toggle-read-only.
+
2011-11-07 Stefan Monnier <address@hidden>
* files.el (find-file): Always use selected-window.
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index fae402d..153bd93 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -353,9 +353,10 @@ else the global value will be modified."
(append byte-compile-warnings (list warning)))))))
(defvar byte-compile-interactive-only-functions
- '(beginning-of-buffer end-of-buffer replace-string replace-regexp
- insert-file insert-buffer insert-file-literally previous-line next-line
- goto-line comint-run delete-backward-char)
+ '(toggle-read-only beginning-of-buffer end-of-buffer
+ replace-string replace-regexp insert-file insert-buffer
+ insert-file-literally previous-line next-line goto-line
+ comint-run delete-backward-char)
"List of commands that are not meant to be called from Lisp.")
(defvar byte-compile-not-obsolete-vars nil
diff --git a/lisp/files.el b/lisp/files.el
index acff339..285a5cd 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4686,7 +4686,10 @@ prints a message in the minibuffer. Instead,
use `set-buffer-modified-p'."
"Change whether this buffer is read-only.
With prefix argument ARG, make the buffer read-only if ARG is
positive, otherwise make it writable. If buffer is read-only
-and `view-read-only' is non-nil, enter view mode."
+and `view-read-only' is non-nil, enter view mode.
+
+Don't use this function in a Lisp program; use the variable
+`inhibit-read-only' instead."
(interactive "P")
(if (and arg
(if (> (prefix-numeric-value arg) 0) buffer-read-only
--
1.7.7.rc0
- [PATCH] * lisp/files.el (toggle-read-only): Mention in the doc-string that it's only for interactive use.,
Eric Hanchrow <=