[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to copy rectangles

From: Gareth Rees
Subject: Re: How to copy rectangles
Date: 13 Oct 2003 05:34:46 -0700

Siegfried Heintze wrote:
> Why is there no kill-rectangle-save command? I need it!

Because you can use 'copy-rectangle-to-register' (C-x r r REGISTER) to
save a copy, and 'insert-register' (C-x r i REGISTER) to insert it.

However, it's easy to roll your own:

    (defun kill-rectangle-save (start end)
      "Save the region-rectangle as the last killed one."
      (interactive "r")
      (require 'rect)  ; Make sure killed-rectangle is defvar'ed.
      (setq killed-rectangle (extract-rectangle start end)))

Gareth Rees

reply via email to

[Prev in Thread] Current Thread [Next in Thread]