diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-10-02 23:57:56 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-10-02 23:57:56 +0000 |
commit | db03492ec0625d682808d69f75cf7eec19b2a494 (patch) | |
tree | 3fb8ba41f80699c9f61d081f347b6fa8a740cd6a /lisp/rect.el | |
parent | a89a914a8dc2ec8049cd29157d15c1c2dab4584f (diff) | |
download | emacs-db03492ec0625d682808d69f75cf7eec19b2a494.tar.gz |
(kill-rectangle): In read-only buffer, do record
the rectangle for later yanking.
Diffstat (limited to 'lisp/rect.el')
-rw-r--r-- | lisp/rect.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/rect.el b/lisp/rect.el index b19f883976c..71e1f8ed1e7 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -138,6 +138,10 @@ Value is list of strings, one for each line of the rectangle." 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 |