Subject: bug#31240: 26.1; mouse-save-then-kill does not kill rectangles

From: [email-masked] (Charles A. Roelli)
Date: Sun, 23 Sep 2018 12:16:52 +0200

> From: Federico Tedin <[email-masked]>
> Date: Sat, 22 Sep 2018 17:05:19 -0300
> 
> After reading more of the code in mouse.el, I found that
> mouse-save-then-kill is the only function that allows using the mouse
> to set/resize rectangular regions. I'm attaching a patch that fixes
> all three use cases for this function: setting the region initially,
> resizing the region, and killing the region. I've also made sure it
> works correctly when mouse-drag-copy-region is set to t. Hope it helps.

Thanks, this looks good.  I think we also need a similar change for
function "mouse-drag-and-drop-region", which is used when the variable
of the same name is non-nil.  For example, the following recipe
exposes it:

M-x set-variable RET mouse-drag-and-drop-region RET t RET
M-< C-SPC M-f C-n C-x SPC
Drag the rectangle region with the mouse, and its shape is ignored

Hopefully we can apply the same kind of change in that function too.