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

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

Re: select text without moving the point in graphical interface


From: Ernest Adrogué
Subject: Re: select text without moving the point in graphical interface
Date: Tue, 10 Dec 2013 20:26:00 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

10-12-2013, 20:13 (+0100); Michael Heerdegen escriu:
> Ernest Adrogué <nfdisco@gmail.com> writes:
> 
> > I can't get this to work, because I don't have this `advice-add`
> > function in my Emacs
> 
> Here's the same for the old defadvice:
> 
> --8<---------------cut here---------------start------------->8---
> (defadvice mouse-drag-region (around test activate)
>   (let ((opoint (with-selected-window
>                   (posn-window (event-start (ad-get-arg 0)))
>                 (point))))
>     (prog1 ad-do-it
>       (run-with-idle-timer
>        0 nil
>        (lambda (win pos)
>        (with-selected-window win
>          (deactivate-mark)
>          (goto-char pos)))
>        (selected-window)  opoint))))
> --8<---------------cut here---------------end--------------->8---
> 
> This let's you copy text with the mouse, but disallows to manipulate the
> region with the mouse.

Yes, this is definitely much better. I think I'm going to use it.

Thank you!

Regards.



reply via email to

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