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

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

bug#27530: patch to cut and copy secondary


From: Robert Pluim
Subject: bug#27530: patch to cut and copy secondary
Date: Tue, 05 Sep 2017 09:51:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Tak Kunihiro <tkk@misasa.okayama-u.ac.jp> writes:

> I found that the exchange of primary and secondary can be implemented
> into C-x C-x as `mouse-exchange-point-and-mark-secondary'.
>
>   (global-set-key [remap exchange-point-and-mark] 
> 'mouse-exchange-point-and-mark-secondary)
>
> The function `mouse-exchange-point-and-mark-secondary' exchanges `mark
> and point' and secondary.  When there is neither primary nor
> secondary, it behaves as `exchange-point-and-mark'.  By doing this, no
> revision is necessary for functions that react to region.
>

This description seems to contradict the docstring:
>  
> +(defun mouse-exchange-point-and-mark-secondary (&optional arg)
> +  "Exchange the point and the mark, and the secondary selection.
> +When the mark is active, this exchanges the point and the mark
> +then creates the secondary selection from the primary selection.
> +When the mark is not active but the secondary selection exists,
> +this restores the primary selection from the secondary selection."
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Could you explain in more detail how this functions? The behaviour
seems useful, but I don't understand exactly what it does just from
the docstring.

Regards

Robert





reply via email to

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