emacs-devel
[Top][All Lists]
Advanced

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

Re: clipboard/selection: customization vs. rebinding


From: Stefan Monnier
Subject: Re: clipboard/selection: customization vs. rebinding
Date: Tue, 28 Jun 2011 23:19:36 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> It's a tough decision.  It's true that mouse-yank-at-click has fringe
> bindings, so anyone who wants the old behavior would need to rebind
> those too, which is a nuisance.

Shouldn't we do something like the patch below?

> However, if we introduce a boolean to control mouse-yank-at-click, that
> makes it harder for users to have both mouse yank behaviors available
> (by binding mouse-yank-at-click and mouse-yank-primary to different
> keys)---unless we introduce yet another command that unconditionally
> yanks from the kill ring, which I think is not worth the complication.

It doesn't seem that terrible, but I also don't think it matters that
much either way (i.e. I think the main problem with the new behavior is
that C-y now never inserts the primary).


        Stefan


=== modified file 'lisp/mouse.el'
--- lisp/mouse.el       2011-06-01 16:10:20 +0000
+++ lisp/mouse.el       2011-06-29 03:17:30 +0000
@@ -2092,16 +2092,16 @@
 ;; (global-set-key [triple-mouse-1] 'mouse-set-point)
 
 ;; Clicking on the fringes causes hscrolling:
-(global-set-key [left-fringe mouse-1]  'mouse-set-point)
-(global-set-key [right-fringe mouse-1] 'mouse-set-point)
+(global-set-key [left-fringe mouse-1]  [mouse-1])
+(global-set-key [right-fringe mouse-1] [mouse-1])
 
 (global-set-key [mouse-2]      'mouse-yank-primary)
 ;; Allow yanking also when the corresponding cursor is "in the fringe".
-(global-set-key [right-fringe mouse-2] 'mouse-yank-at-click)
-(global-set-key [left-fringe mouse-2] 'mouse-yank-at-click)
+(global-set-key [right-fringe mouse-2] [mouse-2])
+(global-set-key [left-fringe mouse-2] [mouse-2])
 (global-set-key [mouse-3]      'mouse-save-then-kill)
-(global-set-key [right-fringe mouse-3] 'mouse-save-then-kill)
-(global-set-key [left-fringe mouse-3]  'mouse-save-then-kill)
+(global-set-key [right-fringe mouse-3] [mouse-3])
+(global-set-key [left-fringe mouse-3]  [mouse-3])
 
 ;; By binding these to down-going events, we let the user use the up-going
 ;; event to make the selection, saving a click.




reply via email to

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