Subject: Re: bug#6774: Cut and paste with C-w/mouse-2 not working?

From: Chong Yidong <[email-masked]>
Date: Mon, 02 Aug 2010 15:41:58 -0400

David De La Harpe Golden <[email-masked]> writes:

> Yes, there's a problem here - I guess emacs is keeping primary bound
> to a span that's become zero-length. Again.

After thinking about this, my opinion is that the Emacs command
loop---or rather prepare_to_modify_buffer in insdel.c---should make a
copy of the primary selection before running before-change-functions.
Then, deactivate-mark should check if the resulting string is empty;
and, if so, set the primary to that saved copy.

I haven't looked at your branch; is this the approach you implemented?