emacs-devel
[Top][All Lists]
Advanced

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

Re: Yanking wrong text


From: Juri Linkov
Subject: Re: Yanking wrong text
Date: Tue, 21 Aug 2007 23:05:28 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

>> >> I wonder if we can tune it to detect that common case
>> >> while not triggering in your case.
>> >
>> > I think the key is to check not just whether the two strings are
>> > equal, but also whether the head of the kill-ring really comes from
>> > the currently active region.  E.g. check that last-command is one
>> > that uses copy-region-as-kill.
>>
>> Should we care only for situation of selecting and yanking with the mouse?
>> In this case we could check last-command-event for mouse keys.
>
> I don't think that's enough.  The selection may have been unchanged by the
> last command.

I've found that mouse.el already has the necessary function
`mouse-region-match' that checks if there's an active region
that was set with the mouse.  I fixed both cua-base.el and delsel.el
to use it.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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