[Top][All Lists]

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

bug#27530: patch to cut and copy secondary

From: Tak Kunihiro
Subject: bug#27530: patch to cut and copy secondary
Date: Fri, 08 Sep 2017 08:02:08 +0900 (JST)

> If we want a function that will put region around secondary selection,
> why not write such a function, and let users who want to code commands
> that use this functionality do that?  IOW, why do we have to come up
> with a command to do something which we aren't sure is a frequent use
> case?

Since the secondary selection is one of overlays, to have functions
that transform the region and an overlay is more general.

How about having those in lisp/subr.el?  An user can still manipulate the
secondary selection.  Sorry for shortage for words.

 -- Function: overlay-exchange-region overlay
     This function exchanges the region and OVERLAY.
     When the region is active, this sets OVERLAY from the region.
     When the region is not active but OVERLAY exists, this sets the
     region from OVERLAY.

-- Function: overlay-exists-p overlay
    This function returns if OVERLAY exists in current buffer.
    When OVERLAY exists, this returns list of start and end of

-- Function: overlay-to-region overlay
    This function sets the region to text in OVERLAY.
    This works when OVERLAY exists and the region does not exist in
    current buffer.  The OVERLAY will be deleted.

-- Function: overlay-from-region overlay
    This function sets OVERLAY to text in the region.
    When the region does not exists, set OVERLAY to point.  When
    point is within OVERLAY, do nothing.

reply via email to

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