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

From: Kenichi Handa <[email-masked]>
Date: Thu, 12 Aug 2010 12:54:05 +0900

In article <[email-masked]>, Stefan Monnier <[email-masked]> writes:

> So the C-f (or any other movement) would cause the selection of PRIMARY?

When transient-mark-mode is on (including temporary one), I
think yes.

> That would have to be performed in some kind of post-command-hook, which
> is undesirable.

We can add a proper code to set_point_both like this code in
init_iterator (xdisp.c).

  /* Non-zero if we should highlight the region.  */
  highlight_region_p
    = (!NILP (Vtransient_mark_mode)
       && !NILP (current_buffer->mark_active)
       && XMARKER (current_buffer->mark)->buffer != 0);

  /* Set IT->region_beg_charpos and IT->region_end_charpos to the
     start and end of a visible region in window IT->w.  Set both to
     -1 to indicate no region.  */
  if (highlight_region_p
      /* Maybe highlight only in selected window.  */
      && (/* Either show region everywhere.  */
[...]

---
Kenichi Handa
[email-masked]