changeset 5805:569c0798fb72

(kill-region): Test inhibit-read-only.
author Richard M. Stallman <rms@gnu.org>
date Sun, 06 Feb 1994 23:40:45 +0000
parents 8fd47a5040cb
children f40d86815317
files lisp/simple.el
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Sun Feb 06 19:33:18 1994 +0000
+++ b/lisp/simple.el	Sun Feb 06 23:40:45 1994 +0000
@@ -1042,7 +1042,7 @@
    ;; If the buffer is read-only, we should beep, in case the person
    ;; just isn't aware of this.  However, there's no harm in putting
    ;; the region's text in the kill ring, anyway.
-   (buffer-read-only
+   ((and buffer-read-only (not inhibit-read-only))
     (copy-region-as-kill beg end)
     ;; This should always barf, and give us the correct error.
     (barf-if-buffer-read-only))