Issue125

classification
Title How to mimic some GNU Emacs mouse behavior in XEmacs?
Type Module
Severity Platform
Keywords
explanation
process
These optional controls are only of interest to committers and tracker administrators.
Status chatting   Reason
Superseder   Submitted 2007-10-17.15:22:01
Priority   Assigned To
Nosy List  

Created on 2008-01-19.06:42:57 by skip.montanaro, last changed 2008-01-19.06:42:57 by rpluim.

Files
File name Uploaded Type Edit Remove
unnamed rpluim, 2008-01-19.06:42:57 text/html
unnamed rpluim, 2008-01-19.06:42:57 text/plain
Messages
msg159 [hidden] ([hidden]) Date: 2008-01-19.06:42:57
  Message-ID: <54d9efdc0710180011uf3a9c37u27f2766df702b5c9@mail.gmail.com>
On 10/17/07, skip@pobox.com <skip@pobox.com> wrote:
>
>
> > (define-key global-map 'button3 'mouse-track-adjust)
> > (add-hook 'mouse-track-click-hook
> >       (lambda (event count)
> >         (if (or (/= (event-button event) 3)
> >             (/= count 2))
> >         nil
> >           (kill-region (point) (mark))
> >           t
> >           )))
>
> > (setq mouse-yank-at-point t)
>
> > I am not able to get it to select the region spanning the last point
> where
> > button1 was clicked, to the current mouse location.  To do that I have
> to
> > highlight the region by dragging the mouse.  Presumably, I have to
> invoke
> > some 'mark the point' function in the code above when button1 is clicked
> > in the above conditional?
>
>

Does it work to use (event-point event) instead of (mark)?

Robert
msg158 [hidden] ([hidden]) Date: 2008-01-19.06:42:57
  Message-ID: <18198.10393.686453.982841@montanaro.dyndns.org>
A colleague at work is trying to mimic some GNU Emacs behavior in XEmacs.  I
have never done anything with the mouse in either dialect, so I couldn't
help him out.  Can someone here suggest how to do what he wants?

> I am trying to imitate the following FSF emacs behavior in xemacs: When I
> double-click mouse button3, I would like it to kill the region selected
> from the last position of 'point' position.  Also button2 yanks the
> selection.  Here is what I have so far:

> (define-key global-map 'button3 'mouse-track-adjust)
> (add-hook 'mouse-track-click-hook
>       (lambda (event count)
>         (if (or (/= (event-button event) 3)
>             (/= count 2))
>         nil
>           (kill-region (point) (mark))
>           t
>           )))

> (setq mouse-yank-at-point t)

> I am not able to get it to select the region spanning the last point where
> button1 was clicked, to the current mouse location.  To do that I have to
> highlight the region by dragging the mouse.  Presumably, I have to invoke
> some 'mark the point' function in the code above when button1 is clicked
> in the above conditional?

Thanks,

Skip

_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta@xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
History
Date User Action Args
2008-01-19 06:42:57rpluimsetfiles: + unnamed, unnamed
status: new -> chatting
messages: + msg159
2008-01-19 06:42:57skip.montanarocreate