changeset 9242:493c74aab5a0

(kill-rectangle): In read-only buffer, do record the rectangle for later yanking.
author Richard M. Stallman <rms@gnu.org>
date Sun, 02 Oct 1994 23:57:56 +0000
parents a309baaa249f
children c35d0ed03819
files lisp/rect.el
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/rect.el	Sun Oct 02 23:57:26 1994 +0000
+++ b/lisp/rect.el	Sun Oct 02 23:57:56 1994 +0000
@@ -138,6 +138,10 @@
 Calling from program, supply two args START and END, buffer positions.
 But in programs you might prefer to use `delete-extract-rectangle'."
   (interactive "r")
+  (if buffer-read-only
+      (progn
+	(setq killed-rectangle (extract-rectangle start end))
+	(barf-if-buffer-read-only)))
   (setq killed-rectangle (delete-extract-rectangle start end)))
 
 ;;;###autoload