help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to copy rectangles


From: Sandip Chitale
Subject: Re: How to copy rectangles
Date: 14 Oct 2003 09:54:22 -0700

address@hidden (Gareth Rees) wrote in message news:<address@hidden>...
> 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)))

Thanks. I have added the above function to my .emacs now.

Can anyone tell me as to why this is not supported by emacs by
default? One would think this is very useful and commonly used
function.


reply via email to

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